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

[7.16] [ML] fix bug in model snapshot upgrader (#80347) #80360

Merged
merged 2 commits into from
Nov 4, 2021

Conversation

benwtrent
Copy link
Member

Backports the following commits to 7.16:

It is possible that the model snapshot upgrader task is never fully shutdown.

This could occur in the following two scenarios:

 - The task state is failed being set to failed (we should kill the task in that situation)
 - The executor doesn't fire in time to initiate the shutdown before we shutdown the executor. This is caused by a race condition between scheduling the shutdown and closing the executor.

To the user, the failure looks like the REST request NEVER returning. In tests, it looks like:

```
13:10:20     ElasticsearchStatusException[Elasticsearch exception [type=status_exception, reason=Cannot upgrade job [ml-snapshots-upgrade-job] snapshot [1613739961] as there is currently a snapshot for this job being upgraded]]
```
As the request is spuriously retried and thus fails as the previous task never shutdown.

closes elastic#69276
@benwtrent benwtrent added auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport labels Nov 4, 2021
@benwtrent
Copy link
Member Author

@elasticmachine update branch

@elasticsearchmachine elasticsearchmachine merged commit ed24500 into elastic:7.16 Nov 4, 2021
@benwtrent benwtrent deleted the backport/7.16/pr-80347 branch November 4, 2021 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport v7.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants