You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When create, update and delete notification configs, currently we do not refresh the system index .opensearch-notification-config in this plugin, so the operations cannot be seen immediately util the automatic refresh happens within the index(the default value of refresh_interval is 1s, which means the operations can be seen after 1s at most).
However, we can refresh the index when doing those operations to make the result visible immediately, one benefit is that users may use the notifications API to create/update/delete configs so they need to see the realtime result, another benefit is that in the integration test methods, we do not need to use Thread.sleep() or waitFor to wait some time to get the result after creating/updating/deleting the notification configs.
Too many refresh may cause problems, but in our case, creating/updating/deleting operations don't happen frequently, so it's not a problem that we refresh the system index for every operation.
What solution would you like?
Add refresh=true parameter when calling the index/update/delete API against the system index .opensearch-notification-config.
Here is the index operation code which needs to be changed:
Is your feature request related to a problem?
When create, update and delete notification configs, currently we do not refresh the system index
.opensearch-notification-config
in this plugin, so the operations cannot be seen immediately util the automatic refresh happens within the index(the default value of refresh_interval is 1s, which means the operations can be seen after 1s at most).However, we can refresh the index when doing those operations to make the result visible immediately, one benefit is that users may use the notifications API to create/update/delete configs so they need to see the realtime result, another benefit is that in the integration test methods, we do not need to use
Thread.sleep()
orwaitFor
to wait some time to get the result after creating/updating/deleting the notification configs.Too many refresh may cause problems, but in our case, creating/updating/deleting operations don't happen frequently, so it's not a problem that we refresh the system index for every operation.
What solution would you like?
Add
refresh=true
parameter when calling the index/update/delete API against the system index.opensearch-notification-config
.Here is the index operation code which needs to be changed:
notifications/notifications/notifications/src/main/kotlin/org/opensearch/notifications/index/NotificationConfigIndex.kt
Line 185 in 0a7a5f9
, adding
.setRefreshPolicy(RefreshPolicy.IMMEDIATE)
maybe enough.The text was updated successfully, but these errors were encountered: