[RocksDB] [Performance Bug] MemTable::Get Slow

Summary:
The merge operator diff introduced a performance problem in MemTable::Get.
An exit condition is missed when the current key does not match the user key.
This could lead to full memtable scan if the user key is not found.

Test Plan: make check; db_bench

Reviewers: dhruba

Reviewed By: dhruba

CC: leveldb

Differential Revision: https://reviews.facebook.net/D10851
main
Haobo Xu 11 years ago
parent 3827403c51
commit c3c13db346
  1. 3
      db/memtable.cc

@ -185,6 +185,9 @@ bool MemTable::Get(const LookupKey& key, std::string* value, Status* s,
return true;
}
}
} else {
// exit loop if user key does not match
break;
}
}

Loading…
Cancel
Save