]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Use L1 size as estimate for L0 size in LevelCompactionBuilder::GetPathID wip-ifed-rocksdb-fix2
authorPhaniShekhar <phmantri@microsoft.com>
Thu, 21 Sep 2017 22:50:46 +0000 (15:50 -0700)
committerIgor Fedotov <ifedotov@suse.com>
Thu, 30 Nov 2017 12:22:20 +0000 (15:22 +0300)
commit62782e7357ff569d836b0ad91e5776fc1d6137e5
tree3fdc006be2265339638c8d624e58dc404c5e5b95
parentbac0af364a2c742ea9bb63199ddeee0edacdb2ac
Use L1 size as estimate for L0 size in LevelCompactionBuilder::GetPathID

Summary:
Fix for [2461](https://github.com/facebook/rocksdb/issues/2461).

Problem: When using multiple db_paths setting with RocksDB, RocksDB incorrectly calculates the size of L1 in LevelCompactionBuilder::GetPathId.

max_bytes_for_level_base is used as L0 size and L1 size is calculated as (L0 size * max_bytes_for_level_multiplier). However, L1 size should be max_bytes_for_level_base.

Solution: Use max_bytes_for_level_base as L1 size. Also, use L1 size as the estimated size of L0.
Closes https://github.com/facebook/rocksdb/pull/2903

Differential Revision: D5885442

Pulled By: maysamyabandeh

fbshipit-source-id: 036da1c9298d173b9b80479cc6661ee4b7a951f6
db/compaction_picker.cc