D757: dirstate: move opendirstatefile to dirstatemap
foozy (Katsunori FUJIWARA)
phabricator at mercurial-scm.org
Sun Oct 1 09:30:26 UTC 2017
foozy added inline comments.
INLINE COMMENTS
> durham wrote in dirstate.py:1373-1374
> Agreed. I'm not even sure what it's actually saying as a mercurial developer...
(sorry for late response)
With current implementation of dirstate, _pl() reads "dirstate"
file only for parents of wdir, and subsequent _read() will
read "dirstate" file again.
So, in this "changed parallelly" situation, 2 patterns are possible:
1. previous _pl() read 'dirstate.pending', but current _read() reads 'dirstate'
2. previous _pl() read 'dirstate', but current _read() reads 'dirstate.pending'
This should mean that:
- current (spawned) "hg" process is running parallelly from another "hg" process, which causes current transaction, and
- the latter process moves transaction processing forward without waiting for current "hg" process
For example:
1. committing (or aborting) transaction between _pl() and _read() removed 'dirstate.pending' file
2. changing "dirstate" in current (or next?) transaction newly creates 'dirstate.pending'
Spawning "hg" process from a hook process as background one can cause this.
Any hinting helps understanding ?
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D757
To: durham, #hg-reviewers, indygreg
Cc: foozy, indygreg, mercurial-devel
More information about the Mercurial-devel
mailing list