Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-12763

Excessive lock contention when using mercurial cache with multiple repos and slaves

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The current implementation of the mercurial plugin uses a too aggressive locking approach for managing its cache across master and build slaves.

      By aggressive I mean that whenever a build starts for a given repository on any given build slave, it will block any subsequent build of any other jobs which share the same repository while it updates the cache in both the master and the slave used for the build, and also creates its working directory. With multiple jobs which share repositories (through different branches, for instance), lock contention ramps up.

      This is not necessary, as a different locking mechanism can be used to allow concurrent builds of jobs which share the same repository but run in different slaves. It can be achieved by using different locks for controlling the updates of master and slave nodes caches.

      This way, we reduce lock contention and increase cache update performance.

      A pull request has been created for this: https://github.com/jenkinsci/mercurial-plugin/pull/21

        Attachments

          Activity

          nimeacuerdo David Santiago Turiño created issue -
          nimeacuerdo David Santiago Turiño made changes -
          Field Original Value New Value
          Assignee Kohsuke Kawaguchi [ kohsuke ] David Santiago [ nimeacuerdo ]
          nimeacuerdo David Santiago Turiño made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/hudson/plugins/mercurial/Cache.java
          http://jenkins-ci.org/commit/mercurial-plugin/dc0bd85a0a396b1f83caebba3080f673ca16a99c
          Log:
          Merge pull request #21 from nimeacuerdo/master

          [FIXED JENKINS-12763] Reduce lock contention while updating caches

          Compare: https://github.com/jenkinsci/mercurial-plugin/compare/116ab226f746...dc0bd85a0a39

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/plugins/mercurial/Cache.java http://jenkins-ci.org/commit/mercurial-plugin/dc0bd85a0a396b1f83caebba3080f673ca16a99c Log: Merge pull request #21 from nimeacuerdo/master [FIXED JENKINS-12763] Reduce lock contention while updating caches Compare: https://github.com/jenkinsci/mercurial-plugin/compare/116ab226f746...dc0bd85a0a39
          scm_issue_link SCM/JIRA link daemon made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 143220 ] JNJira + In-Review [ 190447 ]

            People

            • Assignee:
              nimeacuerdo David Santiago Turiño
              Reporter:
              nimeacuerdo David Santiago Turiño
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: