rustfmt.toml
author Pierre-Yves David <pierre-yves.david@octobus.net>
Mon, 20 Mar 2023 11:52:17 +0100
branchstable
changeset 50316 87f0155d68aa
parent 45623 426294d06ddc
permissions -rw-r--r--
revlog: improve the robustness of the splitting process The previous "in-place" splitting, preserving the splitting on transaction failure had a couple of issue in case of transaction rollback: - a race windows that could still lead to a crash and data loss - it corrupted the `fncache`. So instead, we use a new approach that we summarized as "we do a backup of the inline revlog pre-split, and we restore this in case of failure". To make readers live easier, we don't overwrite the inline index file until transaction finalization. (once the transaction get into its finalization phase, it is not expected to rollback, unless some crash happens). To do so, we write the index of the split index in a temporary file that we use until transaction finalization. We also keep a backup of the initial inline file to be able to rollback the split if needed. As a result, transaction rollback cancel the split and no longer corrupt fncache. We also no longer have a small inconsistency windows where the transaction could be unrecoverable.

edition = "2018"
max_width = 79
wrap_comments = true
error_on_line_overflow = true