From 88d16de4f20fb85e023092b6e313fc11766df2aa Mon Sep 17 00:00:00 2001 From: James Agnew Date: Mon, 17 Apr 2023 18:57:59 -0400 Subject: [PATCH] Fixes --- .../fhir/changelog/6_6_0/4716-search-view-performance.yaml | 7 +++++++ .../4742-improve-efficiency-of-in-memory-matching.yaml | 1 + ...42-improve-efficiency-of-subscription-retriggering.yaml | 1 + .../6_6_0/4742-support-meta-for-in-memory-matching.yaml | 1 + .../java/ca/uhn/fhir/jpa/entity/ResourceSearchView.java | 2 +- 5 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4716-search-view-performance.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4716-search-view-performance.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4716-search-view-performance.yaml new file mode 100644 index 00000000000..cfde10aac9d --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4716-search-view-performance.yaml @@ -0,0 +1,7 @@ +--- +type: perf +issue: 4716 +backport: 6.4.5 +title: "The SQL query used to fetch pages of search results resulted in an inefficient use + of the database in cases where resources have many different versions stored. Thanks to + Primož Delopst for the pull request!" diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4742-improve-efficiency-of-in-memory-matching.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4742-improve-efficiency-of-in-memory-matching.yaml index 271de5528e3..21c8f71dcb1 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4742-improve-efficiency-of-in-memory-matching.yaml +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4742-improve-efficiency-of-in-memory-matching.yaml @@ -1,6 +1,7 @@ --- type: add issue: 4742 +backport: 6.4.5 title: "The in-memory matcher used by the JPA server subscription processor has been optimized to reduce the number of FHIRPath expressions executed while processing in-memory matching." diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4742-improve-efficiency-of-subscription-retriggering.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4742-improve-efficiency-of-subscription-retriggering.yaml index 72e22eedad5..a93bf2b083b 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4742-improve-efficiency-of-subscription-retriggering.yaml +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4742-improve-efficiency-of-subscription-retriggering.yaml @@ -1,6 +1,7 @@ --- type: perf issue: 4742 +backport: 6.4.5 title: "The SQL generated for the JPA server `$trigger-subscription` operation has been optimized in order to drastically reduce the number of database round trips for large triggering jobs." diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4742-support-meta-for-in-memory-matching.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4742-support-meta-for-in-memory-matching.yaml index 740ac3eff24..97715d78ba7 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4742-support-meta-for-in-memory-matching.yaml +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4742-support-meta-for-in-memory-matching.yaml @@ -1,6 +1,7 @@ --- type: add issue: 4742 +backport: 6.4.5 title: "The JPA server in-memory resource matcher, which is used to improve the efficiency of subscription processing on eligible criteria, now has support for the `_tag`, `_tag:not`, `_security`, `_security:not` and `_profile` parameters." diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceSearchView.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceSearchView.java index c86dada29ff..a9d6e21216f 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceSearchView.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceSearchView.java @@ -47,7 +47,7 @@ import java.util.Date; @Entity @Immutable @Subselect("SELECT h.pid as pid, " + - " h.res_id as res_id, " + + " r.res_id as res_id, " + " h.res_type as res_type, " + " h.res_version as res_version, " + // FHIR version " h.res_ver as res_ver, " + // resource version