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

tarantool / tarantool / 8774
91%
master: 88%

Build:
Build:
LAST BUILD BRANCH: luatest-bump
DEFAULT BRANCH: master
Ran 19 Jul 2017 03:17PM UTC
Jobs 1
Files 243
Run time 14s
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

pending completion
8774

push

travis-ci

kostja
vinyl: use LSN from WAL instead of index_opts->lsn in vylog

An index can be dropped and then recreated with the same space/index id.
To discriminate between different incarnations of the same index during
recovery, we use index LSN stored in index options, as it is supposed to
be unique. However, the uniqueness property doesn't always hold:

 - If two indexes are created from different fibers, they might receive
   the same LSN.

 - If an index is created by inserting a record into _index system space
   directly, without using the public API, as it is the case in case of
   logical backup, its LSN might conflict with the LSN of an existing
   index or a previous incarnation of the same index stored in vylog.

These exceptions can result in unrecoverable errors during local
recovery, like this one:

  F> can't initialize storage: Invalid VYLOG file: Duplicate index id 3

Besides, storing LSN in index options is ugly, because LSN isn't a
user-defined option - it's a part of the implementation.

To fix this issues, let's use the LSN passed to Index::commitCreate,
i.e. the actual LSN received by the row that created the index. There's
one problem though: snapshot rows don't store LSNs. However, it doesn't
mean we can't find the index in vylog corresponding to a snapshot row:
we just need to look up the index by space_id/index_id instead of LSN
and then compare the snapshot LSN with the LSN of the last index
incarnation stored in vylog - if the latter turns out to be less, then
we need to load the index, otherwise the index is going to be dropped
and we need to load a dummy index. For more details, see the comment to
vy_recovery_load_index().

Another issue that needs a clarification is backward compatibility. The
thing is the LSN written to the index options lags behind the actual LSN
assigned to the row that created the index by 1. So to preserve backward
compatibility, we use LSN from index options for legacy indexes that
have it, while for indexes cr... (continued)

130 of 130 new or added lines in 3 files covered. (100.0%)

29863 of 34577 relevant lines covered (86.37%)

1117368.83 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
100.0
src/box/vinyl.c
16
100.0
src/box/vy_log.c

Uncovered Existing Lines

Lines Coverage ∆ File
1
100.0
src/box/vclock.c
1
100.0
src/box/vy_index.c
1
100.0
src/box/xrow.c
1
100.0
src/lib/small/small/lf_lifo.h
3
100.0
src/box/txn.cc
3
100.0
src/box/vy_log.c
7
100.0
src/box/memtx_engine.cc
18
100.0
src/box/vy_mem.c
31
100.0
src/box/iproto.cc
36
100.0
src/box/alter.cc
60
100.0
src/box/box.cc
125
100.0
src/box/vinyl.c
Jobs
ID Job ID Ran Files Coverage
4 8774.4 (TARGET=coverage) 19 Jul 2017 03:17PM UTC 0
86.37
Travis Job 8774.4
Source Files on build 8774
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #8774
  • 26af611f on github
  • Prev Build on 1.7 (#8765)
  • Next Build on 1.7 (#8778)
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