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

compression_per_level should be used for flush and changeable #9658

Closed
wants to merge 5 commits into from

Conversation

jay-zhuang
Copy link
Contributor

@jay-zhuang jay-zhuang commented Mar 4, 2022

  • Make compression_per_level dynamical changeable with SetOptions;
  • Fix a bug that compression_per_level is not used for flush;

Test Plan: CI

@@ -271,6 +270,7 @@ struct MutableCFOptions {
Temperature bottommost_temperature;

uint64_t sample_for_compression;
std::vector<CompressionType> compression_per_level;
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor nit: Can we try to keep the order of the structure elements the same between the ColumnFamilyOptions and the Mutable/Immutable ones? It makes it easier for comparison/checking purposes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

MutableCFOptions groups the options by memtable, compaction, blob, misc, we're putting it to misc group with other compression options:
https://github.com/facebook/rocksdb/blob/6cb7d64259110345a86ad48252df8dacd8c623cd/options/cf_options.h#L246-L260

Copy link
Contributor

@mrambacher mrambacher left a comment

Choose a reason for hiding this comment

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

LGTM.

@jay-zhuang jay-zhuang changed the title Make compression_per_level dynamic changeable compression_per_level should be used for flush and dynamic changeable Mar 7, 2022
@jay-zhuang jay-zhuang changed the title compression_per_level should be used for flush and dynamic changeable compression_per_level should be used for flush and changeable Mar 7, 2022
@jay-zhuang jay-zhuang marked this pull request as ready for review March 7, 2022 23:27
@facebook-github-bot
Copy link
Contributor

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

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.

Nice! LGTM

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.

None yet

4 participants