davidradl commented on code in PR #27257:
URL: https://github.com/apache/flink/pull/27257#discussion_r2559290688


##########
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/FineGrainedSlotManager.java:
##########
@@ -227,10 +238,26 @@ public void start(
     }
 
     private void registerSlotManagerMetrics() {
-        slotManagerMetricGroup.gauge(

Review Comment:
   @ztison I see that this change is ensuring that some fields in 
FineGrainedManager are updated on the same thread, so they cannot be 
concurrently modified. If the code modifying these fields were synchronized on 
the FineGrainedManager object, then thread 1 would get the lock and make the 
updates, then if thread 2 tries to update the same object, it would also 
request the lock, which it would only get, when thread 1 completed its updates. 
So it would ensure only one thread ever updated the fields.     



-- 
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]

Reply via email to