leventov commented on a change in pull request #8236: Add TaskResourceCleaner; 
fix a couple of concurrency bugs in batch tasks
URL: https://github.com/apache/incubator-druid/pull/8236#discussion_r312556516
 
 

 ##########
 File path: 
indexing-service/src/main/java/org/apache/druid/indexing/common/task/Task.java
 ##########
 @@ -164,7 +164,10 @@ default int getPriority()
    * Asks a task to arrange for its "run" method to exit promptly. Tasks that 
take too long to stop gracefully will be
    * terminated with extreme prejudice.
    *
-   * This method can be called at any time while {@link #run} is being called 
when the task is killed.
+   * This method can be called at any time while {@link #run} is being called 
when the task is killed. If this task
+   * is not started yet, that is {@link #run} is not called yet, this method 
will be never called.
+   * Once this task is started, this method can be called even after {@link 
#run} returns. Implementations of this
+   * method may want to avoid unnecessary work if {@link #run} already 
returned.
    * Depending on the task executor type, one of the two cases below can 
happen when the task is killed.
 
 Review comment:
   It would be clearer if there was an empty line above this line and no empty 
line below this line.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to