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

getAssignedLabel in MavenModule is implemented with lazy loading

    Details

    • Similar Issues:

      Description

      getAssignedLabel function seems to be triggering lazy loading in MavenModule class which can then take some time to complete.

      Maybe should use getSameNodeConstraint

      https://github.com/jenkinsci/maven-plugin/blob/master/src/main/java/hudson/maven/MavenModule.java#L459

      Append by Steven Christou

      Stack trace snippet below:

       - hudson.model.RunMap.retrieve(java.io.File) @bci=21, line=218 (Interpreted frame)
       - hudson.model.RunMap.retrieve(java.io.File) @bci=2, line=56 (Interpreted frame)
       - jenkins.model.lazy.AbstractLazyLoadRunMap.load(java.io.File, jenkins.model.lazy.AbstractLazyLoadRunMap$Index) @bci=2, line=688 (Interpreted frame)
       - jenkins.model.lazy.AbstractLazyLoadRunMap.load(int, jenkins.model.lazy.AbstractLazyLoadRunMap$Index) @bci=36, line=650 (Compiled frame)
       - jenkins.model.lazy.AbstractLazyLoadRunMap.search(int, jenkins.model.lazy.AbstractLazyLoadRunMap$Direction) @bci=80, line=382 (Compiled frame)
       - jenkins.model.lazy.LazyBuildMixIn$RunMixIn.getPreviousBuild() @bci=78, line=366 (Interpreted frame)
       - hudson.model.AbstractBuild.getPreviousBuild() @bci=4, line=196 (Interpreted frame)
       - hudson.model.AbstractBuild.getPreviousBuild() @bci=1, line=104 (Interpreted frame)
       - hudson.tasks.Fingerprinter$FingerprintAction.compact() @bci=14, line=352 (Interpreted frame)
       - hudson.tasks.Fingerprinter$FingerprintAction.onLoad(hudson.model.Run) @bci=6, line=341 (Interpreted frame)
       - hudson.model.Run.onLoad() @bci=41, line=342 (Compiled frame)
       - hudson.maven.MavenModuleSetBuild.onLoad() @bci=1, line=151 (Interpreted frame)
       - hudson.model.RunMap.retrieve(java.io.File) @bci=28, line=219 (Interpreted frame)
       - hudson.model.RunMap.retrieve(java.io.File) @bci=2, line=56 (Interpreted frame)
       - jenkins.model.lazy.AbstractLazyLoadRunMap.load(java.io.File, jenkins.model.lazy.AbstractLazyLoadRunMap$Index) @bci=2, line=688 (Interpreted frame)
       - jenkins.model.lazy.AbstractLazyLoadRunMap.load(int, jenkins.model.lazy.AbstractLazyLoadRunMap$Index) @bci=36, line=650 (Compiled frame)
       - jenkins.model.lazy.AbstractLazyLoadRunMap.search(int, jenkins.model.lazy.AbstractLazyLoadRunMap$Direction) @bci=80, line=382 (Compiled frame)
       - jenkins.model.lazy.AbstractLazyLoadRunMap.getByNumber(int) @bci=5, line=547 (Compiled frame)
       - jenkins.model.lazy.AbstractLazyLoadRunMap.search(int, jenkins.model.lazy.AbstractLazyLoadRunMap$Direction) @bci=176, line=393 (Compiled frame)
       - jenkins.model.lazy.AbstractLazyLoadRunMap.newestBuild() @bci=6, line=335 (Compiled frame)
       - jenkins.model.lazy.LazyBuildMixIn.getLastBuild() @bci=4, line=249 (Compiled frame)
       - hudson.model.AbstractProject.getLastBuild() @bci=4, line=974 (Compiled frame)
       - hudson.model.AbstractProject.getLastBuiltOn() @bci=1, line=1038 (Compiled frame)
       - hudson.maven.MavenModule.getAssignedLabel() @bci=4, line=460 (Interpreted frame)
       - hudson.model.Label.getTiedJobCount() @bci=176, line=392 (Compiled frame)
      

        Attachments

          Issue Links

            Activity

            fbelzunc Félix Belzunce Arcos created issue -
            schristou Steven Christou made changes -
            Field Original Value New Value
            Labels lazy-loading performance
            Component/s performance-plugin [ 15803 ]
            schristou Steven Christou made changes -
            Priority Minor [ 4 ] Critical [ 2 ]
            schristou Steven Christou made changes -
            Assignee Félix Belzunce Arcos [ fbelzunc ] Steven Christou [ schristou ]
            schristou Steven Christou made changes -
            Remote Link This issue links to "PR 38 (Web Link)" [ 12103 ]
            schristou Steven Christou made changes -
            Description getAssignedLabel function seems to be triggering lazy loading in MavenModule class which can then take some time to complete.

            Maybe should use getSameNodeConstraint

            https://github.com/jenkinsci/maven-plugin/blob/master/src/main/java/hudson/maven/MavenModule.java#L459
            getAssignedLabel function seems to be triggering lazy loading in MavenModule class which can then take some time to complete.

            Maybe should use getSameNodeConstraint

            https://github.com/jenkinsci/maven-plugin/blob/master/src/main/java/hudson/maven/MavenModule.java#L459

            Append by [~schristou]

            Stack trace snippet below:

            {noformat}
             - hudson.model.RunMap.retrieve(java.io.File) @bci=21, line=218 (Interpreted frame)
             - hudson.model.RunMap.retrieve(java.io.File) @bci=2, line=56 (Interpreted frame)
             - jenkins.model.lazy.AbstractLazyLoadRunMap.load(java.io.File, jenkins.model.lazy.AbstractLazyLoadRunMap$Index) @bci=2, line=688 (Interpreted frame)
             - jenkins.model.lazy.AbstractLazyLoadRunMap.load(int, jenkins.model.lazy.AbstractLazyLoadRunMap$Index) @bci=36, line=650 (Compiled frame)
             - jenkins.model.lazy.AbstractLazyLoadRunMap.search(int, jenkins.model.lazy.AbstractLazyLoadRunMap$Direction) @bci=80, line=382 (Compiled frame)
             - jenkins.model.lazy.LazyBuildMixIn$RunMixIn.getPreviousBuild() @bci=78, line=366 (Interpreted frame)
             - hudson.model.AbstractBuild.getPreviousBuild() @bci=4, line=196 (Interpreted frame)
             - hudson.model.AbstractBuild.getPreviousBuild() @bci=1, line=104 (Interpreted frame)
             - hudson.tasks.Fingerprinter$FingerprintAction.compact() @bci=14, line=352 (Interpreted frame)
             - hudson.tasks.Fingerprinter$FingerprintAction.onLoad(hudson.model.Run) @bci=6, line=341 (Interpreted frame)
             - hudson.model.Run.onLoad() @bci=41, line=342 (Compiled frame)
             - hudson.maven.MavenModuleSetBuild.onLoad() @bci=1, line=151 (Interpreted frame)
             - hudson.model.RunMap.retrieve(java.io.File) @bci=28, line=219 (Interpreted frame)
             - hudson.model.RunMap.retrieve(java.io.File) @bci=2, line=56 (Interpreted frame)
             - jenkins.model.lazy.AbstractLazyLoadRunMap.load(java.io.File, jenkins.model.lazy.AbstractLazyLoadRunMap$Index) @bci=2, line=688 (Interpreted frame)
             - jenkins.model.lazy.AbstractLazyLoadRunMap.load(int, jenkins.model.lazy.AbstractLazyLoadRunMap$Index) @bci=36, line=650 (Compiled frame)
             - jenkins.model.lazy.AbstractLazyLoadRunMap.search(int, jenkins.model.lazy.AbstractLazyLoadRunMap$Direction) @bci=80, line=382 (Compiled frame)
             - jenkins.model.lazy.AbstractLazyLoadRunMap.getByNumber(int) @bci=5, line=547 (Compiled frame)
             - jenkins.model.lazy.AbstractLazyLoadRunMap.search(int, jenkins.model.lazy.AbstractLazyLoadRunMap$Direction) @bci=176, line=393 (Compiled frame)
             - jenkins.model.lazy.AbstractLazyLoadRunMap.newestBuild() @bci=6, line=335 (Compiled frame)
             - jenkins.model.lazy.LazyBuildMixIn.getLastBuild() @bci=4, line=249 (Compiled frame)
             - hudson.model.AbstractProject.getLastBuild() @bci=4, line=974 (Compiled frame)
             - hudson.model.AbstractProject.getLastBuiltOn() @bci=1, line=1038 (Compiled frame)
             - hudson.maven.MavenModule.getAssignedLabel() @bci=4, line=460 (Interpreted frame)
             - hudson.model.Label.getTiedJobCount() @bci=176, line=392 (Compiled frame)
            {noformat}
            jglick Jesse Glick made changes -
            Link This issue depends on JENKINS-19392 [ JENKINS-19392 ]
            schristou Steven Christou made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            imakowski Ireneusz Makowski made changes -
            Labels lazy-loading performance lazy-loading lts-candidate performance
            olivergondza Oliver Gondža made changes -
            Labels lazy-loading lts-candidate performance lazy-loading performance
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 160457 ] JNJira + In-Review [ 196441 ]

              People

              • Assignee:
                schristou Steven Christou
                Reporter:
                fbelzunc Félix Belzunce Arcos
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: