clintropolis commented on a change in pull request #6898: Prohibit assigning 
concurrent maps into Map-typed variables and fields and fix a race condition in 
CoordinatorRuleManager
URL: https://github.com/apache/incubator-druid/pull/6898#discussion_r253337110
 
 

 ##########
 File path: 
server/src/main/java/org/apache/druid/curator/discovery/CuratorDruidNodeDiscoveryProvider.java
 ##########
 @@ -67,7 +67,7 @@
 
   private ExecutorService listenerExecutor;
 
-  private final Map<NodeType, NodeTypeWatcher> nodeTypeWatchers = new 
ConcurrentHashMap<>();
+  private final ConcurrentHashMap<NodeType, NodeTypeWatcher> nodeTypeWatchers 
= new ConcurrentHashMap<>();
 
 Review comment:
   `computeIfAbsent` is called on this one, 
https://github.com/apache/incubator-druid/blob/101ca9c00f5fd3721abc01add0aa2b81afcf381d/server/src/main/java/org/apache/druid/curator/discovery/CuratorDruidNodeDiscoveryProvider.java#L91

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to