From 93bdb9642648a07ef44f99617556474b85d7dbb5 Mon Sep 17 00:00:00 2001 From: Saad Khan Date: Fri, 29 Nov 2024 12:12:37 +0530 Subject: [PATCH] fix issue with duplicate experiment_id while running parallel experiments with time-range Signed-off-by: Saad Khan --- src/main/java/com/autotune/database/dao/ExperimentDAOImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/autotune/database/dao/ExperimentDAOImpl.java b/src/main/java/com/autotune/database/dao/ExperimentDAOImpl.java index ac37fc50e..6a1215216 100644 --- a/src/main/java/com/autotune/database/dao/ExperimentDAOImpl.java +++ b/src/main/java/com/autotune/database/dao/ExperimentDAOImpl.java @@ -58,7 +58,7 @@ public class ExperimentDAOImpl implements ExperimentDAO { private static final Logger LOGGER = LoggerFactory.getLogger(ExperimentDAOImpl.class); @Override - public ValidationOutputData addExperimentToDB(KruizeExperimentEntry kruizeExperimentEntry) { + public synchronized ValidationOutputData addExperimentToDB(KruizeExperimentEntry kruizeExperimentEntry) { ValidationOutputData validationOutputData = new ValidationOutputData(false, null, null); Transaction tx = null; String statusValue = "failure";