YongGang commented on code in PR #14880:
URL: https://github.com/apache/druid/pull/14880#discussion_r1300368896
##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/AbstractTask.java:
##########
@@ -178,14 +183,24 @@ public final TaskStatus run(TaskToolbox taskToolbox)
throws Exception
throw e;
}
finally {
- cleanUp(taskToolbox, taskStatus);
+ try {
+ cleanUp(taskToolbox, taskStatus);
+ }
+ finally {
+ cleanupCompletionLatch.countDown();
+ }
}
}
public abstract TaskStatus runTask(TaskToolbox taskToolbox) throws Exception;
- public void cleanUp(TaskToolbox toolbox, TaskStatus taskStatus) throws
Exception
+ protected void cleanUp(TaskToolbox toolbox, TaskStatus taskStatus) throws
Exception
{
+ if (Thread.currentThread().isInterrupted()) {
+ // clears the interrupted status so the subsequent cleanup work can
continue without interruption
+ Thread.interrupted();
Review Comment:
I'm not exact sure whether this has a wider impact on somewhere else. fyi
@kfaraz
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]