From: Eric Hartmann Date: Wed, 12 Jul 2017 15:47:16 +0000 (+0200) Subject: Fix too many commits after MAX_BATCH_SIZE is reached X-Git-Tag: 6.6-RC1~557 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6188784ad17e7bd5ce23a2d24f2c44d25e0c0166;p=sonarqube.git Fix too many commits after MAX_BATCH_SIZE is reached --- diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/IssueStorage.java b/server/sonar-server/src/main/java/org/sonar/server/issue/IssueStorage.java index 3097b673276..6c02b9c1a0a 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/IssueStorage.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/IssueStorage.java @@ -121,6 +121,7 @@ public abstract class IssueStorage { insertChanges(issueChangeMapper, issue); if (count > BatchSession.MAX_BATCH_SIZE) { session.commit(); + count = 0; } count++; }