tarantool / tarantool/doc

Switching from sync to async replication

Open
#3,595 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

add details concepts replication
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):

  1. Убедиться, что на мастере больше не идут синхронные транзакции: ну, либо самим себе дать честное слово, что приложуха не обращается к синхронным спейсам, либо просто убрать все синхронные спейсы: box.space.sync_space_name:alter{is_sync=false}.
  2. Убедиться что все предыдущие синхронные транзакции завершены: box.info.synchro.queue.len == 0, box.info.synchro.queue.busy == false.
  3. На всех репликах поставить box.cfg{election_mode='off'}.
  4. На мастере поставить box.cfg{election_mode='off'}.
  5. На мастере вызвать box.ctl.demote()
  6. Дождаться, пока реплики догонят 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.