summaryrefslogtreecommitdiff
path: root/memtable
diff options
context:
space:
mode:
authormrambacher <mrambach@gmail.com>2020-10-14 22:27:12 -0700
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>2020-10-14 22:28:55 -0700
commita8c89cc96983be8884bf93de484c13f76685bcf9 (patch)
tree069f6122ba267d272c11a8f098d28258f44d04be /memtable
parentccbf468cb1e3ba5255b1977e8daf10d5e64f68eb (diff)
Test for LoadLatestOptions (#7554)
Summary: Make LoadLatestOptions return PathNotFound if the options file does not exist. Added tests for the LoadOptions related methods. Pull Request resolved: https://github.com/facebook/rocksdb/pull/7554 Reviewed By: akankshamahajan15 Differential Revision: D24298985 Pulled By: zhichao-cao fbshipit-source-id: c9ae3cb12fc4a5bbef07743e1c1300f98a2441b3
Diffstat (limited to 'memtable')
-rw-r--r--memtable/write_buffer_manager.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/memtable/write_buffer_manager.cc b/memtable/write_buffer_manager.cc
index 23ca1d749..9b7470870 100644
--- a/memtable/write_buffer_manager.cc
+++ b/memtable/write_buffer_manager.cc
@@ -91,8 +91,10 @@ void WriteBufferManager::ReserveMemWithCache(size_t mem) {
// Expand size by at least 256KB.
// Add a dummy record to the cache
Cache::Handle* handle = nullptr;
- cache_rep_->cache_->Insert(cache_rep_->GetNextCacheKey(), nullptr,
- kSizeDummyEntry, nullptr, &handle);
+ Status s =
+ cache_rep_->cache_->Insert(cache_rep_->GetNextCacheKey(), nullptr,
+ kSizeDummyEntry, nullptr, &handle);
+ s.PermitUncheckedError(); // TODO: What to do on error?
// We keep the handle even if insertion fails and a null handle is
// returned, so that when memory shrinks, we don't release extra
// entries from cache.