mirror of https://github.com/apache/druid.git
3f797c52d0
Description ----------- The `OverlordCompactionScheduler` may sometimes launch a duplicate compaction task for an interval that has just been compacted. This may happen as follows: - Scheduler launches a compaction task for an uncompacted interval. - While the compaction task is running, the `CompactionStatusTracker` does not consider this interval as compactible and returns the `CompactionStatus` as `SKIPPED` for it. - As soon as the compaction task finishes, the `CompactionStatusTracker` starts considering the interval eligible for compaction again. - This interval remains eligible for compaction until the newly published segments are polled from the database. - Once the new segments have been polled, the `CompactionStatus` of the interval changes to `COMPLETE`. Change -------- - Keep track of the `snapshotTime` in `DataSourcesSnapshot`. This time represents the start of the poll. - Use the `snapshotTime` to determine if a poll has happened after a compaction task completed. - If not, then skip the interval to avoid launching duplicate tasks. - For tests, use a future `snapshotTime` to ensure that compaction is always triggered. |
||
---|---|---|
.. | ||
src/test | ||
assembly.xml | ||
pom.xml |