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

[ML] Delete annotation directly from the index it is stored in #115328

Merged

Conversation

peteharverson
Copy link
Contributor

@peteharverson peteharverson commented Oct 18, 2021

Summary

Fixes the approach used to delete an annotation so that it is deleted from the index that it is stored in.

Previously the deleteAnnotation function assumed that the annotation to be deleted was in the index that the annotations write alias currently points to. This assumption is incorrect as the annotation to be deleted could be in any one of the indices that the annotations read alias points to. The delete function now does an extra query against the read alias to obtain the index the annotation is stored in.

Checklist

Fixes #113365

@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

Copy link
Contributor

@droberts195 droberts195 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

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

LGTM

@peteharverson
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @peteharverson

@peteharverson peteharverson added the auto-backport Deprecated - use backport:version if exact versions are needed label Oct 19, 2021
@peteharverson peteharverson merged commit f8041e6 into elastic:master Oct 19, 2021
@peteharverson peteharverson deleted the ml-annotations-delete-index branch October 19, 2021 10:57
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Oct 19, 2021
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:Anomaly Detection ML anomaly detection :ml release_note:fix review v7.16.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ML] Delete annotation method assumes annotation is in current write index
5 participants