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] Fix logic for moving .ml-state-write alias from legacy to new #69280

Merged
merged 1 commit into from
Feb 19, 2021

Conversation

droberts195
Copy link
Contributor

When multiple jobs start up together on a node following
an upgrade, each one of them will trigger a check that the
.ml-state* indices are as expected and the .ml-state-write
alias points to the correct index.

There were a couple of flaws in the logic:

  1. We were not considering the possibility that one or more
    existing .ml-state* indices might be hidden.
  2. If multiple jobs tried to create a .ml-state-000001 index
    simultaneously all but the first would fail. We accounted
    for this, but then did not follow up with the correct alias
    update request for those index creation requests that
    failed. This could cause all but one of the jobs starting
    up on the node to spuriously fail.

Both these problems are fixed by this PR.

Backport of #69039

When multiple jobs start up together on a node following
an upgrade, each one of them will trigger a check that the
.ml-state* indices are as expected and the .ml-state-write
alias points to the correct index.

There were a couple of flaws in the logic:

1. We were not considering the possibility that one or more
   existing .ml-state* indices might be hidden.
2. If multiple jobs tried to create a .ml-state-000001 index
   simultaneously all but the first would fail.  We accounted
   for this, but then did not follow up with the correct alias
   update request for those index creation requests that
   failed.  This could cause all but one of the jobs starting
   up on the node to spuriously fail.

Both these problems are fixed by this PR.

Backport of elastic#69039
@droberts195 droberts195 merged commit 97ecbb4 into elastic:7.12 Feb 19, 2021
@droberts195 droberts195 deleted the fix_move_state_alias_712 branch February 19, 2021 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant