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

test: vinyl: test recovery after incomplete splits

The idea behind the test is simple - create several invalid range files,
i.e. those left from previous dumps and incomplete splits, then restart
the server and check that the content of the space was not corrupted.

To make it possible, we need to (1) prevent the garbage collector from
removing unused range files and (2) make the split procedure fail after
successfully writing the first range. We use error injection to achieve
that.

The test runs as follows:

 1. Disable garbage collection with the aid of error injection.

 2. Add a number of tuples to the test space that would make it split.
    Rewrite them several times with different values so that different
    generations of ranges on disk would have different contents.

 3. Inject error to the split procedure.

 4. Rewrite the tuples another couple of rounds. This should trigger
    split which is going to fail leaving invalid range files with newer
    ids on the disk.

 5. Restart the server and check that the test space content was not
    corrupted.
parent c344dfff
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