From 6188784ad17e7bd5ce23a2d24f2c44d25e0c0166 Mon Sep 17 00:00:00 2001 From: Eric Hartmann Date: Wed, 12 Jul 2017 17:47:16 +0200 Subject: [PATCH] Fix too many commits after MAX_BATCH_SIZE is reached --- .../src/main/java/org/sonar/server/issue/IssueStorage.java | 1 + 1 file changed, 1 insertion(+) 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++; } -- 2.39.5