zpinto commented on code in PR #2661:
URL: https://github.com/apache/helix/pull/2661#discussion_r1373751110


##########
helix-core/src/main/java/org/apache/helix/controller/dataproviders/BaseControllerDataProvider.java:
##########
@@ -858,6 +886,42 @@ private void 
updateDisabledInstances(Collection<InstanceConfig> instanceConfigs,
     }
   }
 
+  private void updateSwappingInstances(Collection<InstanceConfig> 
instanceConfigs,

Review Comment:
   `updateSwappingInstances` is called by `doRefresh` which is a `synchronized` 
method; therefore, only one thread will call this method.
   
   All of the other places this method is called from are in this classes 
setters which are only used in unit tests and HelixUtil code which is not 
invoked in the controller.
   
   We could technically make this method `synchronized` as well just to be 
safe. Initially I didn't do this, as I was following standard for 
`updateDisabledInstances`, etc.



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