Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* This method is needed for autofailover mechanisms mainly to enforce read_only=true during loading phase of tarantool. Before this patch race condition existed between autofailover and moonlibs/config recovering behaviour. If master crashes but fastly restarts then it initiates long running loading phase. Master recovers as read_only=true but after returning from box.cfg moonlibs/config retrieves config from ETCD and rechecks read_only option. The race happens when autofailover changes configuration in ETCD, but master just in time returns from loading phase and applies oldest configuration. This leads cluster to split-brain. With method config.enforce_ro it is possible for external coordinator firstly enforce_ro on loading leader and receive approval that leader will not be promoted to rw until next reload configuration. tarantool is enforcable to be ro only when all of the following conditions are met: 1) Tarantool is recovering from snapshot (it was already bootstrapped) 2) Client's code do not override box.cfg with passing args.boxcfg 3) args.tidy_load is enabled (default, but can be overriden by client) 4) config uses ETCD to retreive topology.
- Loading branch information