Switching from sync to async replication
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 15
- Forks
- 49
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
Product: Tarantool
Audience/target: developers/admins
Root document: https://www.tarantool.io/en/doc/latest/concepts/replication/repl_sync/
SME: @ sergepetrenko
Details
From a discussion in team chat:
Q: how to switch from sync replication to async?
A (in Russian):
- Убедиться, что на мастере больше не идут синхронные транзакции: ну, либо самим себе дать честное слово, что приложуха не обращается к синхронным спейсам, либо просто убрать все синхронные спейсы:
box.space.sync_space_name:alter{is_sync=false}. - Убедиться что все предыдущие синхронные транзакции завершены:
box.info.synchro.queue.len == 0,box.info.synchro.queue.busy == false. - На всех репликах поставить
box.cfg{election_mode='off'}. - На мастере поставить
box.cfg{election_mode='off'}. - На мастере вызвать
box.ctl.demote() - Дождаться, пока реплики догонят vclock мастера на этот момент
После этого синхронная репликация будет выключена, и кластер будет в обычном для асинхры состоянии.
Если обновление приложения и картриджа включает в себя фейловер, то нужно сперва сделать шаги выше, и только потом обновиться. То есть сперва "выключаем синхру", и потом обновляемся.
Настройки
replication_synchro_quorum
replication_synchro_timeout
election_timeout
можно не трогать, после "выключения синхры" они не будут ни на что влиять
Definition of done
- The instruction on switching from sync to async replication is added to docs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the root document at concepts/replication/repl_sync/ and review its existing sync-replication guidance. Add a documented procedure for switching to async, including the required ordering, checks, failover warning, and settings that need not change; the issue is done when the instruction is present and the checklist is satisfied.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- databases, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100