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
This commit is contained in:
Yi Wu 2017-09-19 11:45:42 -07:00 committed by Facebook Github Bot
parent 34ebadf930
commit b4596c6174

View File

@ -969,6 +969,7 @@ Status DBImpl::GetImpl(const ReadOptions& read_options,
RecordTick(stats_, MEMTABLE_HIT); RecordTick(stats_, MEMTABLE_HIT);
} }
if (!done && !s.ok() && !s.IsMergeInProgress()) { if (!done && !s.ok() && !s.IsMergeInProgress()) {
ReturnAndCleanupSuperVersion(cfd, sv);
return s; return s;
} }
} }