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

vinyl: cleanup range file creation

 1. Consolidate temp file creation, initial run write, and range file
    rename in a single function, vy_range_write_run(). Use it in both
    dump and compact procedures.

 2. Do unlink on range file write failure in vy_range_write_run()
    instead of postponing it unilt vy_range_delete().

 3. #2 allows us to move range->id initialization from
    vy_range_complete() to vy_range_new(), as uninitialized ->id was
    only used to check if a range file is incomplete and delete it in
    vy_range_delete().

 4. #3 allows to make index->range_id_max non-atomic, as vy_range_new()
    is only called from the tx thread (in contrast to vy_range_complete,
    which hosted range->id allocation before).
parent b3507607
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