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


##########
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:
   Hi @davidradl, thanks for looking at this PR. 
   Can you elaborate more on what you mean? 
   If I understand that correctly then a synchronization on 
slotManagerMetricGroup level wouldn't help because the 
`ConcurrentModificationException` is still possible if the 
`FineGrainedTaskManagerTracker#addTaskManager` or the 
`FineGrainedTaskManagerTracker#removeTaskManager` is called from the main 
thread at the same time. 



##########
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:
   Hi @davidradl, thanks for looking at this PR. 
   
   Can you elaborate more on what you mean? 
   
   If I understand that correctly then a synchronization on 
slotManagerMetricGroup level wouldn't help because the 
`ConcurrentModificationException` is still possible if the 
`FineGrainedTaskManagerTracker#addTaskManager` or the 
`FineGrainedTaskManagerTracker#removeTaskManager` is called from the main 
thread at the same time. 



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