From 47e7879176c39ba73f91ee208b931e3ef53638f5 Mon Sep 17 00:00:00 2001 From: April Shen Date: Tue, 17 Dec 2024 15:51:54 +0000 Subject: [PATCH 1/3] retry MissingUnsavedAccessionsException --- .../batch/steps/CreateSubsnpAccessionsStepConfiguration.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eva-accession-pipeline/src/main/java/uk/ac/ebi/eva/accession/pipeline/configuration/batch/steps/CreateSubsnpAccessionsStepConfiguration.java b/eva-accession-pipeline/src/main/java/uk/ac/ebi/eva/accession/pipeline/configuration/batch/steps/CreateSubsnpAccessionsStepConfiguration.java index 53d647a5c..3cf88f859 100644 --- a/eva-accession-pipeline/src/main/java/uk/ac/ebi/eva/accession/pipeline/configuration/batch/steps/CreateSubsnpAccessionsStepConfiguration.java +++ b/eva-accession-pipeline/src/main/java/uk/ac/ebi/eva/accession/pipeline/configuration/batch/steps/CreateSubsnpAccessionsStepConfiguration.java @@ -28,6 +28,8 @@ import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.retry.backoff.ExponentialBackOffPolicy; +import uk.ac.ebi.ampt2d.commons.accession.core.exceptions.MissingUnsavedAccessionsException; import uk.ac.ebi.eva.accession.pipeline.batch.io.AccessionWriter; import uk.ac.ebi.eva.accession.pipeline.batch.policies.InvalidVariantSkipPolicy; @@ -72,6 +74,9 @@ public Step createSubsnpAccessionStep(StepBuilderFactory stepBuilderFactory, .processor(variantProcessor) .writer(accessionWriter) .faultTolerant() + .retry(MissingUnsavedAccessionsException.class) + .retryLimit(3) + .backOffPolicy(new ExponentialBackOffPolicy()) .skipPolicy(invalidVariantSkipPolicy) .listener(stepListener) .build(); From 99bb09b48e6ba884b978f00ff58017e6d75beee7 Mon Sep 17 00:00:00 2001 From: April Shen Date: Wed, 18 Dec 2024 09:49:15 +0000 Subject: [PATCH 2/3] bump python in github workflow --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 17a50a959..57ed25dc4 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -14,7 +14,7 @@ jobs: matrix: mongodb-version: [4.0.18] java-version: [1.8] - python-version: [3.7] + python-version: [3.8] steps: - uses: actions/checkout@v2 From 87ef5fe93a051cf666bf63017070e189e2c4d8a4 Mon Sep 17 00:00:00 2001 From: April Shen Date: Thu, 19 Dec 2024 13:16:35 +0000 Subject: [PATCH 3/3] add comment --- .../batch/steps/CreateSubsnpAccessionsStepConfiguration.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eva-accession-pipeline/src/main/java/uk/ac/ebi/eva/accession/pipeline/configuration/batch/steps/CreateSubsnpAccessionsStepConfiguration.java b/eva-accession-pipeline/src/main/java/uk/ac/ebi/eva/accession/pipeline/configuration/batch/steps/CreateSubsnpAccessionsStepConfiguration.java index 3cf88f859..44935d5d2 100644 --- a/eva-accession-pipeline/src/main/java/uk/ac/ebi/eva/accession/pipeline/configuration/batch/steps/CreateSubsnpAccessionsStepConfiguration.java +++ b/eva-accession-pipeline/src/main/java/uk/ac/ebi/eva/accession/pipeline/configuration/batch/steps/CreateSubsnpAccessionsStepConfiguration.java @@ -74,6 +74,8 @@ public Step createSubsnpAccessionStep(StepBuilderFactory stepBuilderFactory, .processor(variantProcessor) .writer(accessionWriter) .faultTolerant() + // Exception can arise from running parallel accessioning jobs for a single study, hence the retry. + // See EVA-3719 for details. .retry(MissingUnsavedAccessionsException.class) .retryLimit(3) .backOffPolicy(new ExponentialBackOffPolicy())