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

[ML] Set parent task Id on ml expired data removers #62854

Merged
merged 1 commit into from
Sep 28, 2020

Conversation

davidkyle
Copy link
Member

Set the parent task Id (of the delete expired data action) on the expired data removers.
This makes it easier to track and cancel long running tasks

The data removers all use OriginSettingClient which I couldn't replace for a ParentTaskAssigningClient so the parent id had to be added to each request. The only other option I could think of is to create a OriginSettingParentTaskAssigningClient class.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (:ml)

Copy link
Contributor

@droberts195 droberts195 left a comment

Choose a reason for hiding this comment

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

LGTM

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

this.parentTaskId = parentTaskId;
}

protected TaskId getParentTaskId() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering if it would make sense for this method to be a part of the MlDataRemover interface.

@davidkyle davidkyle merged commit b9cd9ec into elastic:master Sep 28, 2020
@davidkyle davidkyle deleted the parent-task branch September 28, 2020 16:21
davidkyle added a commit to davidkyle/elasticsearch that referenced this pull request Sep 28, 2020
Setting the parent task Id (of the delete expired data action) on the ML
expired data removers makes it easier to track and cancel long running
tasks
# Conflicts:
#	x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/retention/ExpiredForecastsRemover.java
#	x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/retention/ExpiredModelSnapshotsRemover.java
davidkyle added a commit that referenced this pull request Oct 2, 2020
Setting the parent task Id (of the delete expired data action) on the ML
expired data removers makes it easier to track and cancel long running
tasks
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.

5 participants