replication: fix rebootstrap race that results in broken subscription
While a node of the cluster is re-bootstrapping (joining again), other nodes may try to re-subscribe to it. They will fail, because the rebootstrapped node hasn't tried to subscribe hence hasn't been added to the _cluster table yet and so is not present in the hash at the subscriber's side for replica_on_applier_reconnect() to look it up. Fix this by making a subscriber create an id-less (REPLICA_ID_NIL) struct replica in this case and reattach the applier to it. It will be assigned an id when it finally subscribes and is registered in _cluster. Fixes 71b33405 replication: reconnect applier on master rebootstrap
Showing
- src/box/box.cc 5 additions, 4 deletionssrc/box/box.cc
- src/box/replication.cc 9 additions, 4 deletionssrc/box/replication.cc
- test/replication/quorum.result 66 additions, 5 deletionstest/replication/quorum.result
- test/replication/quorum.test.lua 31 additions, 4 deletionstest/replication/quorum.test.lua
Loading
Please register or sign in to comment