Mercurial > hg-stable
diff mercurial/configitems.py @ 47245:616b8f412676
revlogv2: introduce a very basic docket file
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.
Differential Revision: https://phab.mercurial-scm.org/D10624
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 03 May 2021 12:34:11 +0200 |
parents | 21b3e6116bd1 |
children | 6b1eae313b2f |
line wrap: on
line diff
--- a/mercurial/configitems.py Mon May 17 15:05:24 2021 +0200 +++ b/mercurial/configitems.py Mon May 03 12:34:11 2021 +0200 @@ -1150,14 +1150,27 @@ ) # "out of experimental" todo list. # -# * to grow a docket file to at least store the last offset of the data -# file when rewriting sidedata. -# * need a way of dealing with garbage data if we allow rewriting -# *existing* sidedata. +# * stop storing version information in the index (it is already in the docket) +# * properly hide uncommitted content to other process +# * expose transaction content hooks during pre-commit validation +# * include management of a persistent nodemap in the main docket +# * enforce a "no-truncate" policy for mmap safety +# - for censoring operation +# - for stripping operation +# - for rollback operation +# * store the data size in the docket to simplify sidedata rewrite. +# * track garbage data to evemtually allow rewriting -existing- sidedata. # * Exchange-wise, we will also need to do something more efficient than # keeping references to the affected revlogs, especially memory-wise when # rewriting sidedata. -# * Also... compress the sidedata? (this should be coming very soon) +# * sidedata compression +# * introduce a proper solution to reduce the number of filelog related files. +# * Improvement to consider +# - track compression mode in the index entris instead of the chunks +# - split the data offset and flag field (the 2 bytes save are mostly trouble) +# - keep track of uncompressed -chunk- size (to preallocate memory better) +# - keep track of chain base or size (probably not that useful anymore) +# - store data and sidedata in different files coreconfigitem( b'experimental', b'revlogv2',