You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/04/22 19:26:24 UTC

[GitHub] [incubator-druid] gianm commented on a change in pull request #7088: Improve parallelism of zookeeper based segment change processing

gianm commented on a change in pull request #7088: Improve parallelism of zookeeper based segment change processing
URL: https://github.com/apache/incubator-druid/pull/7088#discussion_r277404646
 
 

 ##########
 File path: server/src/main/java/org/apache/druid/server/coordinator/CuratorLoadQueuePeon.java
 ##########
 @@ -406,11 +409,11 @@ public void addCallback(LoadPeonCallback newCallback)
       }
     }
 
-    LoadPeonCallback[] getCallbacks()
+    List<LoadPeonCallback> snapshotCallbacks()
     {
       synchronized (callbacks) {
         // Return a copy so that callers get a consistent view
 
 Review comment:
   I think @samarthjain's comment is fine. It's clear from context and from the comment that a copy of the List is being made so callers can iterate/read it without running into issues due to concurrent modification of that List by another thread. It is implied that the concurrency model of the class allows / expects this sort of usage.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org