Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH v2 0/7] applier: handle synchronous transactions during final
@ 2021-03-24 12:24 Serge Petrenko via Tarantool-patches
  2021-03-24 12:24 ` [Tarantool-patches] [PATCH v2 1/7] replication: fix a hang on final join retry Serge Petrenko via Tarantool-patches
                   ` (9 more replies)
  0 siblings, 10 replies; 33+ messages in thread
From: Serge Petrenko via Tarantool-patches @ 2021-03-24 12:24 UTC (permalink / raw)
  To: v.shpilevoy, gorcunov; +Cc: tarantool-patches

Initially this patches idea was to ignore synchronous rows on applier side and
make it so that there are no rolled back transactions in final join stream on
master side.

Unfortunately, this easy fix didn't work. The reason for it is that once the
replica receives initial data, up to `start_vclock`, the final join stream has
to start right at `start_vclock` so that we do not lose any transactions.

This means that once master encounters a synchro rollback and makes replica
retry final join to get rid of the rollback, it still has to send it together
with other data. And this rollback must be processed by applier to avoid
conflicts.

In order to let applier process synchro requests (CONFIRM and ROLLBACK) we need
to make final join transactional, obviously. This is what this patchset does.

An alternative would be to retry not only final, but also initial join every
time master receives a rollback during final join stage. This would be too
violent due to possibly huge data amounts being sent during initial join.

Changes in v2:
  - Make applier transactional on final join stage
  - Remove guards for rollback during final join on master side
  - Some refactoring in preparation to #5874

https://github.com/tarantool/tarantool/issues/5566
https://github.com/tarantool/tarantool/tree/sp/gh-5566-final-join-synchro-v2

Serge Petrenko (7):
  replication: fix a hang on final join retry
  applier: extract tx boundary checks from applier_read_tx into a
    separate routine
  applier: extract plain tx application from applier_apply_tx()
  applier: remove excess last_row_time update from subscribe loop
  applier: make final join transactional
  replication: tolerate synchro rollback during final join
  replication: do not ignore replica vclock on register

 changelogs/unreleased/synchro-final-join.md   |   4 +
 src/box/applier.cc                            | 461 +++++++++---------
 src/box/box.cc                                |  38 +-
 src/box/relay.cc                              |   1 +
 .../gh-5566-final-join-synchro.result         | 139 ++++++
 .../gh-5566-final-join-synchro.test.lua       |  61 +++
 test/replication/suite.cfg                    |   1 +
 7 files changed, 449 insertions(+), 256 deletions(-)
 create mode 100644 changelogs/unreleased/synchro-final-join.md
 create mode 100644 test/replication/gh-5566-final-join-synchro.result
 create mode 100644 test/replication/gh-5566-final-join-synchro.test.lua

-- 
2.24.3 (Apple Git-128)


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

end of thread, other threads:[~2021-04-05 16:15 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24 12:24 [Tarantool-patches] [PATCH v2 0/7] applier: handle synchronous transactions during final Serge Petrenko via Tarantool-patches
2021-03-24 12:24 ` [Tarantool-patches] [PATCH v2 1/7] replication: fix a hang on final join retry Serge Petrenko via Tarantool-patches
2021-03-26 20:44   ` Vladislav Shpilevoy via Tarantool-patches
2021-03-27 16:52     ` Serge Petrenko via Tarantool-patches
2021-03-29 21:50       ` Vladislav Shpilevoy via Tarantool-patches
2021-03-24 12:24 ` [Tarantool-patches] [PATCH v2 2/7] applier: extract tx boundary checks from applier_read_tx into a separate routine Serge Petrenko via Tarantool-patches
2021-03-26 12:35   ` Cyrill Gorcunov via Tarantool-patches
2021-03-27 16:54     ` Serge Petrenko via Tarantool-patches
2021-03-24 12:24 ` [Tarantool-patches] [PATCH v2 3/7] applier: extract plain tx application from applier_apply_tx() Serge Petrenko via Tarantool-patches
2021-03-26 20:47   ` Vladislav Shpilevoy via Tarantool-patches
2021-03-27 17:34     ` Serge Petrenko via Tarantool-patches
2021-03-27 18:30   ` [Tarantool-patches] [PATCH v2 3.5/7] applier: fix not releasing the latch on apply_synchro_row() fail Serge Petrenko via Tarantool-patches
2021-03-29 21:50     ` Vladislav Shpilevoy via Tarantool-patches
2021-03-30  8:15       ` Serge Petrenko via Tarantool-patches
2021-03-24 12:24 ` [Tarantool-patches] [PATCH v2 4/7] applier: remove excess last_row_time update from subscribe loop Serge Petrenko via Tarantool-patches
2021-03-24 12:24 ` [Tarantool-patches] [PATCH v2 5/7] applier: make final join transactional Serge Petrenko via Tarantool-patches
2021-03-26 20:49   ` Vladislav Shpilevoy via Tarantool-patches
2021-03-27 19:05     ` Serge Petrenko via Tarantool-patches
2021-03-29 21:51       ` Vladislav Shpilevoy via Tarantool-patches
2021-03-30  8:15         ` Serge Petrenko via Tarantool-patches
2021-03-24 12:24 ` [Tarantool-patches] [PATCH v2 6/7] replication: tolerate synchro rollback during final join Serge Petrenko via Tarantool-patches
2021-03-24 12:45   ` Serge Petrenko via Tarantool-patches
2021-03-26 20:49   ` Vladislav Shpilevoy via Tarantool-patches
2021-03-27 19:23     ` Serge Petrenko via Tarantool-patches
2021-03-24 12:24 ` [Tarantool-patches] [PATCH v2 7/7] replication: do not ignore replica vclock on register Serge Petrenko via Tarantool-patches
2021-03-26 20:50   ` Vladislav Shpilevoy via Tarantool-patches
2021-03-27 20:13     ` Serge Petrenko via Tarantool-patches
2021-03-29 21:51       ` Vladislav Shpilevoy via Tarantool-patches
2021-03-30  8:16         ` Serge Petrenko via Tarantool-patches
2021-03-30 12:33       ` Serge Petrenko via Tarantool-patches
2021-03-26 13:46 ` [Tarantool-patches] [PATCH v2 0/7] applier: handle synchronous transactions during final Cyrill Gorcunov via Tarantool-patches
2021-03-30 20:13 ` Vladislav Shpilevoy via Tarantool-patches
2021-04-05 16:15 ` Kirill Yukhin 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