Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #472 from jglick/buildsByBranchName-JENKINS-19022
[JENKINS-19022] Print a warning to the build log when the job seems to be in trouble due to buildsByBranchName bloat
  • Loading branch information
MarkEWaite committed Feb 10, 2017
2 parents 16e366e + 5bb7eed commit cae9fb6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/hudson/plugins/git/GitSCM.java
Expand Up @@ -1011,6 +1011,10 @@ public EnvVars getEnvironment() {
Build revToBuild = new Build(marked, rev, build.getNumber(), null);
buildData.saveBuild(revToBuild);

if (buildData.getBuildsByBranchName().size() >= 100) {
log.println("JENKINS-19022: warning: possible memory leak due to Git plugin usage; see: https://wiki.jenkins-ci.org/display/JENKINS/Remove+Git+Plugin+BuildsByBranch+BuildData");
}

if (candidates.size() > 1) {
log.println("Multiple candidate revisions");
Job<?, ?> job = build.getParent();
Expand Down

0 comments on commit cae9fb6

Please sign in to comment.