egor-ryashin commented on a change in pull request #6606: Simplify 
DruidNodeDiscoveryProvider; add 
DruidNodeDiscovery.Listener.nodeViewInitialized()
URL: https://github.com/apache/incubator-druid/pull/6606#discussion_r237557140
 
 

 ##########
 File path: 
server/src/main/java/org/apache/druid/discovery/DruidNodeDiscoveryProvider.java
 ##########
 @@ -139,45 +150,39 @@ public void nodesAdded(List<DiscoveryDruidNode> 
nodesDiscovered)
             }
           }
 
-          ImmutableList<DiscoveryDruidNode> newNodesAdded = null;
-          if (uninitializedNodeTypeListeners.isEmpty()) {
-            newNodesAdded = builder.build();
-          } else if (uninitializedNodeTypeListeners.remove(this) && 
uninitializedNodeTypeListeners.isEmpty()) {
 
 Review comment:
   Right after it's initialized we propagate all accumulated `nodes` to the 
listener (old version), in the new version we don't. Could we make javadoc 
comments to the class which explain the purpose of the new behaviour, why it's 
better?

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