Jackie-Jiang commented on code in PR #11679:
URL: https://github.com/apache/pinot/pull/11679#discussion_r1337612141


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/SegmentCompletionManager.java:
##########
@@ -122,51 +115,30 @@ protected StreamPartitionMsgOffsetFactory 
getStreamPartitionMsgOffsetFactory(LLC
     return 
StreamConsumerFactoryProvider.create(streamConfig).createStreamMsgOffsetFactory();
   }
 
-  // We need to make sure that we never create multiple FSMs for the same 
segment
-  // Obtain locks based on segment name, so as to disallow same segment names 
entering together

Review Comment:
   Yes, we should use `ConcurrentHashMap.computeIfAbsent()` to achieve this 
instead of adding lock. The old code uses `get()` which doesn't provide the 
same guarantee



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to