diff --git a/db/memtable.cc b/db/memtable.cc index 64ee41648..1f6a9d266 100644 --- a/db/memtable.cc +++ b/db/memtable.cc @@ -116,7 +116,7 @@ bool MemTable::Get(const LookupKey& key, std::string* value, Status* s) { if (iter.Valid()) { // entry format is: // klength varint32 - // userkey char[klength] + // userkey char[klength-8] // tag uint64 // vlength varint32 // value char[vlength] diff --git a/db/memtable.h b/db/memtable.h index c70f2dc3e..31e2aef1d 100644 --- a/db/memtable.h +++ b/db/memtable.h @@ -49,7 +49,7 @@ class MemTable { // The caller must ensure that the underlying MemTable remains live // while the returned iterator is live. The keys returned by this // iterator are internal keys encoded by AppendInternalKey in the - // db/format.{h,cc} module. + // db/dbformat.{h,cc} module. Iterator* NewIterator(); // Add an entry into memtable that maps key to value at the diff --git a/db/memtablelist.h b/db/memtablelist.h index 721b344ab..266799f4b 100644 --- a/db/memtablelist.h +++ b/db/memtablelist.h @@ -63,6 +63,7 @@ class MemTableList { std::set& pending_outputs); // New memtables are inserted at the front of the list. + // Takes ownership of the referenced held on *m by the caller of Add(). void Add(MemTable* m); // Returns an estimate of the number of bytes of data in use.