rocksdb/java/rocksjni
Manuel Ung b9846370e9 WriteUnPrepared: Add support for recovering WriteUnprepared transactions (#4078)
Summary:
This adds support for recovering WriteUnprepared transactions through the following changes:
- The information in `RecoveredTransaction` is extended so that it can reference multiple batches.
- `MarkBeginPrepare` is extended with a bool indicating whether it is an unprepared begin, and this is passed down to `InsertRecoveredTransaction` to indicate whether the current transaction is prepared or not.
- `WriteUnpreparedTxnDB::Initialize` is overridden so that it will rollback unprepared transactions from the recovered transactions. This can be done without updating the prepare heap/commit map, because this is before the DB has finished initializing, and after writing the rollback batch, those data structures should not contain information about the rolled back transaction anyway.

Commit/Rollback of live transactions is still unimplemented and will come later.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4078

Differential Revision: D8703382

Pulled By: lth

fbshipit-source-id: 7e0aada6c23bd39299f1f20d6c060492e0e6b60a
2018-07-06 17:59:13 -07:00
..
backupablejni.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
backupenginejni.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
cassandra_compactionfilterjni.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
cassandra_value_operator.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
checkpoint.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
clock_cache.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
columnfamilyhandle.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
compaction_filter_factory_jnicallback.cc Added CompactionFilterFactory support to RocksJava 2017-10-12 11:12:16 -07:00
compaction_filter_factory_jnicallback.h Added CompactionFilterFactory support to RocksJava 2017-10-12 11:12:16 -07:00
compaction_filter_factory.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
compaction_filter.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
compaction_options_fifo.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
compaction_options_universal.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
comparator.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
comparatorjnicallback.cc Added CompactionFilterFactory support to RocksJava 2017-10-12 11:12:16 -07:00
comparatorjnicallback.h Added CompactionFilterFactory support to RocksJava 2017-10-12 11:12:16 -07:00
compression_options.cc Add bottommost_compression_opts to for bottommost_compression (#3985) 2018-06-27 17:42:38 -07:00
env_options.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
env.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
filter.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
ingest_external_file_options.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
iterator.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
jnicallback.cc Suppress lint in old files 2018-01-29 12:56:42 -08:00
jnicallback.h Suppress lint in old files 2018-01-29 12:56:42 -08:00
loggerjnicallback.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
loggerjnicallback.h Added CompactionFilterFactory support to RocksJava 2017-10-12 11:12:16 -07:00
lru_cache.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
memtablejni.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
merge_operator.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
native_comparator_wrapper_test.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
optimistic_transaction_db.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
optimistic_transaction_options.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
options_util.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
options.cc Add bottommost_compression_opts to for bottommost_compression (#3985) 2018-06-27 17:42:38 -07:00
portal.h check if data size exceeds java array vm limit when it is copied in jni (#3850) 2018-06-29 16:13:06 -07:00
ratelimiterjni.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
remove_emptyvalue_compactionfilterjni.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
restorejni.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
rocks_callback_object.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
rocksdb_exception_test.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
rocksjni.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
slice.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
snapshot.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
sst_file_manager.cc Remove unused arg which causes compilation failure (#4080) 2018-07-02 10:27:36 -07:00
sst_file_writerjni.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
statistics.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
statisticsjni.cc Suppress lint in old files 2018-01-29 12:56:42 -08:00
statisticsjni.h Suppress lint in old files 2018-01-29 12:56:42 -08:00
table.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
transaction_db_options.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
transaction_db.cc Fix an issue with unnecessary capture in lambda expressions 2018-05-25 15:12:44 -07:00
transaction_log.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
transaction_notifier_jnicallback.cc Add TransactionDB and OptimisticTransactionDB to the Java API 2018-03-02 10:34:13 -08:00
transaction_notifier_jnicallback.h Add TransactionDB and OptimisticTransactionDB to the Java API 2018-03-02 10:34:13 -08:00
transaction_notifier.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
transaction_options.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
transaction.cc zLinux build error with gcc and IBM Java headers (#4013) 2018-06-18 13:58:28 -07:00
ttl.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
write_batch_test.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
write_batch_with_index.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
write_batch.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
writebatchhandlerjnicallback.cc WriteUnPrepared: Add support for recovering WriteUnprepared transactions (#4078) 2018-07-06 17:59:13 -07:00
writebatchhandlerjnicallback.h WriteUnPrepared: Add support for recovering WriteUnprepared transactions (#4078) 2018-07-06 17:59:13 -07:00