diff options
author | Daniel Schwarz <bartfastiel@users.noreply.github.com> | 2017-02-22 11:58:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-22 11:58:00 +0100 |
commit | 4bc76a45c779f620869b58e7af9d129979e620fc (patch) | |
tree | 617ae2258c5c3b51363581eaa32cfb631901aff6 | |
parent | 730daa2870ac4b1a40b6dd8e067d21f72c720f2d (diff) | |
download | sonarqube-4bc76a45c779f620869b58e7af9d129979e620fc.tar.gz sonarqube-4bc76a45c779f620869b58e7af9d129979e620fc.zip |
SONAR-8831 increase performance of bulk issue storage
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/issue/IssueStorage.java | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |