adarshsanjeev commented on code in PR #17775:
URL: https://github.com/apache/druid/pull/17775#discussion_r2009786957
##########
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:
Is the idea to have validated configs so that we validate it on startup
instead of when we need the config during runtime?
Looking at these config classes, that doesn't seem to be the convention,
there is no validation for any other config, and some config classes
`SegmentLoaderConfig` would require some refactor to have a constructor to do
such validation on init.
--
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]