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