[Tarantool-patches] [PATCH v4 00/12] raft: introduce manual elections and fix a bug with re-applying rolled back transactions

Serge Petrenko sergepetrenko at tarantool.org
Fri Apr 16 19:25:31 MSK 2021


Changes in v4:
  - review fixes as per review from Vlad

Changes in v3:
  - fix gh-5445-leader-inconsistency.test.lua flakiness
  - fixes as per review from Cyrill Gorcunov
  - minor fixes and rewordings
  - rebased on top of current master
  - added patch 9/10 (remove parameter from clear_synchro_queue)

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 (12):
  wal: make wal_assign_lsn accept journal entry
  xrow: 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: filter rows based on known peer terms
  election: introduce a new election mode: "manual"
  raft: introduce raft_start/stop_candidate
  election: support manual elections in clear_synchro_queue()
  box: remove parameter from 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                                | 161 +++++++---
 src/box/box.h                                 |   2 +-
 src/box/errcode.h                             |   2 +
 src/box/iproto_constants.c                    |  58 ++++
 src/box/iproto_constants.h                    |  31 +-
 src/box/journal.h                             |   3 +
 src/box/lua/ctl.c                             |   8 +-
 src/box/raft.c                                |  37 ++-
 src/box/raft.h                                |  20 ++
 src/box/txn.c                                 |   9 +
 src/box/txn_limbo.c                           |  85 ++---
 src/box/txn_limbo.h                           |   9 +-
 src/box/wal.c                                 |  24 +-
 src/box/xrow.c                                |  58 ++--
 src/box/xrow.h                                |  61 ++--
 src/lib/raft/raft.c                           |  84 +++--
 src/lib/raft/raft.h                           |  59 ++++
 test/box/error.result                         |   2 +
 test/replication/election_basic.result        |   4 +-
 .../gh-3055-election-promote.result           | 105 +++++++
 .../gh-3055-election-promote.test.lua         |  43 +++
 .../gh-5445-leader-inconsistency.result       | 292 ++++++++++++++++++
 .../gh-5445-leader-inconsistency.test.lua     | 129 ++++++++
 test/replication/suite.cfg                    |   2 +
 test/unit/raft.c                              |  66 +++-
 test/unit/raft.result                         |  23 +-
 test/unit/xrow.cc                             | 104 +++++--
 test/unit/xrow.result                         | 133 +++++++-
 32 files changed, 1437 insertions(+), 211 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)



More information about the Tarantool-patches mailing list