You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2022/04/12 20:24:33 UTC

[GitHub] [helix] junkaixue commented on a diff in pull request #2032: Code refactor and cleanup on instance validation

junkaixue commented on code in PR #2032:
URL: https://github.com/apache/helix/pull/2032#discussion_r848838290


##########
helix-core/src/main/java/org/apache/helix/controller/dataproviders/BaseControllerDataProvider.java:
##########
@@ -798,25 +799,18 @@ private void updateDisabledInstances(Collection<InstanceConfig> instanceConfigs,
     _disabledInstanceSet.clear();
     for (InstanceConfig config : instanceConfigs) {
       Map<String, List<String>> disabledPartitionMap = config.getDisabledPartitionsMap();
-      if (!config.getInstanceEnabled()) {
+      if (!InstanceValidationUtil.isInstanceEnabled(config, clusterConfig)) {

Review Comment:
   Why we need to move the logic to the Util?



##########
helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixAdmin.java:
##########
@@ -1928,10 +1928,7 @@ public ZNRecord update(ZNRecord currentData) {
         }
 
         ClusterConfig clusterConfig = new ClusterConfig(currentData);
-        Map<String, String> disabledInstances = new TreeMap<>();
-        if (clusterConfig.getDisabledInstances() != null) {
-          disabledInstances.putAll(clusterConfig.getDisabledInstances());
-        }

Review Comment:
   If we remove this logic, we may lose the meaning of using updater.



-- 
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: reviews-unsubscribe@helix.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org