While working on YARN-4512, I noticed there are potential race conditions in RegisterNodeManagerRequestPBImpl. We need to add more locking.
Provide a knob to turn on over-allocation
Trivial patch that adds synchronization similar to NodeStatusPBImpl and does a little more cleanup while at it.
+1 to the patch, just curious when race condition could happen.
One case could be when getProto (calls mergeLocalToBuilder -> addRunningApplicationsToProto) is called concurrently with setRunningApplications.
Forgot to kick-off Jenkins. Will go ahead and commit this based on Wangda's +1 if Jenkins is fine with it.
This message was automatically generated.
Oh missed the synchronization on getProto. Updated patch takes care of that too.
The checkstyle errors are benign. No unit test since the patch only adds synchronization.
Checking this in, based on Wangda's +1 earlier.
FAILURE: Integrated in Hadoop-trunk-Commit #9209 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9209/)
YARN-4647. Make RegisterNodeManagerRequestPBImpl thread-safe. (kasha) (kasha: rev c9a09d6926b258e205a4ff7998ce5a86bf5dbe3b)
Thanks for the review, Wangda. Just committed this to trunk and branch-2.