rocksdb/table
Naman Gupta fe25070242 In-place updates for equal keys and similar sized values
Summary:
Currently for each put, a fresh memory is allocated, and a new entry is added to the memtable with a new sequence number irrespective of whether the key already exists in the memtable. This diff is an attempt to update the value inplace for existing keys. It currently handles a very simple case:
1. Key already exists in the current memtable. Does not inplace update values in immutable memtable or snapshot
2. Latest value type is a 'put' ie kTypeValue
3. New value size is less than existing value, to avoid reallocating memory

TODO: For a put of an existing key, deallocate memory take by values, for other value types till a kTypeValue is found, ie. remove kTypeMerge.
TODO: Update the transaction log, to allow consistent reload of the memtable.

Test Plan: Added a unit test verifying the inplace update. But some other unit tests broken due to invalid sequence number checks. WIll fix them next.

Reviewers: xinyaohu, sumeet, haobo, dhruba

CC: leveldb

Differential Revision: https://reviews.facebook.net/D12423

Automatic commit by arc
2013-10-31 11:27:12 -07:00
..
block_builder.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
block_builder.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
block_test.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
block.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
block.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
filter_block_test.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
filter_block.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
filter_block.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
format.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
format.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
iter_heap.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
iterator_wrapper.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
iterator.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
merger.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
merger.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
table_builder.cc Support user-defined table stats collector 2013-10-28 15:45:14 -07:00
table_test.cc In-place updates for equal keys and similar sized values 2013-10-31 11:27:12 -07:00
table.cc Add bloom filter to predefined table stats 2013-10-17 11:43:06 -07:00
table.h Add bloom filter to predefined table stats 2013-10-17 11:43:06 -07:00
two_level_iterator.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
two_level_iterator.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00