recovery: make it transactional
Recovery used to be performed row by row. It was fine because anyway all the persisted rows are supposed to be committed, and should not meet any problems during recovery so a transaction could be applied partially. But it became not true after the synchronous replication introduction. Synchronous transactions might be in the log, but can be followed by a ROLLBACK record which is supposed to delete them. During row-by-row recovery, firstly, the synchro rows each turned into a sync transaction. Which is probably fine. But the rows on non-sync spaces which were a part of a sync transaction, could be applied right away bypassing the limbo leading to all kind of the sweet errors like duplicate keys, or inconsistency of a partially applied transaction. The patch makes the recovery transactional. Either an entire transaction is recovered, or it is rolled back which normally happens only for synchro transactions followed by ROLLBACK. In force recovery of a broken log the consistency is not guaranteed though. Closes #5874
Showing
- changelogs/unreleased/qsync-multi-statement-recovery 5 additions, 0 deletionschangelogs/unreleased/qsync-multi-statement-recovery
- src/box/box.cc 265 additions, 27 deletionssrc/box/box.cc
- test/replication/gh-5874-qsync-txn-recovery.result 162 additions, 0 deletionstest/replication/gh-5874-qsync-txn-recovery.result
- test/replication/gh-5874-qsync-txn-recovery.test.lua 84 additions, 0 deletionstest/replication/gh-5874-qsync-txn-recovery.test.lua
Loading
Please register or sign in to comment