rocksdb/tools
agiardullo c815351038 Support saving history in memtable_list
Summary:
For transactions, we are using the memtables to validate that there are no write conflicts.  But after flushing, we don't have any memtables, and transactions could fail to commit.  So we want to someone keep around some extra history to use for conflict checking.  In addition, we want to provide a way to increase the size of this history if too many transactions fail to commit.

After chatting with people, it seems like everyone prefers just using Memtables to store this history (instead of a separate history structure).  It seems like the best place for this is abstracted inside the memtable_list.  I decide to create a separate list in MemtableListVersion as using the same list complicated the flush/installalflushresults logic too much.

This diff adds a new parameter to control how much memtable history to keep around after flushing.  However, it sounds like people aren't too fond of adding new parameters.  So I am making the default size of flushed+not-flushed memtables be set to max_write_buffers.  This should not change the maximum amount of memory used, but make it more likely we're using closer the the limit.  (We are now postponing deleting flushed memtables until the max_write_buffer limit is reached).  So while we might use more memory on average, we are still obeying the limit set (and you could argue it's better to go ahead and use up memory now instead of waiting for a write stall to happen to test this limit).

However, if people are opposed to this default behavior, we can easily set it to 0 and require this parameter be set in order to use transactions.

Test Plan: Added a xfunc test to play around with setting different values of this parameter in all tests.  Added testing in memtablelist_test and planning on adding more testing here.

Reviewers: sdong, rven, igor

Reviewed By: igor

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D37443
2015-05-28 16:34:24 -07:00
..
rdb first rdb commit 2014-11-20 23:33:00 -05:00
auto_sanity_test.sh Make auto_sanity_test always use the db_sanity_test.cc of the newer commit. 2015-03-27 11:32:49 -07:00
benchmark_leveldb.sh Add scripts to run leveldb benchmark 2015-04-27 19:32:56 -07:00
benchmark.sh Add Size-GB column to benchmark reports 2015-05-02 07:46:12 -07:00
check_format_compatible.sh Script to check whether RocksDB can read DB generated by previous releases and vice versa 2015-04-08 16:04:59 -07:00
db_crashtest2.py Remove seek compaction 2014-06-20 10:23:02 +02:00
db_crashtest.py db_stress for dynamic options 2014-10-27 12:11:16 -07:00
db_repl_stress.cc Make db_stress built for ROCKSDB_LITE 2014-11-14 10:20:51 -08:00
db_sanity_test.cc Make auto_sanity_test always use the db_sanity_test.cc of the newer commit. 2015-03-27 11:32:49 -07:00
db_stress.cc Support saving history in memtable_list 2015-05-28 16:34:24 -07:00
dbench_monitor Added simple monitoring script to monitor overusage of memory in db_bench 2015-02-11 18:40:11 -08:00
Dockerfile adding docker build script and dockerfile 2015-05-22 16:03:39 -07:00
generate_random_db.sh Script to check whether RocksDB can read DB generated by previous releases and vice versa 2015-04-08 16:04:59 -07:00
ldb_test.py Added 'dump_live_files' command to ldb tool. 2014-12-12 17:50:36 -08:00
ldb.cc Make db_stress built for ROCKSDB_LITE 2014-11-14 10:20:51 -08:00
pflag Added simple monitoring script to monitor overusage of memory in db_bench 2015-02-11 18:40:11 -08:00
reduce_levels_test.cc rocksdb: switch to gtest 2015-03-17 14:08:00 -07:00
run_flash_bench.sh Add Size-GB column to benchmark reports 2015-05-02 07:46:12 -07:00
run_leveldb.sh Add scripts to run leveldb benchmark 2015-04-27 19:32:56 -07:00
sst_dump.cc Make db_stress built for ROCKSDB_LITE 2014-11-14 10:20:51 -08:00
verify_random_db.sh Script to check whether RocksDB can read DB generated by previous releases and vice versa 2015-04-08 16:04:59 -07:00