[ML] Complete the Data Frame task on stop#41752
Conversation
|
Pinging @elastic/ml-core |
benwtrent
left a comment
There was a problem hiding this comment.
Since we are removing the persistent task from cluster state when stop is called, there is no way to start it again from where the cursor is currently located.
Are there plans to check the IndexerState when onSaveState is called and determining if a indexed snapshot of the current cursor position and checkpoint should be made?
I think something like:
if (indexerState.equals(IndexerState.DELETING)) { ...take snapshot...}
would be a good idea. That way when start is called again, the previous cursor position can be loaded up from the index.
...n/java/org/elasticsearch/xpack/dataframe/action/TransportDeleteDataFrameTransformAction.java
Outdated
Show resolved
Hide resolved
...n/java/org/elasticsearch/xpack/dataframe/action/TransportDeleteDataFrameTransformAction.java
Outdated
Show resolved
Hide resolved
|
There was a failure in test clean up after the multi node tests I made the stop action delegate to the master node for coordinating responses which should fix the problem |
benwtrent
left a comment
There was a problem hiding this comment.
We should consider taking snapshots of the current cursor position and checkpoint so that transforms can be stopped, and then started again from the same spot.
There was a problem hiding this comment.
Boolean.True should probably just be true
f8e626b to
c6b1047
Compare
This changes the behaviour of delete to simply remove the config after checking the DF does not have a running P task
c6b1047 to
51a17f0
Compare
|
run elasticsearch-ci/1 |
1 similar comment
|
run elasticsearch-ci/1 |
Wait for indexer to stop then complete the persistent task on stop. If the wait_for_completion is true the request will not return until stopped.
Wait for indexer to stop then complete the persistent task on stop. If the wait_for_completion is true the request will not return until stopped.
A call to
stop()will cause the indexer to stop shortly after when the next search returns. The persistent task can only be completed once the indexer is stopped otherwise we have a zombie indexer spinning away but not accessible to the task manager. If thewait_for_completionflag is true the stop requests waits for the persistent task to complete.I added a
onStopevent which is fired when the indexer stops. Note this is different toonFinishwhich is triggered when the indexer completes the current phase.Delete is changed to simply check if the task is active and if not delete the data frame transform config.