yupeng9 commented on a change in pull request #5631:
URL: https://github.com/apache/incubator-pinot/pull/5631#discussion_r449787052
##########
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:
Sure. Please have the helix team take a look.
There is some caveat of not adding the constraint when the config is not
set: do we need to add logic removing the constraint if the config is not
present? Otherwise it's possible that the constraint is left there, when users
remove this configuration. What about if there are inconsistent configurations,
with the configuration set on one controller but not others (which will lead to
race condition)? Usually having the configuration with a default value makes
such issues more manageable.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]