kfaraz commented on a change in pull request #11190:
URL: https://github.com/apache/druid/pull/11190#discussion_r625753895



##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/duty/CompactSegments.java
##########
@@ -154,6 +160,17 @@ public DruidCoordinatorRuntimeParams 
run(DruidCoordinatorRuntimeParams params)
           }
         }
 
+        // Skip all the locked intervals
+        LOG.debug(
+            "Skipping the following intervals for Compaction as they are 
currently locked: %s",
+            taskToLockedIntervals
+        );
+        taskToLockedIntervals.forEach(
+            (taskId, datasourceIntervals) -> compactionTaskIntervals
+                .computeIfAbsent(datasourceIntervals.getDatasource(), ds -> 
new ArrayList<>())
+                .addAll(datasourceIntervals.getIntervals())
+        );
+
         final CompactionSegmentIterator iterator =
             policy.reset(compactionConfigs, dataSources, 
compactionTaskIntervals);

Review comment:
       Yeah, should we just call it `skipIntervals`?




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

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