]> source.dussan.org Git - sonarqube.git/commitdiff
Fix too many commits after MAX_BATCH_SIZE is reached
authorEric Hartmann <hartmann.eric@gmail.com>
Wed, 12 Jul 2017 15:47:16 +0000 (17:47 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 21 Aug 2017 20:44:50 +0000 (22:44 +0200)
server/sonar-server/src/main/java/org/sonar/server/issue/IssueStorage.java

index 3097b673276c824ebf90d8ef0452d90468cd6588..6c02b9c1a0ac6221236443a85b57274b571836fe 100644 (file)
@@ -121,6 +121,7 @@ public abstract class IssueStorage {
       insertChanges(issueChangeMapper, issue);
       if (count > BatchSession.MAX_BATCH_SIZE) {
         session.commit();
+        count = 0;
       }
       count++;
     }