From 2f1662b59fc9b09b7527059c24fedd5a66ab7e55 Mon Sep 17 00:00:00 2001 From: "Joel Schneider (NMDP)" Date: Tue, 28 Feb 2017 22:43:00 -0600 Subject: [PATCH] Revise saveConcept method to use myConceptDao.save instead of myConceptDao.saveAndFlush (to avoid overloading CPU with flush computations when persisting large codesystems, e.g. one with 399837 concepts). --- .../main/java/ca/uhn/fhir/jpa/term/BaseHapiTerminologySvc.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseHapiTerminologySvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseHapiTerminologySvc.java index 765e09cf340..a2b3d0fa981 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseHapiTerminologySvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/BaseHapiTerminologySvc.java @@ -396,7 +396,7 @@ public abstract class BaseHapiTerminologySvc implements IHapiTerminologySvc { if (theConcept.getId() == null || theConcept.getIndexStatus() == null) { retVal++; theConcept.setIndexStatus(BaseHapiFhirDao.INDEX_STATUS_INDEXED); - myConceptDao.saveAndFlush(theConcept); + myConceptDao.save(theConcept); } ourLog.trace("Saved {} and got PID {}", theConcept.getCode(), theConcept.getId());