Skip to content
Snippets Groups Projects
Commit 042c07dc authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Konstantin Osipov
Browse files

replication: stop syncing if quorum cannot be formed

If box.cfg() successfully connects to a number of replicas sufficient to
form a quorum (>= box.cfg.replication_connect_quorum), it won't return
until it syncs with all of them (lag <= box.cfg.replication_sync_lag).
If one of the replicas forming a quorum disconnects permanently while
sync is in progress, box.cfg() will hang forever.

Such a behavior is rather unreasonable. After all, syncing a quorum is
best-effort. It would be much more sensible to return from box.cfg()
leaving the instance in the 'orphan' mode in this case. This patch does
exactly that: now if we detect that not enough replicas are connected to
form a quorum while we are syncing we stop syncing immediately.
parent 0e9b87c7
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment