Merge pull request #1015 from jschneid-nmdp/resolve-term-upload-deferred-short-circuit

avoid potential short circuit during saveDeferred processing of uploaded (e.g. LOINC) terminology
This commit is contained in:
James Agnew 2018-06-27 10:33:06 -04:00 committed by GitHub
commit 8c849b16a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 5 deletions

View File

@ -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 -> {