Skip to content

Commit

Permalink
Use kDontChargeCacheMetadata for blob file cache (#318)
Browse files Browse the repository at this point in the history
Signed-off-by: wangnengjie <[email protected]>
  • Loading branch information
wangnengjie authored May 21, 2024
1 parent ff85fd1 commit ecaa9ec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/blob_file_set.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <cinttypes>

#include "edit_collector.h"
#include "rocksdb/cache.h"
#include "titan_logging.h"

namespace rocksdb {
Expand All @@ -23,7 +24,10 @@ BlobFileSet::BlobFileSet(const TitanDBOptions& options, TitanStats* stats,
if (file_cache_size < 0) {
file_cache_size = kMaxFileCacheSize;
}
file_cache_ = NewLRUCache(file_cache_size);
LRUCacheOptions cache_options;
cache_options.capacity = file_cache_size;
cache_options.metadata_charge_policy = kDontChargeCacheMetadata;
file_cache_ = NewLRUCache(cache_options);
}

Status BlobFileSet::Open(
Expand Down

0 comments on commit ecaa9ec

Please sign in to comment.