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 2020/12/10 22:32:56 UTC

[GitHub] [helix] dasahcc commented on a change in pull request #1579: Task Current State Migration: helix-rest, utils, tests changes

dasahcc commented on a change in pull request #1579:
URL: https://github.com/apache/helix/pull/1579#discussion_r540545390



##########
File path: helix-core/src/main/java/org/apache/helix/util/InstanceValidationUtil.java
##########
@@ -188,11 +187,7 @@ public static boolean hasErrorPartitions(HelixDataAccessor dataAccessor, String
     if (liveInstance != null) {
       String sessionId = liveInstance.getEphemeralOwner();
 
-      PropertyKey currentStatesKey = propertyKeyBuilder.currentStates(instanceName, sessionId);
-      List<String> resourceNames = dataAccessor.getChildNames(currentStatesKey);
-      for (String resourceName : resourceNames) {
-        PropertyKey key = propertyKeyBuilder.currentState(instanceName, sessionId, resourceName);
-
+      for (PropertyKey key : getAllCurrentStateKeys(dataAccessor, instanceName, sessionId)) {

Review comment:
       This is not necessary to instance validation util. Because this management API is used for check real data resource. Our split could even better to filter out the TASK current state.

##########
File path: helix-rest/src/main/java/org/apache/helix/rest/server/service/InstanceServiceImpl.java
##########
@@ -119,19 +120,25 @@ public InstanceInfo getInstanceInfo(String clusterId, String instanceName,
       instanceInfoBuilder.liveInstance(liveInstance.getRecord());
       String sessionId = liveInstance.getEphemeralOwner();
 
+      Map<String, PropertyKey> resourcePropertyKeyPair = new HashMap<>();

Review comment:
       Same here. We dont care about tasks for management API.




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



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