From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp45.i.mail.ru (smtp45.i.mail.ru [94.100.177.105]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 83BEE440F3C for ; Tue, 19 Nov 2019 19:05:01 +0300 (MSK) From: Georgy Kirichenko Date: Tue, 19 Nov 2019 19:04:51 +0300 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 0/6] Synchronous replication preparation List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org This patchset contains 6 patches and includes some refactoring and synchronous replication preparation. First three patches provides coio, recovery and xstream refactoring which got rid of exceptions. This makes corresponding facilities C-compliant and enables its usage from a wal source. Fourth patch fixes a rare vinyl error which manifests itself while transactional recovery as there is no data change and vy_tx log tends to be empty. Fifth patch improves recovery journal making them able to track recovery vclock. This enables the last patch which implements transactional recovery (either local wal including hot-standby or final join). Transactional recovery is essential in case of synchronous replication because this both sources (wal and final join stream) would contain written but not yet committed transaction and we will be in duty to recognize it. Branch: https://github.com/tarantool/tarantool/tree/g.kirichenko/gh-980-preparation Issue: https://github.com/tarantool/tarantool/issues/980 Georgy Kirichenko (6): recovery: do not throw an error coio: do not htrow an exception xstream: get rid of an exception vinyl: do not insert vy_tx twice into writers list box: improve recovery journal recovery: follow transaction boundaries while recovery or join src/box/applier.cc | 140 ++++++++-------- src/box/box.cc | 119 ++++++++++---- src/box/recovery.cc | 87 ++++++---- src/box/recovery.h | 14 +- src/box/relay.cc | 47 +++--- src/box/vy_tx.c | 2 +- src/box/xrow_io.cc | 59 +++---- src/box/xrow_io.h | 11 +- src/box/xstream.cc | 7 +- src/box/xstream.h | 2 +- src/lib/core/coio.cc | 212 +++++++++++++------------ src/lib/core/coio.h | 13 +- src/lib/core/coio_buf.h | 8 + test/xlog-py/big_lsn.result | 4 + test/xlog-py/big_lsn.test.py | 13 +- test/xlog-py/dup_key.result | 8 + test/xlog-py/dup_key.test.py | 7 + test/xlog/panic_on_broken_lsn.result | 9 +- test/xlog/panic_on_broken_lsn.test.lua | 7 +- 19 files changed, 449 insertions(+), 320 deletions(-) -- 2.24.0