limbo: rollback new txns during foreign promote
Before the patch a limbo owner could try to add new transaction to it while processing a remote PROMOTE. That led to a crash - commit of PROMOTE after the WAL write expected that it would empty the whole queue, which didn't work for records not having an LSN yet. Interestingly, all worked fine when PROMOTE was local - it turns the limbo into the auto-rollback mode. It didn't happen for requests coming from the applier. This patch extends synchro request execution pipeline - now there is a preparation step. It is done both for local and for remote synchro requests the same. For PROMOTE it activates auto-rollback mode. DEMOTE might seem the same, but it doesn't look affected. To receive a foreign DEMOTE the node would need not to be the queue owner. Hence it wouldn't be able to append new synchro txns during the DEMOTE WAL write. Part of #6842 NO_DOC=Bugfix NO_CHANGELOG=To be added later
Showing
- src/box/applier.cc 5 additions, 1 deletionsrc/box/applier.cc
- src/box/txn_limbo.c 76 additions, 6 deletionssrc/box/txn_limbo.c
- src/box/txn_limbo.h 25 additions, 1 deletionsrc/box/txn_limbo.h
- test/replication-luatest/gh_6842_qsync_applier_order_test.lua 164 additions, 0 deletions.../replication-luatest/gh_6842_qsync_applier_order_test.lua
- test/replication-luatest/suite.ini 1 addition, 1 deletiontest/replication-luatest/suite.ini
Loading
Please register or sign in to comment