Mercurial > hg-stable
view .editorconfig @ 50316:87f0155d68aa stable
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.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 20 Mar 2023 11:52:17 +0100 |
parents | c25efc468a49 |
children |
line wrap: on
line source
# See http://EditorConfig.org for the specification root = true [*.py] indent_size = 4 indent_style = space trim_trailing_whitespace = true end_of_line = lf [*.{c,h}] indent_size = 8 indent_style = tab trim_trailing_whitespace = true end_of_line = lf [*.t] indent_size = 2 indent_style = space trim_trailing_whitespace = false end_of_line = lf