From b4596c6174a5f8e050402f85c091f35a89a0263f Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Tue, 19 Sep 2017 11:45:42 -0700 Subject: [PATCH] Fix Get does not return super version on error Summary: This is caught when I was testing #2886. Closes https://github.com/facebook/rocksdb/pull/2907 Differential Revision: D5863153 Pulled By: yiwu-arbug fbshipit-source-id: 8c54759ba1a0dc101f24ab50423e35731300612d --- db/db_impl.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/db/db_impl.cc b/db/db_impl.cc index 9a5cc3d93..19a394c74 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -969,6 +969,7 @@ Status DBImpl::GetImpl(const ReadOptions& read_options, RecordTick(stats_, MEMTABLE_HIT); } if (!done && !s.ok() && !s.IsMergeInProgress()) { + ReturnAndCleanupSuperVersion(cfd, sv); return s; } }