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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: subversion-plugin
    • Labels:
    • 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.
    • Similar Issues:

      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

        Attachments

          Issue Links

            Activity

            Hide
            kutzi kutzi added a comment -

            This just completely killed our server, because this also seems to be triggered by requests to //job/JOBNAME/api/json
            I have to figure out where these request come from, but generally I think that this resolving 'feature' is after all a very bad idea.

            I'd really like to remove it altogether as I cannot really think of any scenario where this would have been actually useful (given the legacy state of the previously used hard-coded svn repositories)

            Show
            kutzi kutzi added a comment - This just completely killed our server, because this also seems to be triggered by requests to //job/JOBNAME/api/json I have to figure out where these request come from, but generally I think that this resolving 'feature' is after all a very bad idea. I'd really like to remove it altogether as I cannot really think of any scenario where this would have been actually useful (given the legacy state of the previously used hard-coded svn repositories)
            Hide
            jglick Jesse Glick added a comment -

            As mentioned in JENKINS-16342 I agree that this needs to be either rewritten or deleted outright.

            Show
            jglick Jesse Glick added a comment - As mentioned in JENKINS-16342 I agree that this needs to be either rewritten or deleted outright.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Nicolas De Loof
            Path:
            src/main/java/hudson/scm/SubversionMailAddressResolverImpl.java
            http://jenkins-ci.org/commit/subversion-plugin/b2451c01790b19ab665a880857e641a46ed89828
            Log:
            JENKINS-15440 MailAddressResolverImpl moved to subversion-mail-address-resolver-plugin

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De Loof Path: src/main/java/hudson/scm/SubversionMailAddressResolverImpl.java http://jenkins-ci.org/commit/subversion-plugin/b2451c01790b19ab665a880857e641a46ed89828 Log: JENKINS-15440 MailAddressResolverImpl moved to subversion-mail-address-resolver-plugin
            Hide
            ndeloof Nicolas De Loof added a comment -

            MailAddressResolverImpl moved to https://github.com/jenkinsci/subversion-mail-address-resolver-plugin, just in case someone want to keep a 100% compatible jenkins. To be released after subversion 1.45

            Show
            ndeloof Nicolas De Loof added a comment - MailAddressResolverImpl moved to https://github.com/jenkinsci/subversion-mail-address-resolver-plugin , just in case someone want to keep a 100% compatible jenkins. To be released after subversion 1.45
            Hide
            kutzi kutzi added a comment -

            Sounds great. I'll push a svn-plugin release today or tomorrow.

            Show
            kutzi kutzi added a comment - Sounds great. I'll push a svn-plugin release today or tomorrow.

              People

              • Assignee:
                kutzi kutzi
                Reporter:
                willthames Will Thames
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: