[PATCH 0/3] Speed up recovery in case rebootstrap is not needed

Vladimir Davydov vdavydov.dev at gmail.com
Fri Jun 15 18:48:19 MSK 2018


The following patches address the comment by @kostja to the commit that
added extra scan of the last WAL file in order to find instance vclock
before proceeding to local recovery, which is needed to determine if the
instance fell too much behind its peers in the cluster and so should be
rebootstrapped:

On Thu, Jun 14, 2018 at 03:59:20PM +0300, Konstantin Osipov wrote:
> Patch #3 is OK to push, but it needs an immediate follow-up patch
> which speeds recovery up for most cases.

To speed up recovery, this patch set makes tarantool create a new empty
xlog file on shutdown and reopen it on restart.

https://github.com/tarantool/tarantool/commits/gh-461-replica-rejoin

Vladimir Davydov (3):
  xlog: erase eof marker when reopening existing file for writing
  wal: rollback vclock on write failure
  wal: create empty xlog on shutdown

 src/box/recovery.cc                   | 23 --------------
 src/box/wal.c                         | 58 +++++++++++++++++++++++++++++++++--
 src/box/xlog.c                        | 12 +++++---
 test/replication/hot_standby.result   | 12 ++++----
 test/replication/hot_standby.test.lua |  4 +--
 test/xlog-py/dup_key.result           | 20 +++---------
 test/xlog-py/dup_key.test.py          | 29 ++++++------------
 test/xlog/panic_on_lsn_gap.result     | 34 +++++++++-----------
 test/xlog/panic_on_lsn_gap.test.lua   | 15 +++------
 test/xlog/panic_on_wal_error.result   | 23 +-------------
 test/xlog/panic_on_wal_error.test.lua |  9 +-----
 11 files changed, 106 insertions(+), 133 deletions(-)

-- 
2.11.0




More information about the Tarantool-patches mailing list