Skip to content
Snippets Groups Projects
user avatar
Vladimir Davydov authored
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
99d6a4f4
History
Name Last commit Last update