Skip to content

[7.4][ML] Avoid marking data frame analytics task completed twice (#4…#46725

Merged
dimitris-athanasiou merged 1 commit intoelastic:7.4from
dimitris-athanasiou:avoid-marking-df-analytics-task-completed-twice-7_4
Sep 15, 2019
Merged

[7.4][ML] Avoid marking data frame analytics task completed twice (#4…#46725
dimitris-athanasiou merged 1 commit intoelastic:7.4from
dimitris-athanasiou:avoid-marking-df-analytics-task-completed-twice-7_4

Conversation

@dimitris-athanasiou
Copy link
Copy Markdown
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.4.0 labels Sep 15, 2019
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/ml-core

@dimitris-athanasiou
Copy link
Copy Markdown
Contributor Author

run elasticsearch-ci/default-distro

@dimitris-athanasiou dimitris-athanasiou merged commit 0893e55 into elastic:7.4 Sep 15, 2019
@dimitris-athanasiou dimitris-athanasiou deleted the avoid-marking-df-analytics-task-completed-twice-7_4 branch September 15, 2019 15:00
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.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants