suneet-s commented on a change in pull request #10284:
URL: https://github.com/apache/druid/pull/10284#discussion_r546171041



##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/CoordinatorDynamicConfig.java
##########
@@ -123,6 +125,12 @@ public CoordinatorDynamicConfig(
     this.mergeBytesLimit = mergeBytesLimit;
     this.mergeSegmentsLimit = mergeSegmentsLimit;
     this.maxSegmentsToMove = maxSegmentsToMove;
+    // This helps with ease of migration to the new config, but could confuse 
users. Docs explicitly state this value must be > 0
+    if (percentOfSegmentsToConsiderPerMove <= 0 || 
percentOfSegmentsToConsiderPerMove > 100) {
+      this.percentOfSegmentsToConsiderPerMove = 100;

Review comment:
       Since this is a json configured property, I think we should throw an 
exception here so the user knows they've done something incorrect.
   
   EDIT: Something like
   `Preconditions.checkArgument(percentOfSegmentsToConsiderPerMove > 0 && 
percentOfSegmentsToConsiderPerMove <= 100, "percentOfSegmentsToConsiderPerMove 
should be between 0 and 100!");`




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

Reply via email to