kv/LevelDBStore: do not Delete before Put

A put implicitly overwrites the previous value.

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2015-10-20 08:49:42 -04:00
parent 338b4ed4be
commit 1e3c2fa21a

View File

@ -164,7 +164,6 @@ void LevelDBStore::LevelDBTransactionImpl::set(
const bufferlist &to_set_bl)
{
string key = combine_strings(prefix, k);
bat.Delete(leveldb::Slice(key));
// bufferlist::c_str() is non-constant, so we can't call c_str()
if (to_set_bl.is_contiguous() && to_set_bl.length() > 0) {