Mercurial > hg
comparison mercurial/revlogutils/constants.py @ 47234: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 | 4d1c893b9095 |
children | 130c9f7ed914 |
comparison
equal
deleted
inserted
replaced
47233:bcafcd779d2e | 47234:616b8f412676 |
---|---|
131 FEATURES_BY_VERSION = { | 131 FEATURES_BY_VERSION = { |
132 REVLOGV0: { | 132 REVLOGV0: { |
133 b'inline': _no, | 133 b'inline': _no, |
134 b'generaldelta': _no, | 134 b'generaldelta': _no, |
135 b'sidedata': False, | 135 b'sidedata': False, |
136 b'docket': False, | |
136 }, | 137 }, |
137 REVLOGV1: { | 138 REVLOGV1: { |
138 b'inline': _from_flag(FLAG_INLINE_DATA), | 139 b'inline': _from_flag(FLAG_INLINE_DATA), |
139 b'generaldelta': _from_flag(FLAG_GENERALDELTA), | 140 b'generaldelta': _from_flag(FLAG_GENERALDELTA), |
140 b'sidedata': False, | 141 b'sidedata': False, |
142 b'docket': False, | |
141 }, | 143 }, |
142 REVLOGV2: { | 144 REVLOGV2: { |
143 # There is a bug in the transaction handling when going from an | 145 # The point of inline-revlog is to reduce the number of files used in |
144 # inline revlog to a separate index and data file. Turn it off until | 146 # the store. Using a docket defeat this purpose. So we needs other |
145 # it's fixed, since v2 revlogs sometimes get rewritten on exchange. | 147 # means to reduce the number of files for revlogv2. |
146 # See issue6485 | |
147 b'inline': _no, | 148 b'inline': _no, |
148 b'generaldelta': _yes, | 149 b'generaldelta': _yes, |
149 b'sidedata': True, | 150 b'sidedata': True, |
151 b'docket': True, | |
150 }, | 152 }, |
151 } | 153 } |
152 | 154 |
153 SPARSE_REVLOG_MAX_CHAIN_LENGTH = 1000 | 155 SPARSE_REVLOG_MAX_CHAIN_LENGTH = 1000 |