cuckoo table: return estimated size - 1

Summary:
This is to avoid cutting file prematurely and resulting file size to be
half of specified.

Test Plan: db_bench

Reviewers: sdong, yhchiang, igor

Reviewed By: igor

Subscribers: leveldb

Differential Revision: https://reviews.facebook.net/D23541
main
Lei Jin 10 years ago
parent a062e1f2c4
commit 5600c8f6e5
  1. 2
      table/cuckoo_table_builder.cc

@ -323,7 +323,7 @@ uint64_t CuckooTableBuilder::FileSize() const {
expected_hash_table_size *= 2;
}
return (kvs_[0].first.size() + kvs_[0].second.size()) *
expected_hash_table_size;
expected_hash_table_size - 1;
}
// This method is invoked when there is no place to insert the target key.

Loading…
Cancel
Save