Skip to content
Snippets Groups Projects
Commit 99d6a4f4 authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Konstantin Osipov
Browse files

alter: init space truncate_count after recovering snapshot

The replace trigger of _truncate system space (on_replace_dd_truncate)
does nothing on insertion into or deletion from the space - it only
updates space truncate_count when a tuple gets updated. As a result,
space truncate_count isn't initialized properly after recovering
snapshot. This does no harm to memtx, because it doesn't use space
truncate_count at all, but it breaks the assumption made by vinyl that
if space truncate_count is less than index truncate_count (which is
loaded from vylog), the space will be truncated during WAL recovery and
hence there's no point in applying statements to the space (see
vy_is_committed_one). As a result, all statements inserted into a vinyl
space after snapshot following truncation of the space, are ignored on
WAL recovery. To fix that, we must initialize space truncate_count when
a tuple is inserted into _truncate system space.

Closes #2521
parent 72be507f
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment