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


##########
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:
   FineGrainedTaskManagerTracker.taskManagerRegistrations map a concurrent map. 
But what about the other maps in the FineGrainedTaskManagerTracker? My point is 
that this component doesn't claim to be thread-safe. I don't want to make it 
partially thread-safe, as that could confuse future readers of this class. 
That's why I moved the synchronization logic up.



##########
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:
   @davidradl
   FineGrainedTaskManagerTracker.taskManagerRegistrations map a concurrent map. 
But what about the other maps in the FineGrainedTaskManagerTracker? My point is 
that this component doesn't claim to be thread-safe. I don't want to make it 
partially thread-safe, as that could confuse future readers of this class. 
That's why I moved the synchronization logic up.



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