Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes in workflows for seg rep compatibility #1114

Merged
merged 1 commit into from
Sep 5, 2023

Conversation

eirsep
Copy link
Member

@eirsep eirsep commented Sep 5, 2023

In workflows, we save audit state alerts from delegate monitors.

Within the same workflow execution we execute a search request to fetch the persisted audit alerts from alerts system index.

Since RAW guarantees have changed with seg rep, we would need to search on primaries to ensure we have the latest information.

Relates to Compatibility with segment replication #974

…te alerts to evaluate chained alert trigger condition

Signed-off-by: Surya Sashank Nistala <[email protected]>
Comment on lines -230 to -233
val sr = SearchRequest(dataSources!!.alertsIndex)
sr.source().query(QueryBuilders.matchAllQuery()).size(10)
val searchResponse: SearchResponse = monitorCtx.client!!.suspendUntil { monitorCtx.client!!.search(sr, it) }
searchResponse.hits
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this dev code that was accidentally left over?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@eirsep eirsep merged commit 0ce01cb into opensearch-project:main Sep 5, 2023
3 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants