-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Support compacting files to different temperatures in FIFO compaction #11428
Conversation
0288af3
to
b8e4873
Compare
@cbi42 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
46f07d0
to
b18ebf2
Compare
@cbi42 has updated the pull request. You must reimport the pull request before landing. |
@cbi42 has updated the pull request. You must reimport the pull request before landing. |
@cbi42 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
include/rocksdb/advanced_options.h
Outdated
// Dynamically changeable through SetOptions() API, e.g., | ||
// SetOptions("compaction_options_fifo", | ||
// "{file_temperature_age_thresholds={ | ||
// {age=20;temperature=kCold}:{age=10;temperature=kWarm}}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These seem out of order. Above it says "The elements should be in increasing order with respect to age
field".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this. I've updated the comment and added related validation and unit test too.
@cbi42 has updated the pull request. You must reimport the pull request before landing. |
58e8f2a
to
042c4cb
Compare
@cbi42 has updated the pull request. You must reimport the pull request before landing. |
@cbi42 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@cbi42 has updated the pull request. You must reimport the pull request before landing. |
@cbi42 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@cbi42 has updated the pull request. You must reimport the pull request before landing. |
1 similar comment
@cbi42 has updated the pull request. You must reimport the pull request before landing. |
@cbi42 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary:
CompactionOptionsFIFO::file_temperature_age_thresholds
that allows user to specify age thresholds for compacting files to different temperatures. File temperature can be used to store files in different storage media. The new options allows specifying multiple temperature-age pairs. The option uses struct for a temperature-age pair to use the existing parsing functionality to make the option dynamically settable.age_for_warm
that was added for a similar purpose.FIFOCompactionPicker::PickTemperatureChangeCompaction
.Test plan: adapted unit tests that were for
age_for_warm
to this new option.