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


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/KillUnusedSegmentsTask.java:
##########
@@ -341,6 +342,15 @@ private NavigableMap<DateTime, List<TaskLock>> 
getNonRevokedTaskLockMap(TaskActi
     return taskLockMap;
   }
 
+  @Override
+  public boolean isReady(TaskActionClient taskActionClient) throws Exception
+  {
+    if (markAsUnused) {
+      return super.isReady(taskActionClient);
+    }
+    return super.isReady(taskActionClient, 
getContextValue(Tasks.TASK_LOCK_TYPE, TaskLockType.SHARED));

Review Comment:
   @AmatyaAvadhanula @IgorBerman  what would it mean to use shared locks when 
multiple kill tasks for a datasource are submitted with the same interval or 
different overlapping intervals? Would the kill tasks result in the same state 
as if they were run sequentially guaranteeing idempotence in steady state, or 
could concurrent kill tasks step on each other and cause problems with metadata 
and deep storage cleanup?



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