Fix min_write_buffer_number_to_merge = 0 bug
Summary: It's possible that we set min_write_buffer_number_to_merge to 0. This should never happen Closes https://github.com/facebook/rocksdb/pull/1515 Differential Revision: D4183356 Pulled By: yiwu-arbug fbshipit-source-id: c9d39d7
This commit is contained in:
parent
2ef92fea51
commit
eba99c28e4
@ -158,6 +158,10 @@ ColumnFamilyOptions SanitizeOptions(const ImmutableDBOptions& db_options,
|
|||||||
result.min_write_buffer_number_to_merge =
|
result.min_write_buffer_number_to_merge =
|
||||||
std::min(result.min_write_buffer_number_to_merge,
|
std::min(result.min_write_buffer_number_to_merge,
|
||||||
result.max_write_buffer_number - 1);
|
result.max_write_buffer_number - 1);
|
||||||
|
if (result.min_write_buffer_number_to_merge < 1) {
|
||||||
|
result.min_write_buffer_number_to_merge = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (result.num_levels < 1) {
|
if (result.num_levels < 1) {
|
||||||
result.num_levels = 1;
|
result.num_levels = 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user