Issue Type: Bug Bug
Assignee: Honza Brázdil
Components: ghprb-plugin
Created: 19/Jan/15 6:35 PM
Description:

The GhprbTrigger saves the descriptor every time it runs:

@Override
    public void run() {
        // triggers are always triggered on the cron, but we just no-op if we are using GitHub hooks.
        if (getUseGitHubHooks()) {
            return;
        }
        helper.run();
        getDescriptor().save();
    }

This results in the Jenkins config.xml being saved every time the trigger runs, which is especially bad if you are using the configHistory plugin.


"jenkins.util.Timer [#2]" daemon prio=10 tid=0x00007f61a4002800 nid=0x2dad runnable [0x00007f61d1185000]
    java.lang.Thread.State: RUNNABLE
       at java.util.TimSort.sort(Unknown Source)
       at java.util.TimSort.sort(Unknown Source)
       at java.util.Arrays.sort(Unknown Source)
       at java.util.Collections.sort(Unknown Source)
       at hudson.plugins.jobConfigHistory.FileHistoryDao.hasDuplicateHistory(FileHistoryDao.java:540)
       at hudson.plugins.jobConfigHistory.FileHistoryDao.checkDuplicate(FileHistoryDao.java:560)
       at hudson.plugins.jobConfigHistory.FileHistoryDao.saveItem(FileHistoryDao.java:240)
       at hudson.plugins.jobConfigHistory.JobConfigHistorySaveableListener.onChange(JobConfigHistorySaveableListener.java:29)
       at hudson.model.listeners.SaveableListener.fireOnChange(SaveableListener.java:80)
       at hudson.model.Descriptor.save(Descriptor.java:760)
       - locked <0x000000009109dfa0> (a org.jenkinsci.plugins.ghprb.GhprbTrigger$DescriptorImpl)
       at org.jenkinsci.plugins.ghprb.GhprbTrigger.run(GhprbTrigger.java:182)

Looking at the serializable fields in the descriptor, I don't see any reason why this would require being saved every time the trigger runs. Even if there is a good reason, that should be fixed to avoid this sort of behavior.

Project: Jenkins
Labels: performance
Priority: Major Major
Reporter: recampbell
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to