compaction picker to use max_bytes_for_level_multiplier_additional
Summary: Hi, As part of some optimization, we're using multiple DB locations (tmpfs and spindle) to store data and configured max_bytes_for_level_multiplier_additional. But, max_bytes_for_level_multiplier_additional is not used to compute the actual size for the level while picking the DB location. So, even if DB location does not have space, RocksDB mistakenly puts the level at that location. Can someone pls. verify the fix? Let me know any other changes required. Thanks, Jay Closes https://github.com/facebook/rocksdb/pull/2704 Differential Revision: D5992515 Pulled By: ajkr fbshipit-source-id: cbbc6c0e0a7dbdca91c72e0f37b218c4cec57e28
This commit is contained in:
parent
e2548366e1
commit
1a61ba179e
@ -1281,9 +1281,20 @@ uint32_t LevelCompactionBuilder::GetPathId(
|
|||||||
} else {
|
} else {
|
||||||
current_path_size -= level_size;
|
current_path_size -= level_size;
|
||||||
if (cur_level > 0) {
|
if (cur_level > 0) {
|
||||||
level_size = static_cast<uint64_t>(
|
if (ioptions.level_compaction_dynamic_level_bytes) {
|
||||||
|
// Currently, level_compaction_dynamic_level_bytes is ignored when
|
||||||
|
// multiple db paths are specified. https://github.com/facebook/
|
||||||
|
// rocksdb/blob/master/db/column_family.cc.
|
||||||
|
// Still, adding this check to avoid accidentally using
|
||||||
|
// max_bytes_for_level_multiplier_additional
|
||||||
|
level_size = static_cast<uint64_t>(
|
||||||
level_size * mutable_cf_options.max_bytes_for_level_multiplier);
|
level_size * mutable_cf_options.max_bytes_for_level_multiplier);
|
||||||
}
|
} else {
|
||||||
|
level_size = static_cast<uint64_t>(
|
||||||
|
level_size * mutable_cf_options.max_bytes_for_level_multiplier
|
||||||
|
* mutable_cf_options.MaxBytesMultiplerAdditional(cur_level));
|
||||||
|
}
|
||||||
|
}
|
||||||
cur_level++;
|
cur_level++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user