Skip to content
Snippets Groups Projects
Commit 490028ac authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Roman Tsisyk
Browse files

vinyl: create files for empty runs

When we finally start storing vinyl metadata in a memtx table, we will
create an entry for a run as soon as we add the in-memory index which is
going to become the run after it's dumped. On recovery, we won't replay
xlog rows which add statements to in-memory indexes that have already
been dumped. We are planning to detect this by checking if the in-memory
index has a file on disk. To be able to do this in case all entries in a
range cancel each other on dump, we need to create files for empty runs.

Note, although we could delete empty runs from memory right away, we'll
need to have all runs when we switch to storing vinyl metadata in memtx,
including empty ones, on the list so that we can delete records from the
memtx table when they get compacted. In order not to break read/write
iterator assumptions, just skip empty runs when opening an iterator.
parent dba6a639
Loading
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