Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH v4 00/16] forbid implicit limbo ownership transition
@ 2021-07-14 18:25 Serge Petrenko via Tarantool-patches
  2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 01/16] replication: always send raft state to subscribers Serge Petrenko via Tarantool-patches
                   ` (16 more replies)
  0 siblings, 17 replies; 39+ messages in thread
From: Serge Petrenko via Tarantool-patches @ 2021-07-14 18:25 UTC (permalink / raw)
  To: v.shpilevoy, gorcunov; +Cc: tarantool-patches

Changes in v4:
  - various cleanups and fixes as per review from Vlad:
    * refactor box_promote()/box_demote()
  - reorder the patches for a more logical progression

Changes in v3:
  - change demote() behaviour as discussed with Vlad:
      * make it work only on the current leader
      * make it demote the current leader and always
        bump the term
  - change how limbo and raft snapshots are sent in response
    to JOIN:
      * encode replica's version in JOIN request
      * introduce a special stage: JOIN_META with raft and limbo
        snapshots. Send it based on replica's version.\

https://github.com/tarantool/tarantool/issues/5438
https://github.com/tarantool/tarantool/issues/6034
https://github.com/tarantool/tarantool/tree/sp/gh-6034-empty-limbo-transition

Serge Petrenko (16):
  replication: always send raft state to subscribers
  txn_limbo: fix promote term filtering
  txn_limbo: persist the latest effective promote in snapshot
  replication: encode version in JOIN request
  replication: add META stage to JOIN
  replication: send latest effective promote in initial join
  replication: send current Raft term in join response
  raft: refactor raft_new_term()
  box: split promote() into reasonable parts
  box: make promote always bump the term
  box: make promote on the current leader a no-op
  box: fix an assertion failure after a spurious wakeup in promote
  box: allow calling promote on a candidate
  box: extract promote() settings to a separate method
  replication: forbid implicit limbo owner transition
  box: introduce `box.ctl.demote`

 src/box/applier.cc                            |  27 +-
 src/box/box.cc                                | 435 ++++++++++++------
 src/box/box.h                                 |   3 +
 src/box/errcode.h                             |   2 +
 src/box/iproto_constants.h                    |  12 +-
 src/box/lua/ctl.c                             |   9 +
 src/box/lua/info.c                            |   4 +-
 src/box/memtx_engine.c                        |  32 ++
 src/box/raft.c                                |  48 +-
 src/box/raft.h                                |   4 +
 src/box/relay.cc                              |  36 +-
 src/box/relay.h                               |   4 +-
 src/box/txn_limbo.c                           |  90 ++--
 src/box/txn_limbo.h                           |  14 +
 src/box/xrow.c                                |   4 +-
 src/box/xrow.h                                |  25 +-
 src/lib/raft/raft.c                           |   3 +-
 test/box/alter.result                         |   2 +-
 test/box/error.result                         |   2 +
 test/replication/election_basic.result        |   3 +
 test/replication/election_basic.test.lua      |   1 +
 test/replication/election_qsync.result        |   3 +
 test/replication/election_qsync.test.lua      |   1 +
 .../gh-3055-promote-wakeup-crash.result       |  43 ++
 .../gh-3055-promote-wakeup-crash.test.lua     |  20 +
 .../gh-4114-local-space-replication.result    |   7 +-
 .../gh-4114-local-space-replication.test.lua  |   4 +-
 .../gh-5140-qsync-casc-rollback.result        |   6 +
 .../gh-5140-qsync-casc-rollback.test.lua      |   2 +
 .../gh-5144-qsync-dup-confirm.result          |   6 +
 .../gh-5144-qsync-dup-confirm.test.lua        |   2 +
 .../gh-5163-qsync-restart-crash.result        |   6 +
 .../gh-5163-qsync-restart-crash.test.lua      |   2 +
 .../gh-5167-qsync-rollback-snap.result        |   6 +
 .../gh-5167-qsync-rollback-snap.test.lua      |   2 +
 .../gh-5195-qsync-replica-write.result        |  10 +-
 .../gh-5195-qsync-replica-write.test.lua      |   6 +-
 .../gh-5213-qsync-applier-order-3.result      |   9 +
 .../gh-5213-qsync-applier-order-3.test.lua    |   3 +
 .../gh-5213-qsync-applier-order.result        |   6 +
 .../gh-5213-qsync-applier-order.test.lua      |   2 +
 .../replication/gh-5288-qsync-recovery.result |   6 +
 .../gh-5288-qsync-recovery.test.lua           |   2 +
 .../gh-5298-qsync-recovery-snap.result        |   6 +
 .../gh-5298-qsync-recovery-snap.test.lua      |   2 +
 .../gh-5426-election-on-off.result            |   3 +
 .../gh-5426-election-on-off.test.lua          |   1 +
 .../gh-5433-election-restart-recovery.result  |   3 +
 ...gh-5433-election-restart-recovery.test.lua |   1 +
 ...sync-clear-synchro-queue-commit-all.result |   3 +
 ...nc-clear-synchro-queue-commit-all.test.lua |   1 +
 .../replication/gh-5438-election-state.result |  66 +++
 .../gh-5438-election-state.test.lua           |  29 ++
 test/replication/gh-5440-qsync-ro.result      | 133 ------
 test/replication/gh-5440-qsync-ro.test.lua    |  53 ---
 .../gh-5446-qsync-eval-quorum.result          |   6 +
 .../gh-5446-qsync-eval-quorum.test.lua        |   2 +
 .../gh-5506-election-on-off.result            |   3 +
 .../gh-5506-election-on-off.test.lua          |   1 +
 .../gh-5566-final-join-synchro.result         |   6 +
 .../gh-5566-final-join-synchro.test.lua       |   2 +
 .../gh-5874-qsync-txn-recovery.result         |   6 +
 .../gh-5874-qsync-txn-recovery.test.lua       |   2 +
 .../gh-6032-promote-wal-write.result          |   3 +
 .../gh-6032-promote-wal-write.test.lua        |   1 +
 .../gh-6034-election-candidate-promote.result |  84 ++++
 ...h-6034-election-candidate-promote.test.lua |  42 ++
 .../gh-6034-election-promote-bump-term.result |  26 ++
 ...h-6034-election-promote-bump-term.test.lua |  12 +
 .../gh-6034-qsync-limbo-ownership.result      | 186 ++++++++
 .../gh-6034-qsync-limbo-ownership.test.lua    |  68 +++
 .../gh-6057-qsync-confirm-async-no-wal.result |   7 +
 ...h-6057-qsync-confirm-async-no-wal.test.lua |   3 +
 test/replication/hang_on_synchro_fail.result  |   6 +
 .../replication/hang_on_synchro_fail.test.lua |   2 +
 test/replication/qsync_advanced.result        |  12 +
 test/replication/qsync_advanced.test.lua      |   4 +
 test/replication/qsync_basic.result           |  33 +-
 test/replication/qsync_basic.test.lua         |  16 +-
 test/replication/qsync_errinj.result          |   6 +
 test/replication/qsync_errinj.test.lua        |   2 +
 test/replication/qsync_snapshots.result       |   6 +
 test/replication/qsync_snapshots.test.lua     |   2 +
 test/replication/qsync_with_anon.result       |   6 +
 test/replication/qsync_with_anon.test.lua     |   2 +
 test/replication/replica_rejoin.result        |  77 ++--
 test/replication/replica_rejoin.test.lua      |  50 +-
 test/replication/suite.cfg                    |   6 +-
 test/unit/raft.c                              |  15 +-
 test/unit/raft.result                         |   3 +-
 90 files changed, 1436 insertions(+), 487 deletions(-)
 create mode 100644 test/replication/gh-3055-promote-wakeup-crash.result
 create mode 100644 test/replication/gh-3055-promote-wakeup-crash.test.lua
 create mode 100644 test/replication/gh-5438-election-state.result
 create mode 100644 test/replication/gh-5438-election-state.test.lua
 delete mode 100644 test/replication/gh-5440-qsync-ro.result
 delete mode 100644 test/replication/gh-5440-qsync-ro.test.lua
 create mode 100644 test/replication/gh-6034-election-candidate-promote.result
 create mode 100644 test/replication/gh-6034-election-candidate-promote.test.lua
 create mode 100644 test/replication/gh-6034-election-promote-bump-term.result
 create mode 100644 test/replication/gh-6034-election-promote-bump-term.test.lua
 create mode 100644 test/replication/gh-6034-qsync-limbo-ownership.result
 create mode 100644 test/replication/gh-6034-qsync-limbo-ownership.test.lua

-- 
2.30.1 (Apple Git-130)


^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2021-07-29 20:48 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-14 18:25 [Tarantool-patches] [PATCH v4 00/16] forbid implicit limbo ownership transition Serge Petrenko via Tarantool-patches
2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 01/16] replication: always send raft state to subscribers Serge Petrenko via Tarantool-patches
2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 02/16] txn_limbo: fix promote term filtering Serge Petrenko via Tarantool-patches
2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 03/16] txn_limbo: persist the latest effective promote in snapshot Serge Petrenko via Tarantool-patches
2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 04/16] replication: encode version in JOIN request Serge Petrenko via Tarantool-patches
2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 05/16] replication: add META stage to JOIN Serge Petrenko via Tarantool-patches
2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 06/16] replication: send latest effective promote in initial join Serge Petrenko via Tarantool-patches
2021-07-21 23:24   ` Vladislav Shpilevoy via Tarantool-patches
2021-07-23  7:44     ` Sergey Petrenko via Tarantool-patches
2021-07-26 23:43       ` Vladislav Shpilevoy via Tarantool-patches
2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 07/16] replication: send current Raft term in join response Serge Petrenko via Tarantool-patches
2021-07-21 23:24   ` Vladislav Shpilevoy via Tarantool-patches
2021-07-23  7:44     ` Sergey Petrenko via Tarantool-patches
2021-07-26 23:43       ` Vladislav Shpilevoy via Tarantool-patches
2021-07-29 20:46         ` Sergey Petrenko via Tarantool-patches
2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 08/16] raft: refactor raft_new_term() Serge Petrenko via Tarantool-patches
2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 09/16] box: split promote() into reasonable parts Serge Petrenko via Tarantool-patches
2021-07-21 23:26   ` Vladislav Shpilevoy via Tarantool-patches
2021-07-23  7:45     ` Sergey Petrenko via Tarantool-patches
2021-07-26 23:44       ` Vladislav Shpilevoy via Tarantool-patches
2021-07-29 20:46         ` Sergey Petrenko via Tarantool-patches
2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 10/16] box: make promote always bump the term Serge Petrenko via Tarantool-patches
2021-07-26 23:45   ` Vladislav Shpilevoy via Tarantool-patches
2021-07-29 20:46     ` Sergey Petrenko via Tarantool-patches
2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 11/16] box: make promote on the current leader a no-op Serge Petrenko via Tarantool-patches
2021-07-21 23:26   ` Vladislav Shpilevoy via Tarantool-patches
2021-07-23  7:45     ` Sergey Petrenko via Tarantool-patches
2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 12/16] box: fix an assertion failure after a spurious wakeup in promote Serge Petrenko via Tarantool-patches
2021-07-21 23:29   ` Vladislav Shpilevoy via Tarantool-patches
2021-07-23  7:45     ` Sergey Petrenko via Tarantool-patches
2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 13/16] box: allow calling promote on a candidate Serge Petrenko via Tarantool-patches
2021-07-15 14:06   ` Serge Petrenko via Tarantool-patches
2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 14/16] box: extract promote() settings to a separate method Serge Petrenko via Tarantool-patches
2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 15/16] replication: forbid implicit limbo owner transition Serge Petrenko via Tarantool-patches
2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 16/16] box: introduce `box.ctl.demote` Serge Petrenko via Tarantool-patches
2021-07-15 17:13   ` Serge Petrenko via Tarantool-patches
2021-07-15 20:11   ` [Tarantool-patches] [PATCH v4 17/16] replication: fix flaky election_qsync.test Serge Petrenko via Tarantool-patches
2021-07-26 23:43 ` [Tarantool-patches] [PATCH v4 00/16] forbid implicit limbo ownership transition Vladislav Shpilevoy via Tarantool-patches
2021-07-29 20:47   ` Sergey Petrenko via Tarantool-patches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox