On 8/20/24 04:04, Ludovic Chabant wrote:
Hey Georges, thanks for the detailed explanation!

So I incorrectly assumed that setting persistent-nodemap.slow-path to
`warn` was not, in fact, going to run some undesirable pure-Python
implementation, but would actually entirely skip that feature, as if
it had never been enabled.  I guess it's not possible because of what
you say here:

And of course, disabling the persistent nodemap and re-enabling it is
making an inconsistent repository. Think of what could happen in a
mixed systems environment using some remote mounts, where some would
have the Rust extension, and some would not (perhaps because their
platform does not have a Rust toolchain). This is probably not what
could happen in sr.ht, but Mercurial has to think of such use cases
as well.
I don't understand the problem completely, but I get the feeling it's
something along the lines of "changeset IDs aren't deterministic so two
identical repos could have different persistent-nodemaps and a client
would get confused when talking to one and then talking the the other"?
Or something like that?

It is somewhat simpler, it is akin to a database index. Once it is in use, it has to be kept in sync with the main data, otherwise queries will return wrong results. If Mercurial alllowed to disable it and re-enable it later, any mutation done in between would turn into inconsistencies. This include using a nodemap-ready client and one which is not on the same files (nothing to do with exchange, i.e push and pull, we're talking about a unique local repo here).

Of course checking for consistency and recomputing if needed from the main data is not an option for regular operation, as the whole point is to be very very fast. The changeset ID is deterministic, by the way (computed by hashing the data).


Anyway, I guess we'll have to consider circumventing the Alpine package
and do our own install of Mercurial, similar to how you do it in
Heptapod...

Yes, and as I have some old container images based on Alpine with the packaged Mercurial to upgrade, I am warned, thank you. Not the best time for me to dig deeper, but it'll be interesting to understand why Alpine went back on the Rust impl and work with them if there is perspective of a better situation.k

Best,

Attachment: OpenPGP_0xB8EB20361976F291.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mercurial mailing list
Mercurial@lists.mercurial-scm.org
https://lists.mercurial-scm.org/mailman/listinfo/mercurial

Reply via email to