[Bug 5104] New: hg share extension lock not work if launched two parallel clones of same repo

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Wed Feb 17 16:11:29 UTC 2016


https://bz.mercurial-scm.org/show_bug.cgi?id=5104

            Bug ID: 5104
           Summary: hg share extension lock not work if launched two
                    parallel clones of same repo
           Product: Mercurial
           Version: 3.6.2
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: share
          Assignee: bugzilla at selenic.com
          Reporter: gorka.gil at openbravo.com
                CC: mercurial-devel at selenic.com

Summary:

The lock for avoiding parallel executions in shared pool, looks like is not
working when launching two parallel clones of same repo at same time, for the
first time.

-------

Steps to reproduce:

1) Setup share extension in hgrc config:
    [extensions]
    share = 
    [share]
    pool = /srv/sharepool
    poolnaming = remote

2) Ensure that the sharepool don't have the cache for repo 'foo', so it is the
first clone.

3) Do two parallel clones of repo 'foo':

    hg clone http://foo foo & hg clone http://foo foo2

[1] 5092
(sharing from new pooled repository 32f644250968a066ff99eddbe980528f899556d2)
(sharing from new pooled repository 32f644250968a066ff99eddbe980528f899556d2)
abort: destination '/srv/sharepool/32f644250968a066ff99eddbe980528f899556d2' is
not empty
[....]

4) Result:
   The first clone finished just successfully and creates correctly the shared
pool. The second one fails.

-------

Note: adding a sleep of 1 sec between the two clones, will make the lock
appears to work correctly:

   hg clone http://foo foo & sleep 1 && hg clone http://foo foo2

[1] 5134
(sharing from new pooled repository 32f644250968a066ff99eddbe980528f899556d2)
(sharing from existing pooled repository
32f644250968a066ff99eddbe980528f899556d2)
updating working directory
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
waiting for lock on repository foo2 held by 'host1:5134'
[...]

Result: In this case the lock works correctly.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list