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] stop transform regardless of transform nodes #69419

Merged

Conversation

hendrikmuhs
Copy link

@hendrikmuhs hendrikmuhs commented Feb 23, 2021

allow stop transform to stop a transform task if its waiting for assignment(e.g. if
the cluster lacks a transform node)

fixes #69260

@hendrikmuhs hendrikmuhs force-pushed the transform-no-transform-node-stop branch from e6628b8 to 2e4d72c Compare February 23, 2021 11:09
@hendrikmuhs hendrikmuhs marked this pull request as ready for review February 23, 2021 13:04
@elasticmachine elasticmachine added the Team:ML Meta label for the ML team label Feb 23, 2021
@elasticmachine
Copy link
Collaborator

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

@hendrikmuhs
Copy link
Author

run elasticsearch-ci/bwc

Copy link
Member

@davidkyle davidkyle left a comment

Choose a reason for hiding this comment

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

LGTM

}, e -> {
if (e instanceof ResourceNotFoundException) {
Tuple<Set<String>, Set<String>> runningTasksAndNodes = findTasksWithoutConfig(state, request.getId());
if (runningTasksAndNodes.v1().isEmpty()) {
listener.onFailure(e);
// found transforms without a config
} else if (request.isForce()) {
// TODO: handle tasks waiting for assignment
Copy link
Contributor

Choose a reason for hiding this comment

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

So, what is there left to do? Aren't waiting tasks handled by cancelTransformTasksWithNoAssignment?

Copy link
Author

Choose a reason for hiding this comment

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

this is the special case were the transform "lost" the configuration, meaning it could not be found in the transform index. This happens if you e.g. manually delete the document or the whole index.

I still think we should handle it, but I like to postpone it to the follow up, I added the todo there.

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

@hendrikmuhs hendrikmuhs merged commit 4b6c280 into elastic:master Feb 24, 2021
@hendrikmuhs hendrikmuhs deleted the transform-no-transform-node-stop branch February 24, 2021 11:58
hendrikmuhs pushed a commit to hendrikmuhs/elasticsearch that referenced this pull request Feb 24, 2021
allow stop transform to stop a transform task if its waiting for assignment(e.g. if
the cluster lacks a transform node)

fixes elastic#69260
hendrikmuhs pushed a commit to hendrikmuhs/elasticsearch that referenced this pull request Feb 24, 2021
allow stop transform to stop a transform task if its waiting for assignment(e.g. if
the cluster lacks a transform node)

fixes elastic#69260
hendrikmuhs pushed a commit that referenced this pull request Feb 24, 2021
#69526)

allow stop transform to stop a transform task if its waiting for assignment(e.g. if
the cluster lacks a transform node)

fixes #69260
hendrikmuhs pushed a commit that referenced this pull request Feb 24, 2021
… (#69527)

allow stop transform to stop a transform task if its waiting for assignment(e.g. if
the cluster lacks a transform node)

fixes #69260
hendrikmuhs pushed a commit that referenced this pull request Feb 24, 2021
… (#69528)

allow stop transform to stop a transform task if its waiting for assignment(e.g. if
the cluster lacks a transform node)

fixes #69260
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Transform] can't delete transform, stop start after rolling upgrade / node role change
6 participants