From: Daniel Schwarz Date: Wed, 22 Feb 2017 10:58:00 +0000 (+0100) Subject: SONAR-8831 increase performance of bulk issue storage X-Git-Tag: 6.3.0.18800~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4bc76a45c779f620869b58e7af9d129979e620fc;p=sonarqube.git SONAR-8831 increase performance of bulk issue storage --- 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 199d8a6d673..1aacf9eb27c 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 @@ -100,10 +100,11 @@ public abstract class IssueStorage { if (issue.isNew()) { doInsert(session, now, issue); insertChanges(issueChangeMapper, issue); + count++; if (count > BatchSession.MAX_BATCH_SIZE) { session.commit(); + count = 0; } - count++; } else if (issue.isChanged()) { toBeUpdated.add(issue); }