From f4695b5c044864ad30ad371fb8d4532e6eecd9b6 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Fri, 27 Sep 2024 12:25:09 -0400 Subject: [PATCH] Addressing review comments --- src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java | 2 +- .../uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java b/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java index 563e217..18c4bec 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java @@ -104,7 +104,7 @@ public class AppProperties { private final List custom_provider_classes = new ArrayList<>(); - private List search_prefetch_thresholds = List.of(13, 503, 2003, -1); + private List search_prefetch_thresholds = new ArrayList<>(); public List getCustomInterceptorClasses() { diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java b/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java index 6b9dc5f..628d9c0 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java @@ -151,7 +151,9 @@ public class FhirServerConfigCommon { jpaStorageSettings.setLanguageSearchParameterEnabled(appProperties.getLanguage_search_parameter_enabled()); - jpaStorageSettings.setSearchPreFetchThresholds(appProperties.getSearch_prefetch_thresholds()); + if (!appProperties.getSearch_prefetch_thresholds().isEmpty()) { + jpaStorageSettings.setSearchPreFetchThresholds(appProperties.getSearch_prefetch_thresholds()); + } Integer maxFetchSize = appProperties.getMax_page_size(); jpaStorageSettings.setFetchSizeDefaultMaximum(maxFetchSize);