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.
Loading
Please register or sign in to comment