From b2853b3f9dd6c85f71bf5c73d10d599b4f08f023 Mon Sep 17 00:00:00 2001 From: Joel Schneider Date: Wed, 27 Jun 2018 02:20:12 -0500 Subject: [PATCH] modify BaseHapiTerminologySvcImpl saveDeferred method to avoid short circuit that could potentially prevent processing of some deferred value sets and concept maps --- .../uhn/fhir/jpa/term/BaseHapiTerminologySvcImpl.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseHapiTerminologySvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseHapiTerminologySvcImpl.java index f2bcbc67a8c..5aedf94e8eb 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseHapiTerminologySvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseHapiTerminologySvcImpl.java @@ -850,15 +850,16 @@ public abstract class BaseHapiTerminologySvcImpl implements IHapiTerminologySvc, return; } else if (myDeferredConcepts.isEmpty() && myConceptLinksToSaveLater.isEmpty()) { processReindexing(); - return; } TransactionTemplate tt = new TransactionTemplate(myTransactionMgr); tt.setPropagationBehavior(TransactionTemplate.PROPAGATION_REQUIRES_NEW); - tt.execute(t -> { - processDeferredConcepts(); - return null; - }); + if(!myDeferredConcepts.isEmpty() || !myConceptLinksToSaveLater.isEmpty()) { + tt.execute(t -> { + processDeferredConcepts(); + return null; + }); + } if (myDeferredValueSets.size() > 0) { tt.execute(t -> {