[PATCH 0/8] box.ctl.promote
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Wed Aug 8 01:03:43 MSK 2018
Replicaset master promotion is a procedure of atomic making one
slave be a new master, and an old master be a slave in a fullmesh
master-slave replicaset.
The promotion follows the protocol described in details in the
corresponding RFC. Shortly, the protocol collects a quorum of
instances who approves the promotion, syncs data with the old
master and demotes it.
The patchset consists of several preparation commits with the most
important one describing the promotion protocol in details. The
last two patches are the promotion itself and its garbage
collection implementation.
Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-3055-box-ctl-promote
Issue: https://github.com/tarantool/tarantool/issues/3055
Vladislav Shpilevoy (8):
rfc: describe box.ctl.promote protocol
box: rename process_rw to process_dml
Add 'exact_field_count' parameter to options decoder
box: remove orphan check from box_is_ro()
Fix gcov on Mac
box: introduce _promotion space
box: introduce box.ctl.promote
box: introduce promotion GC
cmake/profile.cmake | 12 +-
doc/rfc/3055-box_ctl_promote.md | 237 +++++++
doc/rfc/3055-box_ctl_promote_img1.svg | 2 +
src/box/CMakeLists.txt | 1 +
src/box/alter.cc | 80 ++-
src/box/alter.h | 1 +
src/box/bootstrap.snap | Bin 1540 -> 1635 bytes
src/box/box.cc | 47 +-
src/box/box.h | 44 +-
src/box/errcode.h | 3 +
src/box/iproto.cc | 2 +-
src/box/key_def.c | 2 +-
src/box/lua/cfg.cc | 9 +-
src/box/lua/ctl.c | 82 +++
src/box/lua/info.c | 2 +-
src/box/lua/space.cc | 2 +
src/box/lua/upgrade.lua | 19 +
src/box/opt_def.c | 13 +-
src/box/opt_def.h | 16 +-
src/box/promote.c | 1086 +++++++++++++++++++++++++++++++++
src/box/promote.h | 170 ++++++
src/box/schema.cc | 15 +
src/box/schema_def.h | 14 +
src/cfg.c | 11 +
src/cfg.h | 3 +
src/main.cc | 1 +
test/app-tap/tarantoolctl.test.lua | 4 +-
test/box-py/bootstrap.result | 8 +-
test/box/access_misc.result | 4 +
test/box/access_sysview.result | 6 +-
test/box/alter.result | 6 +-
test/box/misc.result | 9 +-
test/promote/basic.result | 495 +++++++++++++++
test/promote/basic.test.lua | 171 ++++++
test/promote/box.lua | 8 +
test/promote/box1.lua | 112 ++++
test/promote/box2.lua | 1 +
test/promote/box3.lua | 1 +
test/promote/box4.lua | 1 +
test/promote/errinj.result | 222 +++++++
test/promote/errinj.test.lua | 87 +++
test/promote/suite.ini | 6 +
test/wal_off/alter.result | 2 +-
test/xlog/upgrade.result | 8 +-
44 files changed, 2970 insertions(+), 55 deletions(-)
create mode 100644 doc/rfc/3055-box_ctl_promote.md
create mode 100644 doc/rfc/3055-box_ctl_promote_img1.svg
create mode 100644 src/box/promote.c
create mode 100644 src/box/promote.h
create mode 100644 test/promote/basic.result
create mode 100644 test/promote/basic.test.lua
create mode 100644 test/promote/box.lua
create mode 100644 test/promote/box1.lua
create mode 120000 test/promote/box2.lua
create mode 120000 test/promote/box3.lua
create mode 120000 test/promote/box4.lua
create mode 100644 test/promote/errinj.result
create mode 100644 test/promote/errinj.test.lua
create mode 100644 test/promote/suite.ini
--
2.15.2 (Apple Git-101.1)
More information about the Tarantool-patches
mailing list