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

[Transform] Halt Indexer on Stop/Abort API #107792

Merged
merged 3 commits into from Apr 25, 2024
Merged

Conversation

prwhelan
Copy link
Member

When _stop?wait_for_checkpoint=false and
_stop?force=true&wait_for_checkpoint=false are called, there is a small chance that the Transform Indexer thread will run if it is scheduled before the stop API is called but before the threadpool runs the executable. The onStart method now checks the state of the indexer before executing. This will mitigate errors caused by reading from Transform internal indices while the Task is stopped or deleted.

This does not impact when wait_for_checkpoint=true, because the indexer state will remain INDEXING until the checkpoint is finished.

Relate #107266

When `_stop?wait_for_checkpoint=false` and
`_stop?force=true&wait_for_checkpoint=false` are called, there is a
small chance that the Transform Indexer thread will run if it is
scheduled before the stop API is called but before the threadpool runs
the executable. The `onStart` method now checks the state of the
indexer before executing. This will mitigate errors caused by reading
from Transform internal indices while the Task is stopped or deleted.

This does not impact when `wait_for_checkpoint=true`, because the
indexer state will remain `INDEXING` until the checkpoint is finished.

Relate elastic#107266
@prwhelan prwhelan added >bug :ml/Transform Transform Team:ML Meta label for the ML team labels Apr 23, 2024
@elasticsearchmachine
Copy link
Collaborator

Hi @prwhelan, I've created a changelog YAML for you.

@prwhelan prwhelan marked this pull request as ready for review April 23, 2024 21:08
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)

@przemekwitek przemekwitek self-requested a review April 24, 2024 09:16
Copy link
Contributor

@przemekwitek przemekwitek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@prwhelan prwhelan merged commit 3e6df26 into elastic:main Apr 25, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :ml/Transform Transform Team:ML Meta label for the ML team v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants