]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-12251 MassUpdate: do not create Iterator for each inserted row
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Thu, 4 Jul 2019 10:54:01 +0000 (12:54 +0200)
committerSonarTech <sonartech@sonarsource.com>
Tue, 30 Jul 2019 18:24:26 +0000 (20:24 +0200)
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/step/MassUpdate.java

index 388ba621f241e6bb932a2420227e3e9ec0758f1f..d5ab64df4574cd0a0b6d7cdb57b1eeb325e60192 100644 (file)
@@ -89,7 +89,8 @@ public class MassUpdate {
 
     progress.start();
     try {
-      select.scroll(row -> callSingleHandler(handler, updates.iterator().next(), row));
+      UpsertImpl update = updates.iterator().next();
+      select.scroll(row -> callSingleHandler(handler, update, row));
       closeStatements();
 
       // log the total number of processed rows