[Commented On] D9783: upgrade: take lock only for part where it's required
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Fri Jan 15 18:16:56 UTC 2021
marmoute added a comment.
In D9783#147791 <https://phab.mercurial-scm.org/D9783#147791>, @pulkit wrote:
> In D9783#147739 <https://phab.mercurial-scm.org/D9783#147739>, @marmoute wrote:
>
>> When upgrading, we need to read the requirements -with- the lock. Otherwise we can be raced by another process upgrading the requirements.
>
> The requirements which we are reading here are source repository requirements. Hence the lock was no-op here. To prevent race condition, we will need to lock the source repository. Locking source repository on a command run by share sounded like a bad idea to me and hence left it.
ah, I see.
However, we are mixing it with the current requirements, so we should re-read the current requirements under lock.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D9783/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D9783
To: pulkit, #hg-reviewers, marmoute
Cc: marmoute, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210115/6e4dff10/attachment-0002.html>
More information about the Mercurial-patches
mailing list