[ML] Update annotation method assumes annotation is in current write index #125281
Labels
bug
Fixes for quality problems that affect the customer experience
Feature:Anomaly Detection
ML anomaly detection
:ml
v8.1.0
v8.2.0
The function used for updating annotations in ML assumes that the annotation being updated is in the index that the annotations write alias currently points to. This assumption is incorrect. The annotation to be updated could be in any one of the indices that the annotations read alias points to. The result of the current behavior, is that when updating an annotation which was created before an upgrade to 8.0.0 for example, a new annotation is created rather than an update to the existing document.
A similar approach should be taken to that used when deleting annotations, implemented in #115328, where an extra query is performed against the read alias to obtain the index the annotation is stored in.
The text was updated successfully, but these errors were encountered: