Skip to content

Commit 949c26e

Browse files
committed
fix: sonar quality maintenance thread
1 parent 7067983 commit 949c26e

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

arc-batch/src/main/java/fr/insee/arc/batch/BatchARC.java

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -764,17 +764,29 @@ private void executeLoopOverPhases() throws ArcException {
764764

765765
} while (!exit);
766766

767-
// wait for maintenance thread to finish
767+
waitForMaintenanceThreadToFinish();
768+
769+
message("Fin de la boucle d'itération");
770+
771+
}
772+
773+
/**
774+
* wait for the maintenance thread to finish
775+
* It is important not to vacuum tuple during parquet export
776+
*/
777+
private void waitForMaintenanceThreadToFinish()
778+
{
779+
message("Waiting maintenance thread to finish");
768780
try {
769781
maintenance.join();
770782
} catch (InterruptedException e) {
783+
maintenance.interrupt();
771784
message("Maintenance thread had been interrupted");
772785
}
773-
774-
message("Fin de la boucle d'itération");
775-
786+
message("Maintenance thread end");
776787
}
777-
788+
789+
778790
private void updateProductionOn() throws ArcException {
779791
if (iteration % numberOfIterationBewteenCheckTodo == 0) {
780792
// check and update production on

0 commit comments

Comments
 (0)