From 57ee93251af6a7114776430e9003911111612272 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 12 Jul 2022 11:08:46 -0700 Subject: [PATCH] Mergeback 2022 07 08 (#3771) * fix handling of common search parameters * Revert "fix handling of common search parameters" This reverts commit 89c45eebdc31c3dd9533570d9c709ecc7ed5a7a6. * Fix implementation, add test (#3378) * Fix implementation, add test * Tighten test * Rip out dead modules * Add changelog * Jr 20220210 handle common search params in contained searches (#3377) * fix handling of common search parameters * add support for reference search parameters with multiple paths * Issue 3357 * Version bump * Fixed null pointer exception for re-loading subscription on cdr restart and when there's no partition id in the request, and added tests * added changelogs for this fix * Fix broken changelog file * Can't specify specific resource type permissions for bulk export (#3376) * deny user from exporting without perms * add unit tests * add changelog Co-authored-by: olivia-you * Make migration donothing as it was added in error * Remove ehcache * Add version.yaml: * Add to sources/javadocs for dist * Fix typo * fix up pom * wip test removing checkstyle plugin from deployable pom * remove test pom changes, instead just dont deploy to sonatype * typo * Version bump * Add implementation, testing, and changelog * Add backport info, make aware of 6_0_0 * add jira ref * Fix test * Add versionenum * Bump dep for spring, add changelog, add versionenum, add changelog folder * Actually do the version bump * 3654 postgres lobs (#3656) * Implementation, test, changelog * Modify changelog * Fix changelog * Add upgrade.md file * Modify to yaml changes * Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_3/3654-lob-problems.yaml Co-authored-by: Ken Stevens * tidy * more work Co-authored-by: Ken Stevens * Fix bad yaml indent * Version bump * Back out the reindex changes introduced in 5.7.3 * update changelog * version bump * added fix for subscription in default partition when default partition's id is null * added changelog * Add version info and changelog folder * adding release pipeline yml file fo azure * Fix parameter count limitation on MSSQL/Oracle large transactions (#3075) * Fix parameter count limitation on MSSQL/Oracle large transactions * Changelog fix * Move changelog * Force a change to trigger CI * Test refactoring * Backport oracle fix * Fix backport * upping version to 5.7.5 for release * add versionenum * Updating version to: 5.7.6 post release. * Add query-chunk-aware code * Add new folder * Fix up versionenum * Remove imports Co-authored-by: Jason Roberts Co-authored-by: JasonRoberts-smile <85363818+JasonRoberts-smile@users.noreply.github.com> Co-authored-by: Mark Iantorno Co-authored-by: Steven Li Co-authored-by: Olivia You <46392181+oliviayou@users.noreply.github.com> Co-authored-by: olivia-you Co-authored-by: Ken Stevens Co-authored-by: Long Ma Co-authored-by: James Agnew --- .../src/main/java/ca/uhn/fhir/util/VersionEnum.java | 6 +++++- .../hapi/fhir/changelog/5_7_3/3654-lob-problems.yaml | 5 +++++ .../ca/uhn/hapi/fhir/changelog/5_7_3/changes.yaml | 11 +++++++++++ .../ca/uhn/hapi/fhir/changelog/5_7_3/version.yaml | 3 +++ .../ca/uhn/hapi/fhir/changelog/5_7_4/version.yaml | 3 +++ .../ca/uhn/hapi/fhir/changelog/5_7_5/version.yaml | 3 +++ .../ca/uhn/hapi/fhir/changelog/5_7_6/version.yaml | 3 +++ .../ca/uhn/hapi/fhir/changelog/5_7_7/version.yaml | 3 +++ .../6_0_0/3065-transactions-with-many-forced-ids.yaml | 1 + ...ultitenant-subscription-default-partition-fix.yaml | 1 + .../ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java | 3 ++- .../jpa/subscription/resthook/RestHookTestR5Test.java | 2 ++ 12 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_3/3654-lob-problems.yaml create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_3/changes.yaml create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_3/version.yaml create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_4/version.yaml create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_5/version.yaml create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_6/version.yaml create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_7/version.yaml diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/VersionEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/VersionEnum.java index 8485c11d2ca..bfb3f27dac8 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/VersionEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/VersionEnum.java @@ -89,10 +89,14 @@ public enum VersionEnum { V5_7_0, V5_7_1, V5_7_2, + V5_7_3, + V5_7_4, + V5_7_5, + V5_7_6, V6_0_0, V6_0_1, V6_0_2, - V6_1_0 + V6_1_0, ; public static VersionEnum latestVersion() { diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_3/3654-lob-problems.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_3/3654-lob-problems.yaml new file mode 100644 index 00000000000..5d151ed4195 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_3/3654-lob-problems.yaml @@ -0,0 +1,5 @@ +--- +type: fix +issue: 3654 +title: "UPDATE: This change has breen removed. Previous content was: 'Modify reindexing to migrate data HFJ_RES_VER data from the RES_TEXT column to the RES_TEXT_VC +if the resource's size falls inside of the configuration defined in DaoConfig's `getInlineResourceTextBelowSize` property.'" diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_3/changes.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_3/changes.yaml new file mode 100644 index 00000000000..f7b6ca50bf9 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_3/changes.yaml @@ -0,0 +1,11 @@ +--- +- item: + type: "fix" + title: "This version specifically modifies reindex to support moving data from the RES_TEXT to the RES_TEXT_VC column in the HFJ_RES_VER table. This is especially important + for PostgreSQL users, as the RES_TEXT column only has an addressable space of about 4 billion resources. + +Any installation that exceeds this amount of resources stored in the RES_TEXT will experience that the software hangs on attempting to store new resources. +In order to avoid this, you should use the `DaoConfig#setInlineResourceTextBelowSize` setting, and set it to a large non-zero value. +This will cause PostgreSQL to not store the resource text as a LOB, but instead as a VARCHAR field. By default, this field has length 4000, but you can and should update it by following the documentation [here](https://smilecdr.com/docs/fhir_storage_relational/fhir_storage_relational_module.html#resource-body-storage). +" + diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_3/version.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_3/version.yaml new file mode 100644 index 00000000000..20aeb5d4785 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_3/version.yaml @@ -0,0 +1,3 @@ +--- +release-date: "2022-05-30" +codename: "Sojourner" diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_4/version.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_4/version.yaml new file mode 100644 index 00000000000..99402686ebe --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_4/version.yaml @@ -0,0 +1,3 @@ +--- +release-date: "2022-06-03" +codename: "Sojourner" diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_5/version.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_5/version.yaml new file mode 100644 index 00000000000..040a1989820 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_5/version.yaml @@ -0,0 +1,3 @@ +--- +release-date: "2022-07-07" +codename: "Sojourner" diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_6/version.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_6/version.yaml new file mode 100644 index 00000000000..040a1989820 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_6/version.yaml @@ -0,0 +1,3 @@ +--- +release-date: "2022-07-07" +codename: "Sojourner" diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_7/version.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_7/version.yaml new file mode 100644 index 00000000000..c086cd11a8c --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_7/version.yaml @@ -0,0 +1,3 @@ +--- +release-date: "FILL ME" +codename: "Sojourner" diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_0_0/3065-transactions-with-many-forced-ids.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_0_0/3065-transactions-with-many-forced-ids.yaml index 0a18f51bfbb..480ff75382b 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_0_0/3065-transactions-with-many-forced-ids.yaml +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_0_0/3065-transactions-with-many-forced-ids.yaml @@ -1,5 +1,6 @@ --- type: fix issue: 3065 +backport: 5.7.5 title: "A regression in HAPI FHIR 5.5.0 meant that very large transactions where the bundle contained over 1000 distinct client-assigned resource IDs could fail on MSSQL and Oracle due to SQL parameter count limitations." diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_1_0/3669-multitenant-subscription-default-partition-fix.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_1_0/3669-multitenant-subscription-default-partition-fix.yaml index 8f7e07a09ab..86f5a4915c6 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_1_0/3669-multitenant-subscription-default-partition-fix.yaml +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_1_0/3669-multitenant-subscription-default-partition-fix.yaml @@ -1,6 +1,7 @@ --- type: fix issue: 2669 +backport: 5.7.4 title: "Previously subscriptions in a partition with the id null will be matched against incoming resources from all partitions. Changed to subscriptions will only match against incoming resources in the partition the subscription exists in unless cross partition subscription is enabled and the subscription has the appropriate extension." diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java index 7bb029e17c2..0e242e7e01b 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java @@ -1435,12 +1435,13 @@ public abstract class BaseHapiFhirResourceDao extends B } TransactionDetails transactionDetails = new TransactionDetails(theEntity.getUpdatedDate()); - updateEntity(null, theResource, theEntity, theEntity.getDeleted(), true, false, transactionDetails, true, false); + ResourceTable resourceTable = updateEntity(null, theResource, theEntity, theEntity.getDeleted(), true, false, transactionDetails, true, false); if (theResource != null) { CURRENTLY_REINDEXING.put(theResource, null); } } + @Transactional @Override public void removeTag(IIdType theId, TagTypeEnum theTagType, String theScheme, String theTerm) { diff --git a/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestR5Test.java b/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestR5Test.java index ebcd37abdfc..14cef7be812 100644 --- a/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestR5Test.java +++ b/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestR5Test.java @@ -6,6 +6,7 @@ import ca.uhn.fhir.jpa.subscription.BaseSubscriptionsR5Test; import ca.uhn.fhir.rest.api.CacheControlDirective; import ca.uhn.fhir.rest.api.Constants; import ca.uhn.fhir.rest.api.MethodOutcome; +import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import ca.uhn.fhir.util.HapiExtensions; import org.hl7.fhir.instance.model.api.IBaseBundle; @@ -18,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsString;