rocksdb/java/rocksjni
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
..
backupablejni.cc [RocksJava] Fixed MacOS build of RocksJava 2014-11-26 20:53:23 +01:00
checkpoint.cc [RocksJava] Addressed comments in D28971 2014-11-25 23:33:42 +01:00
columnfamilyhandle.cc [RocksJava] Column family support 2014-10-13 10:34:52 +02:00
comparator.cc Fix code review comments raised in https://reviews.facebook.net/D22779 2014-10-21 15:52:28 +01:00
comparatorjnicallback.cc [RocksJava] - BackupInfos & Restore-/BackupableDB enhancements 2014-10-28 18:42:05 +01:00
comparatorjnicallback.h Fix code review comments raised in https://reviews.facebook.net/D22779 2014-10-21 15:52:28 +01:00
env.cc [RocksJava] Expose MemEnv in RocksJava 2015-03-23 18:59:31 +01:00
filter.cc Filters getting disposed by System.gc before EOL 2014-10-15 20:59:25 +02:00
iterator.cc Abstractions for common iterator behaviour 2015-01-14 21:16:06 +00:00
loggerjnicallback.cc RocksJava - JNI Logger callback 2015-03-14 20:57:18 +01:00
loggerjnicallback.h RocksJava - JNI Logger callback 2015-03-14 20:57:18 +01:00
memtablejni.cc [RocksJava] 32-Bit adjustments 2015-03-19 20:45:55 +01:00
merge_operator.cc Integrated feedback from ankgup87 2014-10-13 15:37:29 -07:00
options.cc Support saving history in memtable_list 2015-05-28 16:34:24 -07:00
portal.h [RocksJava] Add compression per level to API 2015-03-23 18:58:56 +01:00
ratelimiterjni.cc 32-Bit RocksJava resolution for jlong overflows 2014-10-12 22:42:18 +02:00
restorejni.cc [RocksJava] Fixed MacOS build of RocksJava 2014-11-26 20:53:23 +01:00
rocksjni.cc [RocksJava] Integrated changes from D33165 2015-02-10 21:12:27 +01:00
slice.cc [RocksJava] Integrated proposed simplificiation 2015-01-17 01:22:29 +01:00
snapshot.cc [RocksJava] Snapshot - GetSequenceNumber 2015-01-31 15:50:34 +01:00
statistics.cc Adding iterator JNI binding 2014-04-19 03:26:22 -07:00
table.cc [RocksJava] BlockBasedTableConfig 3.10 2015-01-22 23:46:38 +01:00
transaction_log.cc [RocksJava] Incorporated changes for D32151 2015-01-31 15:15:49 +01:00
ttl.cc [RocksJava] CF Name shall handle bytes correctly 2015-02-10 21:00:00 +01:00
write_batch_test.cc Fix compilation error in rocksjni/write_batch_test.cc 2015-03-18 15:10:57 -07:00
write_batch_with_index.cc Abstract duplicate code on key and value slice objects into generic methods 2015-01-14 21:16:06 +00:00
write_batch.cc Moved Java test classes into src/test/java 2015-02-01 19:30:31 +00:00
writebatchhandlerjnicallback.cc Fix iOS compile with -Wshorten-64-to-32 2014-11-13 14:39:30 -05:00
writebatchhandlerjnicallback.h Addresed comments from code review https://reviews.facebook.net/D27567 2014-11-09 16:10:11 +00:00