replication: fix rebootstrap in case the instance is listed in box.cfg.replication
When checking wheter rejoin is needed, replica loops through all the instances in box.cfg.replication, which makes it believe that there is a master holding files, needed by it, since it accounts itself just like all other instances. So make replica skip itself when finding an instance which holds files needed by it, and determining whether rebootstrap is needed. We already have a working test for the issue, it missed the issue due to replica.lua replication settings. Fix replica.lua to optionally include itself in box.cfg.replication, so that the corresponding test works correctly. Closes #4759
Showing
- src/box/replication.cc 6 additions, 1 deletionsrc/box/replication.cc
- test/replication/replica.lua 10 additions, 1 deletiontest/replication/replica.lua
- test/replication/replica_rejoin.result 6 additions, 6 deletionstest/replication/replica_rejoin.result
- test/replication/replica_rejoin.test.lua 6 additions, 6 deletionstest/replication/replica_rejoin.test.lua
Loading
Please register or sign in to comment