This is an archive of the discontinued Mercurial Phabricator instance.

dirstate-v2: Move fixed-size tree metadata into the docket file
ClosedPublic

Authored by SimonSapin on Jul 15 2021, 5:03 PM.

Details

Summary

Before this changeset, the dirstate-v2 data file contained not only nodes
and paths that may be reused when appending to an existing file,
but also some fixed-size metadata that applies to the entire tree
and was added at the end of the data file for every append.

This moves that metadata into the docket file, so that repeated "append"
operations without meaningful changes don’t actually need to grow any file.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

SimonSapin created this revision.Jul 15 2021, 5:03 PM
baymax updated this revision to Diff 29323.Jul 16 2021, 5:39 AM

✅ refresh by Heptapod after a successful CI run (🐙 💚)

marmoute accepted this revision.Jul 16 2021, 6:22 AM
Alphare accepted this revision.Jul 16 2021, 9:15 AM
Alphare added a subscriber: Alphare.

This change might be the right place to remind you to also put maybe 2 bytes worth of (for now unused) bitfield for forward compat in the docket?

This looks good to me otherwise.

This revision is now accepted and ready to land.Jul 16 2021, 9:15 AM
baymax updated this revision to Diff 29355.Jul 16 2021, 5:45 PM

✅ refresh by Heptapod after a successful CI run (🐙 💚)

baymax updated this revision to Diff 29614.Jul 20 2021, 3:42 PM

✅ refresh by Heptapod after a successful CI run (🐙 💚)