[
https://issues.apache.org/jira/browse/TEZ-4193?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gurleen S Dhody updated TEZ-4193:
---------------------------------
Fix Version/s: (was: 0.9.3)
0.9.1
Target Version/s: 0.9.1 (was: 0.9.2, 0.9.3)
Affects Version/s: (was: 0.9.3)
0.9.1
> Async DIspatcher drained property
> ---------------------------------
>
> Key: TEZ-4193
> URL: https://issues.apache.org/jira/browse/TEZ-4193
> Project: Apache Tez
> Issue Type: Bug
> Affects Versions: 0.9.1
> Reporter: Gurleen S Dhody
> Priority: Minor
> Labels: AsyncDispatcher, Dispatcher, Tez, async, dispatch
> Fix For: 0.9.1
>
>
> [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
> {code:java}
> // drained = false;
> {code}
>
> [https://github.com/apache/tez/blob/cf111b1c896db94d40ea92fc6da2a6fcce356114/tez-common/src/main/java/org/apache/tez/common/AsyncDispatcher.java#L332
>
> |https://github.com/apache/tez/blob/cf111b1c896db94d40ea92fc6da2a6fcce356114/tez-common/src/main/java/org/apache/tez/common/AsyncDispatcher.java#L332]here.
> Reason is that the thread on the event queue might already be empty and
> waiting on
> [https://github.com/apache/tez/blob/cf111b1c896db94d40ea92fc6da2a6fcce356114/tez-common/src/main/java/org/apache/tez/common/AsyncDispatcher.java#L106
>
> |https://github.com/apache/tez/blob/cf111b1c896db94d40ea92fc6da2a6fcce356114/tez-common/src/main/java/org/apache/tez/common/AsyncDispatcher.java#L106]new
> event.
> 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
> [https://github.com/apache/tez/blob/cf111b1c896db94d40ea92fc6da2a6fcce356114/tez-common/src/main/java/org/apache/tez/common/AsyncDispatcher.java#L146]
> 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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
