• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / tarantool / 12281 / 3
83%
master: 88%

Build:
Build:
LAST BUILD BRANCH: fmt-util-2
DEFAULT BRANCH: master
Ran 25 May 2018 08:42PM UTC
Files 301
Run time 106min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 May 2018 06:48PM UTC coverage: 81.66% (+0.03%) from 81.633%
TARGET=coverage

push

travis-ci

kostja
vinyl: purge dropped indexes from vylog on garbage collection

Currently, when an index is dropped, we remove all ranges/slices
associated with it and mark all runs as dropped in vylog immediately.
To find ranges/slices/runs, we use vy_lsm struct, see vy_log_lsm_prune.

The problem is vy_lsm struct may be inconsistent with the state stored
in vylog if index drop races with compaction, because we first write
changes done by compaction task to vylog and only then update vy_lsm
struct, see vy_task_compact_complete. Since write to vylog yields, this
opens a time window during which the index can be dropped. If this
happens, objects that were created by compaction but haven't been logged
yet (such as new runs, slices, ranges) will be deleted from vylog by
index drop, and this will permanently break vylog, making recovery
impossible.

To fix this issue, let's rework garbage collection of objects associated
with dropped indexes as follows. Now when an index is dropped, we write
a single record to vylog, VY_LOG_DROP_LSM, i.e. just mark the index as
dropped without deleting associated objects. Actual index cleanup takes
place in the garbage collection procedure, see vy_gc, which purges all
ranges/slices linked to marked indexes from vylog and marks all their
runs as dropped. When all runs are actually deleted from disk and
"forgotten" in vylog, we remove the index record from vylog by writing
VY_LOG_FORGET_LSM record. Since garbage collection procedure uses vylog
itself instead of vy_lsm struct for iterating over vinyl objects, no
race between index drop and dump/compaction can now lead to broken
vylog.

Closes #3416

38834 of 47556 relevant lines covered (81.66%)

875302.66 hits per line

Source Files on job 12281.3 (TARGET=coverage)
  • Tree
  • List 0
  • Changed 233
  • Source Changed 8
  • Coverage Changed 233
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 11220
  • Travis Job 12281.3
  • a2d1d2a2 on github
  • Prev Job for TARGET=coverage on 1.10 (#12265.3)
  • Next Job for TARGET=coverage on 1.10 (#12282.3)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc