-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[BUG][Concurrent Search] Search request for top anomalies from AD plugin is failing #12331
Comments
On looking more into this failure, there seems to be a race condition in the composite aggregation in general where the lookup instances is shared across slices. So this will have issues in all the composite aggregation path with concurrent segment search. We will need to disable the concurrent path with composite aggregation being used in the request to fall back to the non-concurrent path. The change will be 1 liner as we already have a mechanism to control it at per aggregation level. |
In the description, can you plz share the exception and stack trace related to the race condition |
…etails see: opensearch-project#12331 Signed-off-by: Sorabh Hamirwasia <[email protected]>
…etails see: opensearch-project#12331 Signed-off-by: Sorabh Hamirwasia <[email protected]>
@eirsep Will do |
…etails see: opensearch-project#12331 Signed-off-by: Sorabh Hamirwasia <[email protected]>
…etails see: opensearch-project#12331 Signed-off-by: Sorabh Hamirwasia <[email protected]>
For more details see: #12331 Signed-off-by: Sorabh Hamirwasia <[email protected]>
…etails see: opensearch-project#12331 Signed-off-by: Sorabh Hamirwasia <[email protected]>
…etails see: #12331 (#12375) Signed-off-by: Sorabh Hamirwasia <[email protected]>
…etails see: #12331 (#12375) Signed-off-by: Sorabh Hamirwasia <[email protected]> (cherry picked from commit 74589ef) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…etails see: #12331 (#12375) (#12400) (cherry picked from commit 74589ef) Signed-off-by: Sorabh Hamirwasia <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…etails see: opensearch-project#12331 (opensearch-project#12375) Signed-off-by: Sorabh Hamirwasia <[email protected]>
Took a closer look at this and it seems there are actually 2 separate issues related to concurrent segment search here:
Problem 1 should be a pretty straightforward fix that I will open a PR for, however problem 2 will require some more investigation. Depending on the outcome of that investigation one path forward could be to re-enable composite aggregations for concurrent segment search but only when a script is not used (or specifically when it is not scripting on the |
…etails see: opensearch-project#12331 (opensearch-project#12375) Signed-off-by: Sorabh Hamirwasia <[email protected]> Signed-off-by: Aman Khare <[email protected]>
…etails see: opensearch-project#12331 (opensearch-project#12375) Signed-off-by: Sorabh Hamirwasia <[email protected]>
Going to close this issue as it's been resolved by the following:
There's no issue with using the AD plugin today with concurrent segment search, the next item is to support scripting for composite aggs, which I will create a new issue to track. |
…etails see: opensearch-project#12331 (opensearch-project#12375) Signed-off-by: Sorabh Hamirwasia <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
@jed326 could you help me understand why/how the |
Then in
|
And in the
This is where that |
Shouldn't each thread creates its own |
@rishabhmaurya I need to refresh my memory on this, but I believe the problem is that there is only one instance of the Here is the stack trace from investigating this issue:
|
Describe the bug
AD plugin exposes a top anomalies api which internally create a painless script based composite aggregation query. When concurrent search is enabled on a cluster, then the search request sometimes fails with error.
Ref:
Top Anomalies API: https://opensearch.org/docs/latest/observing-your-data/ad/api/#search-top-anomalies
Input to the API:
Example Query which it creates:
Related component
Search:Query Capabilities
To Reproduce
Test failing in the plugin has sample of the index mapping for entity field and logic to create the data which can be used to reproduce. Ref here
Expected behavior
The query should be successful
Additional Details
Plugins
Anomaly Detection
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: