rocksdb/utilities/transactions
Reid Horuff c27061dae7 [rocksdb] 2PC double recovery bug fix
Summary:
1. prepare()
2. crash
3. recover
4. commit()
5. crash
6. data is lost

This is due to the transaction data still only residing in the WAL but because the logs were flushed on the first recovery the data is ignored on the second recovery. We must scan all logs found on recovery and only ignore redundant data at the time of replay. It is not possible to know which logs still contain relevant data at time of recovery. We cannot simply ignore a log because all of the non-2pc data it contains has already been written to L0.

The changes made to MemTableInserter are to ensure that prepared sections are still recovered even if all of the non-2pc data in that log has already been flushed to L0.

Test Plan: Provided test.

Reviewers: sdong

Subscribers: andrewkr, hermanlee4, dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D57729
2016-05-10 14:06:07 -07:00
..
optimistic_transaction_db_impl.cc optimistic transactions support for reinitialization 2016-03-07 19:03:09 -08:00
optimistic_transaction_db_impl.h optimistic transactions support for reinitialization 2016-03-07 19:03:09 -08:00
optimistic_transaction_impl.cc [rocksdb] Two Phase Transaction 2016-05-10 14:06:07 -07:00
optimistic_transaction_impl.h [rocksdb] Two Phase Transaction 2016-05-10 14:06:07 -07:00
optimistic_transaction_test.cc Fix AppVeyor build error 2016-03-15 10:57:33 -07:00
transaction_base.cc [rocksdb] Two Phase Transaction 2016-05-10 14:06:07 -07:00
transaction_base.h [rocksdb] Two Phase Transaction 2016-05-10 14:06:07 -07:00
transaction_db_impl.cc [rocksdb] 2PC double recovery bug fix 2016-05-10 14:06:07 -07:00
transaction_db_impl.h [rocksdb] Two Phase Transaction 2016-05-10 14:06:07 -07:00
transaction_db_mutex_impl.cc Fix transaction locking 2016-02-16 17:15:05 -08:00
transaction_db_mutex_impl.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
transaction_impl.cc [rocksdb] Two Phase Transaction 2016-05-10 14:06:07 -07:00
transaction_impl.h [rocksdb] Two Phase Transaction 2016-05-10 14:06:07 -07:00
transaction_lock_mgr.cc Merge pull request #1101 from flyd1005/wip-fix-typo 2016-04-28 02:30:44 -07:00
transaction_lock_mgr.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
transaction_test.cc [rocksdb] 2PC double recovery bug fix 2016-05-10 14:06:07 -07:00
transaction_util.cc Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
transaction_util.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00