kfaraz commented on code in PR #18028:
URL: https://github.com/apache/druid/pull/18028#discussion_r2121694889
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/duty/UnusedSegmentsKiller.java:
##########
@@ -219,15 +222,18 @@ private boolean shouldResetKillQueue()
}
/**
- * Resets the kill queue with fresh jobs.
+ * Clears the kill queue and adds fresh jobs.
* This method need not handle race conditions as it is always run on
* {@link #exec} which is single-threaded.
*/
- private void resetKillQueue()
+ private void rebuildKillQueue()
{
final Stopwatch resetDuration = Stopwatch.createStarted();
try {
killQueue.clear();
+ if (!leaderSelector.isLeader()) {
Review Comment:
Ah, thanks for catching it!
--
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]