Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Duplicate
-
2.7.0
-
None
-
None
-
None
Description
DrainDispatcher#await should wait till event has been completely handled.
Currently it only checks for whether event queue has become empty.
And in many tests we directly check for a state to be changed after calling await.
Sometimes, the states do not change by the time we check them as event has not been completely handled.
This is causing test failures such as YARN-3909 and YARN-3910 and may cause other test failures as well.
Attachments
Attachments
Issue Links
- is duplicated by
-
YARN-3909 TestAMRMRPCNodeUpdates#testAMRMUnusableNodes fails on trunk
- Resolved
-
YARN-3910 TestRMAppTransitions#testAppAcceptedAttemptKilled fails on trunk
- Resolved
-
YARN-3913 TestResourceTrackerService#testReconnectNode fails on trunk
- Resolved
-
YARN-3918 TestApplicationCleanup#testContainerCleanup occasionally fails on trunk
- Resolved
-
YARN-3878 AsyncDispatcher can hang while stopping if it is configured for draining events on stop
- Closed
- relates to
-
YARN-3909 TestAMRMRPCNodeUpdates#testAMRMUnusableNodes fails on trunk
- Resolved
-
YARN-3910 TestRMAppTransitions#testAppAcceptedAttemptKilled fails on trunk
- Resolved
-
YARN-3878 AsyncDispatcher can hang while stopping if it is configured for draining events on stop
- Closed
In
YARN-3878we introduced check for whether event queue is empty in DrainDispatcher#await.Even pre
YARN-3878, code was essentially doing the same but that was through a volatile flag. That may have failed sometimes as well.But changes to volatile flag were not seen by other thread as quickly as checking for event queue being empty hence few of these tests were not failing and allowing async dispatcher to handle the event.
We should ideally check whether event has been handled in addition to event queue being empty.