[PATCH 0/4] Introduce VY_LOG_PREPARE_LSM vylog record

Vladimir Davydov vdavydov.dev at gmail.com
Tue Mar 27 18:02:59 MSK 2018


In order to implement ALTER for vinyl spaces, we need to log index
creation before WAL write so that we can keep track of run files
created during ALTER. This patch set introduces a new vylog record
type, VY_LOG_PREPARE_LSM, for this purpose.

Patch 1 of the series adds a new method to index vtab, abort_create,
which is needed to mark prepared index as dropped in case ALTER fails.
Patch 2 is trivial refactoring in vylog code, which simplifies further
development. Patch 3 fixes a bug in vylog. Finally, patch 4 introduces
the new record type.

https://github.com/tarantool/tarantool/tree/vy-log-ddl-before-wal-write

Vladimir Davydov (4):
  index: add abort_create virtual method
  vinyl: use rlist for iterating over objects recovered from vylog
  vinyl: fix discrepancy between vy_log.tx_size and actual tx len
  vinyl: log new index before WAL write on DDL

 src/box/alter.cc                 |  18 ++
 src/box/index.cc                 |   5 +
 src/box/index.h                  |  12 ++
 src/box/memtx_bitset.c           |   1 +
 src/box/memtx_hash.c             |   1 +
 src/box/memtx_rtree.c            |   1 +
 src/box/memtx_tree.c             |   1 +
 src/box/sysview_index.c          |   1 +
 src/box/vinyl.c                  |  83 ++++++--
 src/box/vy_log.c                 | 421 +++++++++++++++++++++++++++------------
 src/box/vy_log.h                 |  40 +++-
 src/box/vy_lsm.c                 |  47 ++++-
 test/engine/truncate.result      |  87 --------
 test/engine/truncate.test.lua    |  48 -----
 test/vinyl/errinj_vylog.result   | 161 ++++++++-------
 test/vinyl/errinj_vylog.test.lua | 111 +++++------
 test/vinyl/layout.result         |   4 +-
 17 files changed, 612 insertions(+), 430 deletions(-)

-- 
2.11.0




More information about the Tarantool-patches mailing list