From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Vladimir Davydov Subject: [PATCH 0/4] vinyl: fix index drop vs compaction race Date: Wed, 23 May 2018 19:10:03 +0300 Message-Id: To: kostja@tarantool.org Cc: tarantool-patches@freelists.org List-ID: 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