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


##########
pinot-core/src/main/java/org/apache/pinot/server/realtime/ControllerLeaderLocator.java:
##########
@@ -59,21 +61,23 @@ public class ControllerLeaderLocator {
 
   ControllerLeaderLocator(HelixManager helixManager) {
     _helixManager = helixManager;
-    _cachedControllerLeaderMap = new HashMap<>();
+    _cachedControllerLeaderMap = new ConcurrentHashMap<>();
   }
 
   /**
    * To be called once when the server starts
    * @param helixManager should already be started
    */
   public static void create(HelixManager helixManager) {
-    if (_instance != null) {
-      // We create multiple server instances in the hybrid cluster integration 
tests, so allow the call to create an
-      // instance even if there is already one.
-      LOGGER.warn("Already created");
-      return;
+    if (_instance == null) {

Review Comment:
   This is called only once during server starts, which is always single 
threaded. I don't think we need to synchronize this



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to