Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
0.9.1
-
None
-
Patch
Description
https://github.com/apache/tez/blob/cf111b1c896db94d40ea92fc6da2a6fcce356114/tez-common/src/main/java/org/apache/tez/common/AsyncDispatcher.java#L318
The drained property should be set after all dispatchers in the handle() https://github.com/apache/tez/blob/cf111b1c896db94d40ea92fc6da2a6fcce356114/tez-common/src/main/java/org/apache/tez/common/AsyncDispatcher.java#L311
function are checked for.
We should set
// drained = false;
Reason is that the thread on the event queue might already be empty and waiting on
Setting drained as false but passing the event to another dispatcher will cause issue when stopping this dispatcher service, when drainEventsOnStop is set true. The thread will be stuck in queue and drained property will be false causing a deadlock here
Needs to be addressed in https://github.com/apache/tez/blob/cf111b1c896db94d40ea92fc6da2a6fcce356114/tez-common/src/main/java/org/apache/tez/common/AsyncDispatcherConcurrent.java in AsyncConcurrecyDispatcher as well.