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


##########
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:
   nit: should we add the other validation aroun batchSize and markAsUnused 
with limit as is being done in the task itself, or just allow the task to fail 
if those constraints are violated?



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