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.x][ML] Avoid marking data frame analytics task completed twice (#4… #46724

Conversation

dimitris-athanasiou
Copy link
Contributor

…6721)

When the stop API is called while the task is running there is
a chance the task gets marked completed twice. This may cause
undesired side effects, like indexing the progress document a second
time after the stop API has returned (the cause for #46705).

This commit adds a check that the task has not been completed before
proceeding to mark it so. In addition, when we update the task's state
we could get some warnings that the task was missing if the stop API
has been called in the meantime. We now check the errors are
ResourceNotFoundException and ignore them if so.

Closes #46705

Backports #46721

…astic#46721)

When the stop API is called while the task is running there is
a chance the task gets marked completed twice. This may cause
undesired side effects, like indexing the progress document a second
time after the stop API has returned (the cause for elastic#46705).

This commit adds a check that the task has not been completed before
proceeding to mark it so. In addition, when we update the task's state
we could get some warnings that the task was missing if the stop API
has been called in the meantime. We now check the errors are
`ResourceNotFoundException` and ignore them if so.

Closes elastic#46705

Backports elastic#46721
@dimitris-athanasiou dimitris-athanasiou added >test Issues or PRs that are addressing/adding tests :ml Machine learning backport v7.5.0 labels Sep 15, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core

@dimitris-athanasiou dimitris-athanasiou merged commit 63eb0d9 into elastic:7.x Sep 15, 2019
@dimitris-athanasiou dimitris-athanasiou deleted the avoid-marking-df-analytics-task-completed-twice-7x branch September 15, 2019 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :ml Machine learning >test Issues or PRs that are addressing/adding tests v7.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants