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


##########
server/src/main/java/org/apache/druid/server/coordinator/duty/KillUnusedSegments.java:
##########
@@ -166,4 +195,75 @@ private Interval findIntervalForKill(String dataSource)
     }
   }
 
+  private int getAvailableKillTaskSlots(@Nullable Double killTaskSlotRatio)
+  {
+    return Math.max(0, getKillTaskCapacity(killTaskSlotRatio) - 
getNumActiveKillTaskSlots());
+  }
+
+  private int getNumActiveKillTaskSlots()
+  {
+    final CloseableIterator<TaskStatusPlus> activeTasks =
+        FutureUtils.getUnchecked(overlordClient.taskStatuses(null, null, 0), 
true);

Review Comment:
   I think this counts completed kill tasks against the limit, I used code 
similar to that introduced in https://github.com/apache/druid/pull/14581. So 
auto compaction I think has same bug



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