Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger compaction to the next level if the data age exceeds periodic_compaction_seconds #12175

Conversation

git-hulk
Copy link
Contributor

@git-hulk git-hulk commented Dec 22, 2023

Currently, the data are always compacted to the same level if exceed periodic_compaction_seconds which may confuse users, so we change it to allow trigger compaction to the next level here. It's a behavior change to users, and may affect users
who have disabled their ttl or ttl > periodic_compaction_seconds.

Relate issue: #12165

@git-hulk git-hulk force-pushed the trigger-next-level-compaction-in-periodical-compact branch 2 times, most recently from a85c469 to 34e7569 Compare December 22, 2023 04:30
@git-hulk
Copy link
Contributor Author

@ajkr @cbi42 Would you mind taking a look while you're free, thank you!

ajkr
ajkr previously requested changes Dec 26, 2023
Copy link
Contributor

@ajkr ajkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this. We could discuss the approach more, or change it according to the suggestion.

db/compaction/compaction_picker_level.cc Outdated Show resolved Hide resolved
@ajkr ajkr dismissed their stale review December 26, 2023 22:19

file age is ok

@ajkr ajkr requested a review from cbi42 December 26, 2023 22:19
Copy link
Member

@cbi42 cbi42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just need to keep the compaction behavior for files in last level files same as before, and update release notes.

…_compaction_seconds

Currently, the data are always compacted to the same level
if exceeds periodic_compaction_seconds which may confuse users,
so we change it to allow trigger compaction to the next level here.
It's a behavior change to users, it may affect users
who have disabled their ttl or ttl > periodic_compaction_seconds.
@git-hulk git-hulk force-pushed the trigger-next-level-compaction-in-periodical-compact branch from 34e7569 to 3bdd044 Compare December 27, 2023 02:54
@git-hulk git-hulk requested review from cbi42 and ajkr December 27, 2023 02:55
@git-hulk git-hulk force-pushed the trigger-next-level-compaction-in-periodical-compact branch from 3bdd044 to 0c48c12 Compare December 27, 2023 04:17
@git-hulk git-hulk force-pushed the trigger-next-level-compaction-in-periodical-compact branch from 3eeeca7 to 68993e7 Compare December 27, 2023 11:13
@git-hulk git-hulk requested a review from cbi42 December 28, 2023 03:58
Copy link
Member

@cbi42 cbi42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@facebook-github-bot
Copy link
Contributor

@cbi42 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@cbi42 merged this pull request in b7ecbe3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants