( )⚙ D10624 revlogv2: introduce a very basic docket file

This is an archive of the discontinued Mercurial Phabricator instance.

revlogv2: introduce a very basic docket file
ClosedPublic

Authored by marmoute on May 3 2021, 7:54 AM.

Details

Summary

This is the first stone toward using a docket file in revlogv2. Right now the
docket is very basic and only store the version number (which is -also- stored
into the index file…) and the other files have fixed name. This new
implementation break transactionally… but they are no test checking
transactionally for revlogv2… So I take this as an opportunity to start small.
They are no usage of revlogv2 outside of tests anyway.

The docket keeps the .i naming used by previous version index to preserve a
unique entry point. We could decide to use a different name and look it up
first, or to fully rework this in a future "store" version. However that does
not seems necessary right now.

We will re-introduces transactionality (and associated testing…) in a later
changesets.

A long list of TODOs have been added to the relevant comment.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

marmoute created this revision.May 3 2021, 7:54 AM
baymax updated this revision to Diff 27467.May 3 2021, 9:32 PM

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

marmoute updated this revision to Diff 27542.May 4 2021, 10:13 AM

Adding more files to the revlog layer sounds like a move in the wrong direction and the motivation here seems quite weak too. Please discuss this with an actual plan on the mailing list.

Adding more files to the revlog layer sounds like a move in the wrong direction and the motivation here seems quite weak too. Please discuss this with an actual plan on the mailing list.

The main goal here is to have a more extensive/flexible revlog format (for example using dictionnary for compression, or children cache, etc) and (eventually) strict mmap safety.

Reducing the overall number of file for filelogs is listed as an explicite TODO before freezing the format, so I don't think that extra file will be an issue by the time we freeze the format. On the short terms my plan are only about releasing a narrow "changelogv2" format with different index field as the current revlogv2 one. In since there is only one changelog and it already has a docket. I don't expect this to be an issue.

Various aspect of this were discussed at 5.7 sprint (in VC) and have some details about it here https://www.mercurial-scm.org/wiki/MMapPlan

baymax updated this revision to Diff 27870.May 11 2021, 1:44 PM

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

Alphare accepted this revision.May 17 2021, 9:58 AM
Alphare added a subscriber: Alphare.

Just to clarify: this is a move in the right direction for mmap and rewriting purposes, but a solution for unified filelog/revlog will be needed to move all revlogs to revlogv2.

mercurial/revlogutils/docket.py
13

*insert joke about french pointers*

This revision is now accepted and ready to land.May 17 2021, 9:58 AM
This revision was automatically updated to reflect the committed changes.