rocksdb/db/db_impl
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
..
db_impl_compaction_flush.cc delete superversions in BackgroundCallPurge (#6146) 2019-12-17 13:22:57 -08:00
db_impl_debug.cc Fix IngestExternalFile's bug with two_write_queue (#5976) 2019-11-15 14:00:37 -08:00
db_impl_experimental.cc Support options.max_open_files = -1 with periodic_compaction_seconds (#6090) 2019-11-26 21:39:56 -08:00
db_impl_files.cc Let DBSecondary close files after catch up (#6114) 2019-12-02 17:45:03 -08:00
db_impl_open.cc Double Crash in kPointInTimeRecovery with TransactionDB (#6313) 2020-01-29 11:40:55 -08:00
db_impl_readonly.cc Apply formatter on recent 45 commits. (#5827) 2019-09-19 12:34:17 -07:00
db_impl_readonly.h Use delete to disable automatic generated methods. (#5009) 2019-09-11 18:09:00 -07:00
db_impl_secondary.cc Double Crash in kPointInTimeRecovery with TransactionDB (#6313) 2020-01-29 11:40:55 -08:00
db_impl_secondary.h Double Crash in kPointInTimeRecovery with TransactionDB (#6313) 2020-01-29 11:40:55 -08:00
db_impl_write.cc fix WriteBufferManager flush log message (#6335) 2020-01-27 15:49:22 -08:00
db_impl.cc Adjust thread pool sizes when setting max_background_jobs dynamically (#6300) 2020-01-16 14:35:10 -08:00
db_impl.h Double Crash in kPointInTimeRecovery with TransactionDB (#6313) 2020-01-29 11:40:55 -08:00
db_secondary_test.cc Break db_stress_tool.cc to a list of source files (#6134) 2019-12-08 23:51:01 -08:00