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

vinyl: rotate mem on ddl

An index drop results in changing the space format, which means that
statements inserted into the space after and before an index drop have
different formats. When dumping an in-memory tree, we need to know the
format of its statements. Keeping track of all possible formats tuples
of an in-memory tree can have would be cumbersome. It's easier to simply
rotate in-memory trees of all ranges of the space whose index was
dropped so that each tree could only have the only format. To make it
effective, we rotate trees lazily, on first insertion into a tree after
ddl. To keep things simple, we rotate in-memory trees on each and every
ddl, i.e. each time we see sc_version change. Note, we rotate trees in
vy_commit() -> vy_tx_write() rather than in vy_prepare(). This is
because sc_version is changed after WAL write.
parent 8a9dbdf4
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