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/05 16:56:26 UTC

[GitHub] [helix] mgao0 commented on a diff in pull request #2015: Refactor common string processing util

mgao0 commented on code in PR #2015:
URL: https://github.com/apache/helix/pull/2015#discussion_r843053284


##########
helix-core/src/main/java/org/apache/helix/model/InstanceConfig.java:
##########
@@ -287,11 +267,18 @@ public void setInstanceEnabled(boolean enabled) {
     _record.setLongField(InstanceConfigProperty.HELIX_ENABLED_TIMESTAMP.name(),
         System.currentTimeMillis());
     if (enabled) {
-      _record.getSimpleFields().remove(InstanceConfigProperty.HELIX_DISABLED_REASON.toString());
-      _record.getSimpleFields().remove(InstanceConfigProperty.HELIX_DISABLED_TYPE.toString());
+      resetInstanceDisabledTypeAndReason();
     }
   }
 
+  /**
+   * Removes HELIX_DISABLED_REASON and HELIX_DISABLED_TYPE entry from simple field.
+   */
+  public void resetInstanceDisabledTypeAndReason() {

Review Comment:
   Can we make this a private method?



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