Skip to content
Snippets Groups Projects
Commit 5370882f authored by Vladislav Shpilevoy's avatar Vladislav Shpilevoy
Browse files

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
parent 64de84bc
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment