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

vinyl: log index drop in metadata journal

We need to log index drop requests in order to be able to filter out
dropped indexes from the metadata log on rotation, which is yet to be
implemented. The problem is that we can't fail vy_index_drop(), because
index drop request has already been written to WAL by the time it is
called. We cope with it by writing VY_LOG_DROP_INDEX record with
@no_discard flag set to true, so that even if vy_log_tx_commit() fails,
it stays in the buffer and can be flushed along with the next
transaction. If it isn't flushed before the server is restarted, we
replay the record in the metadata log buffer on WAL recovery, returning
to exactly the same condition we had before restart.

While we are at it, rename VY_LOG_NEW_INDEX to VY_LOG_CREATE_INDEX for
consistency.
parent 3a7df43d
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