Skip to content

[7.x][ML] Avoid marking data frame analytics task completed twice (#4…#46724

Merged
dimitris-athanasiou merged 1 commit intoelastic:7.xfrom
dimitris-athanasiou:avoid-marking-df-analytics-task-completed-twice-7x
Sep 15, 2019
Merged

[7.x][ML] Avoid marking data frame analytics task completed twice (#4…#46724
dimitris-athanasiou merged 1 commit intoelastic:7.xfrom
dimitris-athanasiou:avoid-marking-df-analytics-task-completed-twice-7x

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.5.0 labels Sep 15, 2019
@elasticmachine
Copy link
Copy Markdown
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
@ayatullam12-gif
Copy link
Copy Markdown

1 similar comment
@ayatullam12-gif
Copy link
Copy Markdown

@ayatullam12-gif
Copy link
Copy Markdown

89105 46724

@ayatullam12-gif
Copy link
Copy Markdown

iam_zara_khan_123

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.

3 participants