-
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
Add TableBuilderOptions::level and relevant changes #1335
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
@@ -54,15 +54,16 @@ struct TableBuilderOptions { | |||
CompressionType _compression_type, |
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.
Do you mind making TableBuilderOptions
constructor explicit
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.
'explicit' keyword for constructor is useful only when parameter number can be 1.
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.
You are right ! please ignore my comment
LGTM, Thanks @rockeet, I have some minor comments. |
Passing level to table builder is fine to me. I think what is needed more is whether the file is the bottonmost level to me. I assume you only want to apply strong compression in the bottommost level, which you can get from Compaction::bottommost_level(). |
@IslamAbdelRahman Thanks for your review again. A unit test is not need now, because this code change does not impact any existing code, ---- there is no any existing code in rocksdb really using this newly added 'level'. The 'level' is only used in our custom TableFactory. Or you could give me a unit test scenario in rocksdb ? |
@siying I used |
@rockeet what you are doing is correct. I was just saying that, you could use a better indication of whether you need to use your compression, which is whether the file is for the bottom-most level. |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Thanks @rockeet ! |
For issue: #1333
I also modified other relevant code.