diff --git a/db/multi_cf_iterator_impl.h b/db/multi_cf_iterator_impl.h index 7224c77b070..46f397cc4da 100644 --- a/db/multi_cf_iterator_impl.h +++ b/db/multi_cf_iterator_impl.h @@ -85,7 +85,7 @@ class MultiCfIteratorImpl { void Next() { assert(Valid()); auto& min_heap = GetHeap([this]() { - Slice target = key(); + std::string target(key().data(), key().size()); InitMinHeap(); Seek(target); }); @@ -94,7 +94,7 @@ class MultiCfIteratorImpl { void Prev() { assert(Valid()); auto& max_heap = GetHeap([this]() { - Slice target = key(); + std::string target(key().data(), key().size()); InitMaxHeap(); SeekForPrev(target); });