From cc9d1b992d662a8be85b6c08f804f178fbb66614 Mon Sep 17 00:00:00 2001 From: Ken Stevens Date: Thu, 13 Apr 2023 13:06:04 -0400 Subject: [PATCH] fix subscription module restart bug (#4734) * fix subscription module restart bug * changelog --------- Co-authored-by: Ken Stevens --- .../fhir/changelog/6_6_0/4734-subscription-regression.yaml | 6 ++++++ .../ca/uhn/fhir/cache/BaseResourceCacheSynchronizer.java | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4734-subscription-regression.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4734-subscription-regression.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4734-subscription-regression.yaml new file mode 100644 index 00000000000..3feca4ad054 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4734-subscription-regression.yaml @@ -0,0 +1,6 @@ +--- +type: fix +issue: 4734 +title: "Fixed a regression introduced by 4624 that prevented subscriptions from loading into the in-memory +subscription cache on system startup." + diff --git a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/cache/BaseResourceCacheSynchronizer.java b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/cache/BaseResourceCacheSynchronizer.java index ee1d8d3da04..ebcb329c82e 100644 --- a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/cache/BaseResourceCacheSynchronizer.java +++ b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/cache/BaseResourceCacheSynchronizer.java @@ -64,9 +64,9 @@ public abstract class BaseResourceCacheSynchronizer implements IResourceChangeLi mySearchParameterMap = getSearchParameterMap(); mySystemRequestDetails = SystemRequestDetails.forAllPartitions(); + myEnabled = true; IResourceChangeListenerCache resourceCache = myResourceChangeListenerRegistry.registerResourceResourceChangeListener(myResourceName, mySearchParameterMap, this, REFRESH_INTERVAL); resourceCache.forceRefresh(); - myEnabled = true; } @PreDestroy