-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Conversation
Pinging @elastic/ml-core (:ml) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this 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() { |
There was a problem hiding this comment.
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.
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
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 aParentTaskAssigningClient
so the parent id had to be added to each request. The only other option I could think of is to create aOriginSettingParentTaskAssigningClient
class.