txn_limbo: handle CONFIRM during ROLLBACK
Limbo could try to CONFIRM LSN whose ROLLBACK is in progress. This is how it could happen: - A synchronous transaction is created, written to WAL; - The fiber sleeps in the limbo waiting for CONFIRM or timeout; - Timeout happens. ROLLBACK for this and all next LSNs is sent to WAL; - Replica receives the transaction, sends ACK; - Master receives ACK, starts writing CONFIRM for the LSN, whose ROLLBACK is in progress right now. Another case - attempt to lower synchro quorum during ROLLBACK write. It also could try to write CONFIRM. The patch skips CONFIRM if there is a ROLLBACK in progress. Not even necessary to check LSNs. Because ROLLBACK always reverts the entire limbo queue, so it will cancel all pending transactions with all LSNs, and new commits are rolled back even before they try to go to WAL. CONFIRM can't help here with anything already. Part of #5185
Please register or sign in to comment