Repository navigation
Refresh time-based compaction trigger after option changes - #15427
Open
saikeerthan-14 wants to merge 1 commit into
Open
saikeerthan-14 wants to merge 1 commit into
saikeerthan-14 wants to merge 1 commit into
Conversation
saikeerthan-14
force-pushed
the
codex/fix-dynamic-compaction-trigger
branch
from
October 18, 2026 21:06
08b122d to
f8943eb
Compare
saikeerthan-14
force-pushed
the
codex/fix-dynamic-compaction-trigger
branch
from
October 18, 2026 21:24
f8943eb to
3dc42f9
Compare
saikeerthan-14
marked this pull request as ready for review
October 18, 2026 21:25
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When an idle DB enables
ttlorperiodic_compaction_secondsthroughSetOptions, its compaction trigger keeps the period calculated at open. With the default wakeup cap that can delay the first check by 12 hours. Changing the DB wakeup cap throughSetDBOptions, or adding or dropping a column family with a shorter time-based interval, has the same problem.Refresh the existing
kTriggerCompactionscheduler task after DB/CF option changes and CF creation or deletion. The scheduler already replaces a task only when its period changes, so unrelated updates leave the timer schedule intact. A multi-CFSetOptionscall can apply an earlier CF change before a later one fails; the trigger is refreshed in that case too. This changes wakeup cadence only. It does not change compaction eligibility, public APIs, ABI, or on-disk formats.The regressions use the scheduler's mock clock and registration callback to verify that the period follows
SetOptions,SetDBOptions, CF creation and deletion, including increases when a short interval is removed and a partial multi-CF update. The existing scheduler test is updated to expect rescheduling when stats periods change. A one-line release note is included.Closes #15251.
Validation
periodic_task_scheduler_testtests pass withASSERT_STATUS_CHECKED=1on macOS/Apple Clang. The prior version of the patch also passed all 6 scheduler tests in a normal build; the final change adds one checked-status regression and a partial-failure refresh.make check-sources,make check-format, andgit diff --checkpass.make checkrun on the final production code passed its format gate and reported no failures through 645 of 1,889 shards. I stopped it because the unrelated external-SST test shards were taking a long time; it was not completed. The partial-update regression was added afterward and passed the focused checked-status run.