replication: set default replication_sync_timeout to 0
The only observable behaviour of non-zero replication_sync_timeout is that it delays box.cfg{replication=...} return until either the node is synced with others or the timeout passes. If the timeout passes without reaching sync, box.cfg{} is exited and the node enters "orphan" state, in which it can't write anything until either a reconfiguration happens or replicaset is finally synced. While the previous box.cfg{} call is running (probably waiting for replication_sync_timeout), the user can't issue another box.cfg{} call. So basically, while giving no guarantees that the node exits box.cfg{} in fully synced state, the timeout makes reconfiguration harder: even if the user knows that the sync won't be achieved, he will have to wait until the full timeout passes in order to reconfigure replication. Let's make the default value of replication_sync_timeout 0 instead of 300 seconds. The user still may set the timeout to whatever he likes. Besides, we have recently introduced box.ctl.on_recovery_state triggers, which have a "synced" event, and this is the new recommended way to wait until the node is synced with others. Part-of #5272 @TarantoolBot document Title: Changed default value for `box.cfg.replication_sync_timeout The default value for `replication_sync_timeout` configuration option was changed from 300 seconds to 0.
Showing
- changelogs/unreleased/gh-5272-replication-sync-timeout.md 4 additions, 0 deletionschangelogs/unreleased/gh-5272-replication-sync-timeout.md
- src/box/box.cc 2 additions, 2 deletionssrc/box/box.cc
- src/box/lua/load_cfg.lua 1 addition, 1 deletionsrc/box/lua/load_cfg.lua
- test/box-luatest/builtin_events_test.lua 1 addition, 0 deletionstest/box-luatest/builtin_events_test.lua
- test/box-luatest/gh_7988_auth_type_test.lua 1 addition, 0 deletionstest/box-luatest/gh_7988_auth_type_test.lua
- test/box-tap/cfg.test.lua 1 addition, 2 deletionstest/box-tap/cfg.test.lua
- test/engine-luatest/gh_6436_field_constraint_test.lua 1 addition, 0 deletionstest/engine-luatest/gh_6436_field_constraint_test.lua
- test/replication-luatest/gh_7253_election_long_wal_write_test.lua 3 additions, 1 deletion...lication-luatest/gh_7253_election_long_wal_write_test.lua
- test/replication-luatest/gh_7590_replicaset_assert_test.lua 1 addition, 1 deletiontest/replication-luatest/gh_7590_replicaset_assert_test.lua
- test/replication-luatest/iproto_id_error_test.lua 3 additions, 1 deletiontest/replication-luatest/iproto_id_error_test.lua
- test/replication-luatest/linearizable_test.lua 1 addition, 0 deletionstest/replication-luatest/linearizable_test.lua
- test/replication/recover_missing_xlog.result 4 additions, 0 deletionstest/replication/recover_missing_xlog.result
- test/replication/recover_missing_xlog.test.lua 2 additions, 0 deletionstest/replication/recover_missing_xlog.test.lua
Loading
Please register or sign in to comment