diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java index fb66c22e0d5..825e424471c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseTransactionProcessor.java @@ -174,9 +174,6 @@ public abstract class BaseTransactionProcessor { ourLog.trace("Starting transaction processor"); myExecutor = new ThreadPoolTaskExecutor(); myExecutor.setThreadNamePrefix("bundle_batch_"); - // For single thread set the value to 1 - //myExecutor.setCorePoolSize(1); - //myExecutor.setMaxPoolSize(1); myExecutor.setCorePoolSize(myDaoConfig.getBundleBatchPoolSize()); myExecutor.setMaxPoolSize(myDaoConfig.getBundleBatchMaxPoolSize()); myExecutor.setQueueCapacity(DaoConfig.DEFAULT_BUNDLE_BATCH_QUEUE_CAPACITY); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSystemDaoDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSystemDaoDstu3Test.java index fc330a0e49d..a97890cbe02 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSystemDaoDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSystemDaoDstu3Test.java @@ -116,12 +116,16 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest { myDaoConfig.setAllowMultipleDelete(new DaoConfig().isAllowMultipleDelete()); myDaoConfig.setIndexMissingFields(new DaoConfig().getIndexMissingFields()); myDaoConfig.setMaximumDeleteConflictQueryCount(new DaoConfig().getMaximumDeleteConflictQueryCount()); + myDaoConfig.setBundleBatchPoolSize(new DaoConfig().getBundleBatchPoolSize()); + myDaoConfig.setBundleBatchMaxPoolSize(new DaoConfig().getBundleBatchMaxPoolSize()); } @BeforeEach public void beforeDisableResultReuse() { myDaoConfig.setReuseCachedSearchResultsForMillis(null); + myDaoConfig.setBundleBatchPoolSize(1); + myDaoConfig.setBundleBatchMaxPoolSize(1); } private Bundle createInputTransactionWithPlaceholderIdInMatchUrl(HTTPVerb theVerb) {