New revlog format, plan page

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Jan 11 12:12:30 UTC 2021


I finally remember a couple of things I though we could move in an index.

(1) Some of the current cache we have would fit well in such index
* The hgtagsfnodes cache: taking 4 bytes to cache the `.hgtags` revision 
number associated with a changelog revisions. (This will requires some 
bookkeeping while adding/stripping),
* the `rbc-revs-v1`: using an integer (4bytes) and an external list to 
store the branch on which each revision is,
* (probably another 4 bytes to store the sub-branch/topic,)

(2) Some cache key mechanism. Right now a lot of cache validate their 
content using a (tip-rev, tip-node) pair. That pair is fragile as it 
does not garantee that the content before the tip is the same. Having 
"some" bytes that gather some kind of accumulated value from the 
previously added nodes. It does not have to be too many bytes, as the 
(tip-node, tip-rev, cache-key) should be good enough. We can probably 
build it using a series of shift and xor of the hash we are adding.

Note that with this, the index is heavily biased toward the changelog. 
So it is probably worth having distinct format: one mean for changelog 
were we can reclaim bytes related to filelog/manifestlog (linkrev and 
unified-revlog ID).

On 1/5/21 4:38 PM, Raphaël Gomès wrote:
> Hi all,
> 
> During the last (virtual) sprint, a lot of us spoke about the need for a 
> format change of the revlog to overcome some of its limitations.
> 
> I've opened a very much draft plan page [1] to try to list all the 
> things we want to do in that version and try to figure out an efficient 
> new format.
> 
> I'm aware that the v2 is already planned, but I figured that we can just 
> merge that (seemingly) paused effort and this new one.
> 
> I wish you all a nice 2021!
> Raphaël
> 
> [1] https://www.mercurial-scm.org/wiki/RevlogV2Plan
> 
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

-- 
Pierre-Yves David



More information about the Mercurial-devel mailing list