replication: enter orphan mode on manual replication configuration chage
Currently we only enter orphan mode when instance fails to connect to replication_connect_quorum remote instances during local recovery. On bootstrap and manual replication configuration change an error is thrown. We better enter orphan mode on manual config change, and leave it only in case we managed to sync with replication_connect_quorum instances. Closes #4424 @TarantoolBot document Title: document reaction on error in replication configuration change. Now when issuing `box.cfg{replication={uri1, uri2, ...}}` and failing to sync with replication_connect_quorum remote instances, the server will throw an error, if it is bootstrapping, and just set its state to orphan in all other cases (recovering from existing xlog/snap files or manually changing box.cfg.replication on the fly). To leave orphan mode, you may wait until the server manages to sync with replication_connect_quorum instances. In order to leave orphan mode you need to make the server sync with enough instances. To do so, you may either: 1) set replication_connect_quorum to a lower value 2) reset box.cfg.replication to exclude instances that cannot be reached or synced with 3) just set box.cfg.replication to "" (empty string)
Showing
- src/box/box.cc 9 additions, 5 deletionssrc/box/box.cc
- src/box/box.h 7 additions, 0 deletionssrc/box/box.h
- src/box/replication.cc 11 additions, 0 deletionssrc/box/replication.cc
- test/replication/misc.result 101 additions, 3 deletionstest/replication/misc.result
- test/replication/misc.test.lua 40 additions, 1 deletiontest/replication/misc.test.lua
Loading
Please register or sign in to comment