From 4f0e529642c6fe2be5802ee91b0afdfa13d76de7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Tue, 2 Jul 2019 09:59:59 +0200 Subject: [PATCH] SONAR-12251 commit each processed project in PopulateLiveMeasures --- .../db/migration/version/v70/PopulateLiveMeasures.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v70/PopulateLiveMeasures.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v70/PopulateLiveMeasures.java index 2ad1464d4a1..cb3d0d3b67d 100644 --- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v70/PopulateLiveMeasures.java +++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v70/PopulateLiveMeasures.java @@ -96,7 +96,9 @@ public class PopulateLiveMeasures extends DataChange { " (uuid, component_uuid, project_uuid, metric_id, value, text_value, variation, measure_data, created_at, updated_at)" + " values" + " (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); - massUpdate.update("insert into live_measures_p (project_uuid) values (?)"); + massUpdate.update("insert into live_measures_p (project_uuid) values (?)") + // we want to commit each project finished asap to avoid restarting them over in case of interruption + .setBatchSize(1); LiveMeasurePopulationMultiHandler handler = new LiveMeasurePopulationMultiHandler(firstAttempt, rows, now); massUpdate.execute(handler); -- 2.39.5