kfaraz commented on code in PR #17775:
URL: https://github.com/apache/druid/pull/17775#discussion_r2009831186


##########
server/src/main/java/org/apache/druid/server/coordinator/loading/HttpLoadQueuePeon.java:
##########
@@ -223,7 +196,12 @@ private void doSegmentManagement()
     }
 
     final SegmentLoadingMode loadingMode = loadingModeSupplier.get();
-    int batchSize = calculateBatchSize(loadingMode);
+    final int batchSize = calculateBatchSize(loadingMode);
+
+    if (batchSize < 1) {
+      log.error("Batch size must be greater than 0.");
+      throw new RE("Batch size must be greater than 0.");
+    }

Review Comment:
   Yes, configs should be validated on startup itself. There is not much use 
doing the validation and throwing an exception when we use the config values.
   
   You can create a follow up PR to do the validation.



-- 
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: [email protected]

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