replication: tolerate synchro rollback during final join
Both box_process_register and box_process_join had guards ensuring that not a single rollback occured for transactions residing in WAL around replica's _cluster registration. Both functions would error on a rollback and make the replica retry final join. The reason for that was that replica couldn't process synchronous transactions correctly during final join, because it applied the final join stream row-by-row. This path with retrying final join was a dead end, because even if master manages to receive no ROLLBACK messages around N-th retry of box.space._cluster:insert{}, replica would still have to receive and process all the data dating back to its first _cluster registration attempt. In other words, the guard against sending synchronous rows to the replica didn't work. Let's remove the guard altogether, since now replica is capable of processing synchronous txs in final join stream and even retrying final join in case the _cluster registration was rolled back. Closes #5566
Showing
- changelogs/unreleased/synchro-final-join.md 4 additions, 0 deletionschangelogs/unreleased/synchro-final-join.md
- src/box/applier.cc 2 additions, 0 deletionssrc/box/applier.cc
- src/box/box.cc 0 additions, 24 deletionssrc/box/box.cc
- src/box/relay.cc 1 addition, 0 deletionssrc/box/relay.cc
- test/replication/gh-5566-final-join-synchro.result 139 additions, 0 deletionstest/replication/gh-5566-final-join-synchro.result
- test/replication/gh-5566-final-join-synchro.test.lua 61 additions, 0 deletionstest/replication/gh-5566-final-join-synchro.test.lua
- test/replication/suite.cfg 1 addition, 0 deletionstest/replication/suite.cfg
Loading
Please register or sign in to comment