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 2019/10/14 17:10:45 UTC

[GitHub] [helix] dasahcc commented on a change in pull request #510: Fixing rebalance cache issue and stablize the tests.

dasahcc commented on a change in pull request #510: Fixing rebalance cache issue and stablize the tests.
URL: https://github.com/apache/helix/pull/510#discussion_r334579182
 
 

 ##########
 File path: helix-core/src/main/java/org/apache/helix/tools/ClusterVerifiers/StrictMatchExternalViewVerifier.java
 ##########
 @@ -279,17 +303,21 @@ private boolean verifyExternalView(ResourceControllerDataProvider dataCache, Ext
     String stateModelDefName = idealState.getStateModelDefRef();
     StateModelDefinition stateModelDef = cache.getStateModelDef(stateModelDefName);
 
-    Map<String, Map<String, String>> idealPartitionState =
-        new HashMap<String, Map<String, String>>();
-
-    Set<String> liveEnabledInstances = new HashSet<String>(cache.getLiveInstances().keySet());
-    liveEnabledInstances.removeAll(cache.getDisabledInstances());
+    Map<String, Map<String, String>> idealPartitionState = new HashMap<>();
 
     for (String partition : idealState.getPartitionSet()) {
       List<String> preferenceList = AbstractRebalancer
-          .getPreferenceList(new Partition(partition), idealState, liveEnabledInstances);
-      Map<String, String> idealMapping =
-          HelixUtil.computeIdealMapping(preferenceList, stateModelDef, liveEnabledInstances);
+          .getPreferenceList(new Partition(partition), idealState, cache.getEnabledLiveInstances());
+      Map<String, String> idealMapping;
+      if (_isDeactivatedNodeAware) {
+        idealMapping = HelixUtil
 
 Review comment:
   This was a bug in the Util function. But it has been fixed in https://github.com/apache/helix/commit/f6f50c2ab72131be6072a74ec558a9147e979687. Will this change for _isDeactivatedNodeAware necessary.

----------------------------------------------------------------
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: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org