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
Negative values for compaction score #12457
Comments
Lines 1452 to 1454 in fc40165
|
okay, but what does it mean to have negative compaction scores? As per the documentation, it can only have positive values. |
Sorry you are right that negative compaction scores can happen for L0 when L0 compaction is disabled (-1). That just means compaction won't happen. You can change them to report zero if you wish - it should have the same behavior. |
okay, so in that case, with negative compaction scores, will compactions in L0 be triggered by the size of L0 instead of the number of files, or will it not be triggered at all? Also, it allows for |
Setting the level0_file_num_compaction_trigger to a negative value, results in a negative compaction score.
As per the documentation on compaction statistics, compaction score can have values between 0 and 1, and any value greater than 1 means that the level needs to be compacted, but it doesn't specify anything about negative values.
Minimum reproducible example is attached -
shows compaction statistics like this -
It also allows for
level0_file_num_compaction_trigger
to be 0 (without any errors or warnings), which might lead to random compaction score values as per the calculation here.Unless I am using the API wrong, is this the intended behaviour?
The text was updated successfully, but these errors were encountered: