[PATCH 0/4] vinyl: fix index drop vs compaction race
Vladimir Davydov
vdavydov.dev at gmail.com
Wed May 23 19:10:03 MSK 2018
This patch set attempts to fix a race that has existed since long ago,
but didn't manifested itself until commit 35db70fac55c8 ("vinyl: purge
dropped indexes from vylog on garbage collection"). The race results in
a broken vylog and a recovery error, similar to this:
Invalid VYLOG file: Slice 9625 deleted but not registered
To fix the race, the patch set reworks the way dropped indexes are
purged from vylog, see patch 4 for more details.
https://github.com/tarantool/tarantool/issues/3416
https://github.com/tarantool/tarantool/commits/gh-3416-vy-fix-compact-vs-index-drop-race
Vladimir Davydov (4):
vinyl: do not reuse lsm objects during recovery from vylog
alter: pass lsn of index drop record to engine
vinyl: store lsn of index drop record in vylog
vinyl: purge dropped indexes from vylog on garbage collection
src/box/alter.cc | 8 +-
src/box/index.cc | 2 +-
src/box/index.h | 11 +-
src/box/vinyl.c | 70 ++++++-----
src/box/vy_log.c | 304 ++++++++++++++++++++++++++---------------------
src/box/vy_log.h | 38 +++++-
src/box/vy_lsm.c | 2 +-
test/vinyl/gc.result | 5 +
test/vinyl/gc.test.lua | 3 +
test/vinyl/layout.result | 4 +-
10 files changed, 268 insertions(+), 179 deletions(-)
--
2.11.0
More information about the Tarantool-patches
mailing list