YongGang commented on PR #14880: URL: https://github.com/apache/druid/pull/14880#issuecomment-1728094641
> I wonder if it wouldn't be better to just call `cleanup` from inside `stopGracefully` rather than adding a latch and waiting on it. Task can only do `cleanUp` when it stopped running otherwise we don't know the exact status of it. For task like `AbstractBatchIndexTask` it interrupt thread to make it stop running, but its timing is not deterministic. Here we use latch to give the task time to stop and do cleanUp work. -- 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]
