You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/07/03 22:09:11 UTC

[GitHub] [incubator-pinot] mcvsubbu commented on a change in pull request #5631: Add the message constraint on all instances in Helix

mcvsubbu commented on a change in pull request #5631:
URL: https://github.com/apache/incubator-pinot/pull/5631#discussion_r449711597



##########
File path: pinot-controller/src/main/java/org/apache/pinot/controller/ControllerStarter.java
##########
@@ -202,6 +209,20 @@ private void setupHelixSystemProperties() {
             CommonConstants.Helix.DEFAULT_FLAPPING_TIME_WINDOW_MS));
   }
 
+  private void setupHelixClusterConstraints() {
+    String maxMessageLimit = _config.getString(CommonConstants.Helix.CONFIG_OF_HELIX_INSTANCE_MAX_STATE_TRANSITIONS,
+        CommonConstants.Helix.DEFAULT_HELIX_INSTANCE_MAX_STATE_TRANSITIONS);
+    Map<ClusterConstraints.ConstraintAttribute, String> constraintAttributes = new HashMap<>();
+    constraintAttributes.put(ClusterConstraints.ConstraintAttribute.INSTANCE, ".*");
+    constraintAttributes
+        .put(ClusterConstraints.ConstraintAttribute.MESSAGE_TYPE, Message.MessageType.STATE_TRANSITION.name());
+    ConstraintItem constraintItem = new ConstraintItem(constraintAttributes, maxMessageLimit);
+
+    _helixControllerManager.getClusterManagmentTool()

Review comment:
       While this may be a good thing to do, we have often experienced issues with helix, especially the undocumented features. Can we at least make this so that if the config is not set, then we leave the behavior like before?
   
   Meanwhile. I have asked someone from the helix team to take a look at this.




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