rocksdb/utilities/transactions
Maysam Yabandeh 2f973ca96e Double Crash in kPointInTimeRecovery with TransactionDB (#6313)
Summary:
In WritePrepared there could be gap in sequence numbers. This breaks the trick we use in kPointInTimeRecovery which assume the first seq in the log right after the corrupted log is one larger than the last seq we read from the logs. To let this trick keep working, we add a dummy entry with the expected sequence to the first log right after recovery.
Also in WriteCommitted, if the log right after the corrupted log is empty, since it has no sequence number to let the sequential trick work, it is assumed as unexpected behavior. This is however expected to happen if we close the db after recovering from a corruption and before writing anything new to it. To remedy that, we apply the same technique by writing a dummy entry to the log that is created after the corrupted log.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6313

Differential Revision: D19458291

Pulled By: maysamyabandeh

fbshipit-source-id: 09bc49e574690085df45b034ca863ff315937e2d
2020-01-29 11:40:55 -08:00
..
optimistic_transaction_db_impl.cc parallel occ (#6240) 2020-01-07 14:20:38 -08:00
optimistic_transaction_db_impl.h parallel occ (#6240) 2020-01-07 14:20:38 -08:00
optimistic_transaction_test.cc parallel occ (#6240) 2020-01-07 14:20:38 -08:00
optimistic_transaction.cc parallel occ (#6240) 2020-01-07 14:20:38 -08:00
optimistic_transaction.h parallel occ (#6240) 2020-01-07 14:20:38 -08:00
pessimistic_transaction_db.cc replace some reinterpret_cast with static_cast_with_check (#5740) 2019-08-27 10:59:11 -07:00
pessimistic_transaction_db.h Double Crash in kPointInTimeRecovery with TransactionDB (#6313) 2020-01-29 11:40:55 -08:00
pessimistic_transaction.cc save a few redundant container lookups (#5875) 2019-10-07 12:28:09 -07:00
pessimistic_transaction.h Use delete to disable automatic generated methods. (#5009) 2019-09-11 18:09:00 -07:00
snapshot_checker.cc WriteUnPrepared: less virtual in iterator callback (#5049) 2019-04-02 14:47:16 -07:00
transaction_base.cc Fix compilation under MSVC VS2015 (#6081) 2019-11-26 18:24:09 -08:00
transaction_base.h Fix compilation under MSVC VS2015 (#6081) 2019-11-26 18:24:09 -08:00
transaction_db_mutex_impl.cc Apply modernize-use-override (2nd iteration) 2019-02-14 14:41:36 -08:00
transaction_db_mutex_impl.h Change RocksDB License 2017-07-15 16:11:23 -07:00
transaction_lock_mgr.cc Misc hashing updates / upgrades (#5909) 2019-10-24 17:16:46 -07:00
transaction_lock_mgr.h Use delete to disable automatic generated methods. (#5009) 2019-09-11 18:09:00 -07:00
transaction_test.cc Double Crash in kPointInTimeRecovery with TransactionDB (#6313) 2020-01-29 11:40:55 -08:00
transaction_test.h Double Crash in kPointInTimeRecovery with TransactionDB (#6313) 2020-01-29 11:40:55 -08:00
transaction_util.cc use c++17's try_emplace if available (#5696) 2019-09-05 13:59:40 -07:00
transaction_util.h Fix PopSavePoint to merge info into the previous savepoint (#5628) 2019-07-26 11:39:30 -07:00
write_prepared_transaction_test.cc Disable SmallestUnCommittedSeq in Valgrind run (#6035) 2019-11-14 14:41:52 -08:00
write_prepared_txn_db.cc Skip CancelAllBackgroundWork if DBImpl is already closed (#6268) 2020-01-07 15:34:27 -08:00
write_prepared_txn_db.h Apply formatter to recent 200+ commits. (#5830) 2019-09-20 12:04:26 -07:00
write_prepared_txn.cc Fix compilation under MSVC VS2015 (#6081) 2019-11-26 18:24:09 -08:00
write_prepared_txn.h Fix compilation under MSVC VS2015 (#6081) 2019-11-26 18:24:09 -08:00
write_unprepared_transaction_test.cc WriteUnPrepared: Split ReadYourOwnWriteStress to three (#5776) 2019-09-06 15:25:26 -07:00
write_unprepared_txn_db.cc Apply formatter to recent 200+ commits. (#5830) 2019-09-20 12:04:26 -07:00
write_unprepared_txn_db.h WriteUnPrepared: use tracked_keys_ to track keys needed for rollback (#5562) 2019-07-16 15:24:56 -07:00
write_unprepared_txn.cc Fix compilation under MSVC VS2015 (#6081) 2019-11-26 18:24:09 -08:00
write_unprepared_txn.h Fix compilation under MSVC VS2015 (#6081) 2019-11-26 18:24:09 -08:00