( )⚙ D12201 tracked-key: remove the dual write and rename to tracked-hint

This is an archive of the discontinued Mercurial Phabricator instance.

tracked-key: remove the dual write and rename to tracked-hint
ClosedPublic

Authored by marmoute on Feb 17 2022, 5:24 AM.

Details

Summary

The dual-write approach was mostly useless. As explained in the previous version
of the help, the key had to be read twice before we could cache a value.

However this "read twice" limitation actually also apply to any usage of the
key. If some operation wants to rely of the "same value == same tracked set"
property it would need to read the value before, and after running that
operation (or at least, after, in all cases). So it cannot be sure the operation
it did is "valid" until checking the key after the operation. As a resultat such
operation can only be read-only or rollbackable.

This reduce the utility of the "same value == same tracked set" a lot.

So it seems simpler to drop the double write and to update the documentation to
highlight that this file does not garantee race-free operation. As a result the
"key" is demoted to a "hint".

Documentation is updated accordingly.

Diff Detail

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

Event Timeline

marmoute created this revision.Feb 17 2022, 5:24 AM
Alphare requested changes to this revision.Feb 17 2022, 5:55 AM
Alphare added a subscriber: Alphare.
Alphare added inline comments.
mercurial/helptext/config.txt
958

s/writtent/written/

965

"The "identical" use a should is a SHOULD" Not sure what the intended phrasing was

969

s/isi/is/

This revision now requires changes to proceed.Feb 17 2022, 5:55 AM
marmoute updated this revision to Diff 32260.Feb 17 2022, 8:51 AM
Alphare accepted this revision.Feb 18 2022, 5:26 AM

Amended some other typos

This revision is now accepted and ready to land.Feb 18 2022, 5:26 AM