Skip to content
Snippets Groups Projects
Commit 551f82a1 authored by Vladimir Davydov's avatar Vladimir Davydov
Browse files

vinyl: skip bad vylog records in force_recovery mode

We've had a number of issues when Tarantool was permanently broken
(unable to recover after restart) because of a bad vylog record.
The `force_recovery` mode didn't help so the user would have no other
choice but to rebootstrap. A funny thing is those bugs were usually
caused by a race between the garbage collector and dump/compaction when
a vylog record was written for a dropped index. The worst thing that
could happen if we ignored such a bad record is an unused run file not
deleted from disk. Apparently, this is better than a permanent recovery
failure so let's support the `force_recovery` mode in vylog.

The tricky part here is handling checkpoint after restart. The problem
is that to create a vylog checkpoint, we load the previous vylog file
so we have to ignore errors if it was loaded in the `force_recovery`
mode.

Closes #10292

NO_DOC=bug fix

(cherry picked from commit c68e8a8e029d849d68c6018ed00b5a79cc769222)
parent 90be4422
No related branches found
No related tags found
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