-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Move advanced column family options to advanced_options.h #1847
Conversation
@IslamAbdelRahman has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
I have moved all ColumnFamilyOptions to advanced_options.h and only left these options in options.h
Please feel free to comment on specific options if you think they should be advanced or should not be |
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.
This is awesome!
include/rocksdb/options.h
Outdated
// levels after base level. | ||
// | ||
// Default: kDisableCompressionOption (Disabled) | ||
CompressionType bottommost_compression = kDisableCompressionOption; |
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.
Maybe we should keep this one.
include/rocksdb/options.h
Outdated
CompressionType bottommost_compression = kDisableCompressionOption; | ||
|
||
// different options for compression algorithms | ||
CompressionOptions compression_opts; |
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.
Maybe this one too. If people want to tune compression, it also makes sense to tune the level.
include/rocksdb/options.h
Outdated
// Default: 256MB. | ||
// | ||
// Dynamically changeable through SetOptions() API | ||
uint64_t max_bytes_for_level_base = 256 * 1048576; |
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.
If we say they should tune write buffer size and L0 trigger, they should tune this too accordingly. In the long term, we can make it adaptive by looking at actual L0 file size and L0 trigger. But for now, I think they have to set it.
@IslamAbdelRahman updated the pull request - view changes - changes since last import |
Move back
To options.h |
@IslamAbdelRahman has imported this pull request. If you are a Facebook 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.
This is great! My comments are to keep two more.
include/rocksdb/options.h
Outdated
// 4) prefix(prefix(key)) == prefix(key) | ||
// | ||
// Default: nullptr | ||
std::shared_ptr<const SliceTransform> prefix_extractor = nullptr; |
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.
I feel like we should keep this. This is not avoidable in many use cases.
include/rocksdb/options.h
Outdated
// Default: a block-based table factory that provides a default | ||
// implementation of TableBuilder and TableReader with default | ||
// BlockBasedTableOptions. | ||
std::shared_ptr<TableFactory> table_factory; |
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.
block size is in it, and I think many users will need to tune the block size. block cache pointer is still in there, which is common. I would still expose it for now.
9d8b491
to
d7877cd
Compare
@IslamAbdelRahman updated the pull request - view changes - changes since last import |
@IslamAbdelRahman has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
address comments |
@siying Ping! |
d7877cd
to
267e9bf
Compare
@IslamAbdelRahman updated the pull request - view changes - changes since last import |
@IslamAbdelRahman has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@IslamAbdelRahman updated the pull request - view changes - changes since last import |
@IslamAbdelRahman has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
For the sake of making our options simpler, we should keep options.h as simple as possible and move more advanced/less common options to advaned_options.h
I started with ColumnFamilyOptions and also did some re-ordering
I have moved all ColumnFamilyOptions to advanced_options.h and only left these options in options.h
Please feel free to comment on specific options if you think they should be advanced or should not be