Remove key length assertion LRUHandle::CalcTotalCharge (#6115)
Summary: Inserting an entry in the block cache with 0 length key is a valid use case. Remove the assertion in ```LRUHandle::CalcTotalCharge```. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6115 Differential Revision: D18769693 Pulled By: anand1976 fbshipit-source-id: 34cc159650300dda6d7273480640478f28392cda
This commit is contained in:
parent
048472f620
commit
16fa6fd2a6
1
cache/lru_cache.h
vendored
1
cache/lru_cache.h
vendored
@ -133,7 +133,6 @@ struct LRUHandle {
|
|||||||
// Caclculate the memory usage by metadata
|
// Caclculate the memory usage by metadata
|
||||||
inline size_t CalcTotalCharge(
|
inline size_t CalcTotalCharge(
|
||||||
CacheMetadataChargePolicy metadata_charge_policy) {
|
CacheMetadataChargePolicy metadata_charge_policy) {
|
||||||
assert(key_length);
|
|
||||||
size_t meta_charge = 0;
|
size_t meta_charge = 0;
|
||||||
if (metadata_charge_policy == kFullChargeCacheMetadata) {
|
if (metadata_charge_policy == kFullChargeCacheMetadata) {
|
||||||
#ifdef ROCKSDB_MALLOC_USABLE_SIZE
|
#ifdef ROCKSDB_MALLOC_USABLE_SIZE
|
||||||
|
Loading…
Reference in New Issue
Block a user