From: Serge Petrenko via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: v.shpilevoy@tarantool.org, gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org Subject: [Tarantool-patches] [PATCH v2 0/9] raft: introduce manual elections and fix a bug with re-applying rolled back transactions Date: Mon, 12 Apr 2021 22:40:13 +0300 [thread overview] Message-ID: <cover.1618256019.git.sergepetrenko@tarantool.org> (raw) Changes in v2: - Added tests for patches 1, 6, 9 - Minor typo fixes and bugfixes. https://github.com/tarantool/tarantool/tree/sp/gh-5445-election-fixes https://github.com/tarantool/tarantool/issues/5445 https://github.com/tarantool/tarantool/issues/3055 Serge Petrenko (9): wal: enrich row's meta information with sync replication flags xrow: introduce a PROMOTE entry box: actualise iproto_key_type array box: make clear_synchro_queue() write a PROMOTE entry instead of CONFIRM + ROLLBACK box: write PROMOTE even for empty limbo raft: keep track of greatest known term and filter replication sources based on that replication: introduce a new election mode: "manual" Support manual elections in `box.ctl.clear_synchro_queue()` box.ctl: rename clear_synchro_queue to promote changelogs/unreleased/box-ctl-promote.md | 8 + ...very => qsync-multi-statement-recovery.md} | 0 changelogs/unreleased/raft-promote.md | 4 + src/box/applier.cc | 22 +- src/box/box.cc | 167 +++++++++--- src/box/box.h | 2 +- src/box/errcode.h | 3 + src/box/iproto_constants.c | 58 +++++ src/box/iproto_constants.h | 27 +- src/box/journal.h | 2 + src/box/lua/ctl.c | 8 +- src/box/raft.c | 31 ++- src/box/raft.h | 20 ++ src/box/txn.c | 5 + src/box/txn_limbo.c | 79 +++--- src/box/txn_limbo.h | 10 +- src/box/wal.c | 26 +- src/box/xrow.c | 43 +++- src/box/xrow.h | 54 +++- src/lib/raft/raft.c | 13 +- src/lib/raft/raft.h | 48 +++- test/box/error.result | 3 + test/replication/election_basic.result | 29 ++- test/replication/election_basic.test.lua | 10 + .../gh-3055-election-promote.result | 105 ++++++++ .../gh-3055-election-promote.test.lua | 43 ++++ .../gh-5445-leader-inconsistency.result | 238 ++++++++++++++++++ .../gh-5445-leader-inconsistency.test.lua | 108 ++++++++ test/replication/suite.cfg | 2 + test/unit/raft_test_utils.c | 4 +- test/unit/xrow.cc | 64 +++-- test/unit/xrow.result | 123 ++++++++- 32 files changed, 1210 insertions(+), 149 deletions(-) create mode 100644 changelogs/unreleased/box-ctl-promote.md rename changelogs/unreleased/{qsync-multi-statement-recovery => qsync-multi-statement-recovery.md} (100%) create mode 100644 changelogs/unreleased/raft-promote.md create mode 100644 test/replication/gh-3055-election-promote.result create mode 100644 test/replication/gh-3055-election-promote.test.lua create mode 100644 test/replication/gh-5445-leader-inconsistency.result create mode 100644 test/replication/gh-5445-leader-inconsistency.test.lua -- 2.24.3 (Apple Git-128)
next reply other threads:[~2021-04-12 19:40 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-12 19:40 Serge Petrenko via Tarantool-patches [this message] 2021-04-12 19:40 ` [Tarantool-patches] [PATCH v2 1/9] wal: enrich row's meta information with sync replication flags Serge Petrenko via Tarantool-patches 2021-04-13 11:50 ` Cyrill Gorcunov via Tarantool-patches 2021-04-13 13:51 ` Serge Petrenko via Tarantool-patches 2021-04-13 14:16 ` Cyrill Gorcunov via Tarantool-patches 2021-04-13 13:09 ` Cyrill Gorcunov via Tarantool-patches 2021-04-13 13:29 ` Serge Petrenko via Tarantool-patches 2021-04-12 19:40 ` [Tarantool-patches] [PATCH v2 2/9] xrow: introduce a PROMOTE entry Serge Petrenko via Tarantool-patches 2021-04-13 14:15 ` Cyrill Gorcunov via Tarantool-patches 2021-04-14 9:12 ` Serge Petrenko via Tarantool-patches 2021-04-14 10:00 ` Cyrill Gorcunov via Tarantool-patches 2021-04-12 19:40 ` [Tarantool-patches] [PATCH v2 3/9] box: actualise iproto_key_type array Serge Petrenko via Tarantool-patches 2021-04-12 19:40 ` [Tarantool-patches] [PATCH v2 4/9] box: make clear_synchro_queue() write a PROMOTE entry instead of CONFIRM + ROLLBACK Serge Petrenko via Tarantool-patches 2021-04-13 14:33 ` Cyrill Gorcunov via Tarantool-patches 2021-04-14 8:23 ` Serge Petrenko via Tarantool-patches 2021-04-14 8:34 ` Cyrill Gorcunov via Tarantool-patches 2021-04-14 9:12 ` Serge Petrenko via Tarantool-patches 2021-04-12 19:40 ` [Tarantool-patches] [PATCH v2 5/9] box: write PROMOTE even for empty limbo Serge Petrenko via Tarantool-patches 2021-04-12 19:40 ` [Tarantool-patches] [PATCH v2 6/9] raft: keep track of greatest known term and filter replication sources based on that Serge Petrenko via Tarantool-patches 2021-04-12 19:40 ` [Tarantool-patches] [PATCH v2 7/9] replication: introduce a new election mode: "manual" Serge Petrenko via Tarantool-patches 2021-04-12 19:40 ` [Tarantool-patches] [PATCH v2 8/9] Support manual elections in `box.ctl.clear_synchro_queue()` Serge Petrenko via Tarantool-patches 2021-04-12 19:40 ` [Tarantool-patches] [PATCH v2 9/9] box.ctl: rename clear_synchro_queue to promote Serge Petrenko via Tarantool-patches 2021-04-13 14:42 ` [Tarantool-patches] [PATCH v2 0/9] raft: introduce manual elections and fix a bug with re-applying rolled back transactions Cyrill Gorcunov via Tarantool-patches
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=cover.1618256019.git.sergepetrenko@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=gorcunov@gmail.com \ --cc=sergepetrenko@tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v2 0/9] raft: introduce manual elections and fix a bug with re-applying rolled back transactions' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox