qsync: fix local writes failing on non-empty synchro queue
Local spaces can be written to on any replica, even on a read-only one. This makes sense, because local space data isn't replicated, so it can't lead to a conflict or violate consistency anyhow. However, when used together with synchronous replication, local spaces can't be written to by anyone but the synchro queue owner: ``` tarantool> box.info.synchro.queue.len --- - 1 ... tarantool> box.space.loc:replace{2} --- - error: Found uncommitted sync transactions from other instance with id 1 ... ``` Fix this and allow to put transactions touching local spaces to the synchro queue even if it is claimed by someone else. Note, we can't let local transactions bypass the synchro queue completely. This would lead to consistency loss in a case when synchro queue contains a transaction [sync_row, local_row], and another transcation [local_row], probably based on the sync transaction, bypasses the limbo. Closes #7592 NO_DOC=bugfix
Showing
- changelogs/unreleased/gh-7592-write-to-local-spaces-with-synchro.md 5 additions, 0 deletions.../unreleased/gh-7592-write-to-local-spaces-with-synchro.md
- src/box/txn.h 7 additions, 0 deletionssrc/box/txn.h
- src/box/txn_limbo.c 1 addition, 1 deletionsrc/box/txn_limbo.c
- test/replication-luatest/gh_7592_local_write_with_syncro_test.lua 93 additions, 0 deletions...lication-luatest/gh_7592_local_write_with_syncro_test.lua
Loading
Please register or sign in to comment