forked from apache/druid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix duplicate compaction task launched by OverlordCompactionScheduler (…
…apache#17287) 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.
- Loading branch information
Showing
15 changed files
with
153 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.