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

Emailing users at the end of a failed build very slow for big Jenkins instance using CVS

    Details

    • Similar Issues:

      Description

      Basically the same issue as JENKINS-15440, only for CVS.
      Description was mainly copied from there.

      At the end of a failing build, the hudson.tasks.MailSender.buildCulpritList determines who to email.
      The problem comes when hudson.scm.MailAddressResolverImpl.findMailAddressFor determines the email address of the user by finding all builds a user has committed to. This is done by iterating over every single Jenkins project (hudson.model.User.getProjects() first finds all projects and then uses AbstractProject.hasParticipant - which reads the changelog to see if the user participated).

      For a large system (we have tens of thousands of builds), this is not at all efficient.

      Unfortunately findMailAddressFor takes a user and not a project (as the obvious implementation would be to work out the email address from the commit).

      Also, the results aren't cached and so this is run for every user every time.

        Attachments

          Issue Links

            Activity

            kutzi kutzi created issue -
            kutzi kutzi made changes -
            Field Original Value New Value
            Environment Jenkins 1.447 LTS
            Subversion 1.35
            Although both Jenkins and subversion plugin are not latest version, I have browsed github for latest versions and I believe this issue to still be present.
            Jenkins 1.447 LTS
            Component/s cvs [ 15486 ]
            Component/s subversion [ 15485 ]
            kutzi kutzi made changes -
            Description At the end of a failing build, the hudson.tasks.MailSender.buildCulpritList determines who to email.
            The problem comes when hudson.scm.SubversionMailAddressResolverImpl.findMailAddressFor determines the email address of the user by finding all builds a user has committed to. This is done by iterating over every single Jenkins project (hudson.model.User.getProjects() first finds all projects and then uses AbstractProject.hasParticipant - which reads the changelog to see if the user participated).

            For a large system (we have tens of thousands of builds), this is not at all efficient.

            Unfortunately findMailAddressFor takes a user and not a project (as the obvious implementation would be to work out the email address from the commit).

            Also, the results aren't cached and so this is run for every user every time.

            I'm not sure if this can be resolved with just a fix to the subversion-plugin
            At the end of a failing build, the hudson.tasks.MailSender.buildCulpritList determines who to email.
            The problem comes when hudson.scm.MailAddressResolverImpl.findMailAddressFor determines the email address of the user by finding all builds a user has committed to. This is done by iterating over every single Jenkins project (hudson.model.User.getProjects() first finds all projects and then uses AbstractProject.hasParticipant - which reads the changelog to see if the user participated).

            For a large system (we have tens of thousands of builds), this is not at all efficient.

            Unfortunately findMailAddressFor takes a user and not a project (as the obvious implementation would be to work out the email address from the commit).

            Also, the results aren't cached and so this is run for every user every time.

            I'm not sure if this can be resolved with just a fix to the subversion-plugin
            kutzi kutzi made changes -
            Link This issue is related to JENKINS-15440 [ JENKINS-15440 ]
            kutzi kutzi made changes -
            Description At the end of a failing build, the hudson.tasks.MailSender.buildCulpritList determines who to email.
            The problem comes when hudson.scm.MailAddressResolverImpl.findMailAddressFor determines the email address of the user by finding all builds a user has committed to. This is done by iterating over every single Jenkins project (hudson.model.User.getProjects() first finds all projects and then uses AbstractProject.hasParticipant - which reads the changelog to see if the user participated).

            For a large system (we have tens of thousands of builds), this is not at all efficient.

            Unfortunately findMailAddressFor takes a user and not a project (as the obvious implementation would be to work out the email address from the commit).

            Also, the results aren't cached and so this is run for every user every time.

            I'm not sure if this can be resolved with just a fix to the subversion-plugin
            Basically the same issue as JENKINS-15440, only for CVS.
            Description was mainly copied from there.

            At the end of a failing build, the hudson.tasks.MailSender.buildCulpritList determines who to email.
            The problem comes when hudson.scm.MailAddressResolverImpl.findMailAddressFor determines the email address of the user by finding all builds a user has committed to. This is done by iterating over every single Jenkins project (hudson.model.User.getProjects() first finds all projects and then uses AbstractProject.hasParticipant - which reads the changelog to see if the user participated).

            For a large system (we have tens of thousands of builds), this is not at all efficient.

            Unfortunately findMailAddressFor takes a user and not a project (as the obvious implementation would be to work out the email address from the commit).

            Also, the results aren't cached and so this is run for every user every time.
            kutzi kutzi made changes -
            Assignee kutzi [ kutzi ]
            jglick Jesse Glick made changes -
            Link This issue is blocking JENKINS-16437 [ JENKINS-16437 ]
            olivergondza Oliver Gondža made changes -
            Assignee Oliver Gondža [ olivergondza ]
            Hide
            olivergondza Oliver Gondža added a comment -
            Show
            olivergondza Oliver Gondža added a comment - Removed in cvs-2.8 [1] . Resolver plugin available at [2] . [1] https://github.com/jenkinsci/cvs-plugin/pull/18 [2] https://github.com/jenkinsci/cvs-mail-address-resolver-plugin
            olivergondza Oliver Gondža made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Hide
            kutzi kutzi added a comment - - edited

            See comments on https://github.com/jenkinsci/cvs-mail-address-resolver-plugin/commit/2a58adbefdfdbc73bcad033f3e53724478910f71

            I've generally the opinion that this code should be erased without leaving any traces

            Show
            kutzi kutzi added a comment - - edited See comments on https://github.com/jenkinsci/cvs-mail-address-resolver-plugin/commit/2a58adbefdfdbc73bcad033f3e53724478910f71 I've generally the opinion that this code should be erased without leaving any traces
            kutzi kutzi made changes -
            Link This issue is blocking JENKINS-16849 [ JENKINS-16849 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 147207 ] JNJira + In-Review [ 192281 ]

              People

              • Assignee:
                olivergondza Oliver Gondža
                Reporter:
                kutzi kutzi
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: