abhishekrb19 commented on code in PR #15710:
URL: https://github.com/apache/druid/pull/15710#discussion_r1456596356


##########
server/src/main/java/org/apache/druid/client/indexing/ClientKillUnusedSegmentsTaskQuery.java:
##########
@@ -50,16 +52,23 @@ public ClientKillUnusedSegmentsTaskQuery(
       @JsonProperty("interval") Interval interval,
       @JsonProperty("markAsUnused") @Deprecated Boolean markAsUnused,
       @JsonProperty("batchSize") Integer batchSize,
-      @JsonProperty("limit") Integer limit
+      @JsonProperty("limit") @Nullable Integer limit,
+      @JsonProperty("maxUsedFlagLastUpdatedTime") @Nullable DateTime 
maxUsedFlagLastUpdatedTime
   )
   {
-    this.id = Preconditions.checkNotNull(id, "id");
+    if (id == null) {
+      throw InvalidInput.exception("kill task id cannot be null");
+    }
+    if (limit != null && limit <= 0) {

Review Comment:
   Yeah, I didn't add the other validations for `batchSize` intentionally 
because the default batch size is being maintained by the kill task 
`org.apache.druid.indexing.common.task.KillUnusedSegmentsTask#DEFAULT_SEGMENT_NUKE_BATCH_SIZE`,
 so failing it here would break existing customers. While it'd be nice to have 
these validations in the client facing payload, we can move things around, I 
didn't want to expand the scope of the PR



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