Tarantool development patches archive
 help / color / mirror / Atom feed
* [PATCH 0/4] vinyl: fix index drop vs compaction race
@ 2018-05-23 16:10 Vladimir Davydov
  2018-05-23 16:10 ` [PATCH 1/4] vinyl: do not reuse lsm objects during recovery from vylog Vladimir Davydov
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Vladimir Davydov @ 2018-05-23 16:10 UTC (permalink / raw)
  To: kostja; +Cc: tarantool-patches

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-05-23 16:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-23 16:10 [PATCH 0/4] vinyl: fix index drop vs compaction race Vladimir Davydov
2018-05-23 16:10 ` [PATCH 1/4] vinyl: do not reuse lsm objects during recovery from vylog Vladimir Davydov
2018-05-23 16:10 ` [PATCH 2/4] alter: pass lsn of index drop record to engine Vladimir Davydov
2018-05-23 16:10 ` [PATCH 3/4] vinyl: store lsn of index drop record in vylog Vladimir Davydov
2018-05-23 16:10 ` [PATCH 4/4] vinyl: purge dropped indexes from vylog on garbage collection Vladimir Davydov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox