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 d9016df34ac..43666973a15 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 @@ -115,6 +115,10 @@ public enum VersionEnum { V6_4_0, V6_4_1, V6_4_2, + V6_4_3, + V6_4_4, + V6_4_5, + V6_4_6, V6_5_0, V6_6_0, V6_6_1, diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_3/upgrade.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_3/upgrade.md index e69de29bb2d..e899e2f7150 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_3/upgrade.md +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_3/upgrade.md @@ -0,0 +1,2 @@ +The known issue with Bulk Export in HAPI 6.4.0 has been resolved. Bulk export functionality is now +more performant at large scale, and does not generate occasional incomplete file reports. diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_3/version.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_3/version.yaml index 37c96634729..1ea87894621 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_3/version.yaml +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_3/version.yaml @@ -1,3 +1,3 @@ --- -release-date: "2023-03-15" -codename: "Vishwa" +release-date: "2023-03-08" +codename: "Wizard" diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_4/4652-mssql-migration-failure.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_4/4652-mssql-migration-failure.yaml new file mode 100644 index 00000000000..4d9190d87a4 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_4/4652-mssql-migration-failure.yaml @@ -0,0 +1,5 @@ +--- +type: fix +issue: 4652 +backport: 6.4.5 +title: "Fix for MSSQL migration failure related to Job instance UPDATE_TIME column default value not being set correctly" diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_4/upgrade.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_4/upgrade.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_4/version.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_4/version.yaml new file mode 100644 index 00000000000..565c298d891 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_4/version.yaml @@ -0,0 +1,3 @@ +--- +release-date: "2023-03-15" +codename: "Wizard" diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_5/upgrade.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_5/upgrade.md new file mode 100644 index 00000000000..381760a2051 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_5/upgrade.md @@ -0,0 +1,10 @@ +This release fixes an accidental behaviour that was introduced in 6.4.2. From that version up until now, if a Tag Definition was created with a null `userSelected` element, +it would still be stored as `false` instead of `null`. This release fixes that behaviour, and now correctly stores the value as `null` if it is not specified. If you do not use this field, no action needs to be taken. However, if you do use this field, the `userSelected` elements stored from the installation of version 2023.02.R02 up until now are potentially suspect. The following SQL can be executed to clear the `false` value from this table and replace it with null, if desired: + +```sql +update HFJ_TAG_DEF +set TAG_USER_SELECTED = null +where TAG_USER_SELECTED = 'false' +``` +This will wholesale replace all `userSelected` fields. + diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_5/version.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_5/version.yaml new file mode 100644 index 00000000000..565c298d891 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_5/version.yaml @@ -0,0 +1,3 @@ +--- +release-date: "2023-03-15" +codename: "Wizard" diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_6/upgrade.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_6/upgrade.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_6/version.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_6/version.yaml new file mode 100644 index 00000000000..d5266f35d4b --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_6/version.yaml @@ -0,0 +1,3 @@ +--- +release-date: "2023-06-28" +codename: "Wizard" diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4597-possible-resource-duplication-on-conditional-create-update-operations.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4597-possible-resource-duplication-on-conditional-create-update-operations.yaml index c0eda4e9f88..823317b7821 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4597-possible-resource-duplication-on-conditional-create-update-operations.yaml +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4597-possible-resource-duplication-on-conditional-create-update-operations.yaml @@ -2,4 +2,5 @@ type: fix issue: 4597 jira: SMILE-5993 +backport: 6.4.4 title: "Simultaneous conditional create or create-on-update operations no longer create duplicate matching resources." diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_0/4622-batch2-chunk-io.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4622-batch2-chunk-io.yaml similarity index 89% rename from hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_0/4622-batch2-chunk-io.yaml rename to hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4622-batch2-chunk-io.yaml index 7676575795b..3627e4b9d34 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_4_0/4622-batch2-chunk-io.yaml +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4622-batch2-chunk-io.yaml @@ -1,4 +1,5 @@ --- type: perf issue: 4622 +backport: 6.4.3 title: "The batch system now reads less data during the maintenance pass. This avoids slowdowns on large systems." diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4630-instance-default-update-time.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4630-instance-default-update-time.yaml new file mode 100644 index 00000000000..b24f54a46c8 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4630-instance-default-update-time.yaml @@ -0,0 +1,5 @@ +--- +type: fix +issue: 4630 +backport: 6.4.3 +title: "Default values are provided for the new UPDATE_TIME columns so batch jobs started before an upgrade can complete." diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_8_0/4813-fix-tag-nonunique.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_8_0/4813-fix-tag-nonunique.yaml index c7aa497b7d6..370b93ac72f 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_8_0/4813-fix-tag-nonunique.yaml +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_8_0/4813-fix-tag-nonunique.yaml @@ -1,4 +1,5 @@ --- type: fix issue: 4813 +backport: 6.4.5 title: "Under heavy concurrency, a bug resulted in identical tag definitions being rejected with a `NonUniqueResultException` some of the time. This has been corrected." diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java index 7c44f0a4b98..62d0fd69ee7 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java @@ -221,15 +221,6 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks { protected void init680() { Builder version = forVersion(VersionEnum.V6_8_0); - // HAPI-FHIR #4801 - Add New Index On HFJ_RESOURCE - Builder.BuilderWithTableName resourceTable = version.onTable("HFJ_RESOURCE"); - - resourceTable - .addIndex("20230502.1", "IDX_RES_RESID_UPDATED") - .unique(false) - .online(true) - .withColumns("RES_ID", "RES_UPDATED", "PARTITION_ID"); - Builder.BuilderWithTableName tagDefTable = version.onTable("HFJ_TAG_DEF"); tagDefTable.dropIndex("20230505.1", "IDX_TAGDEF_TYPESYSCODEVERUS"); @@ -731,6 +722,48 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks { .addColumn("20230110.2", "UPDATE_TIME") .nullable() .type(ColumnTypeEnum.DATE_TIMESTAMP); + + Map updateBatch2JobInstance = new HashMap<>(); + updateBatch2JobInstance.put( + DriverTypeEnum.H2_EMBEDDED, + "update BT2_JOB_INSTANCE set UPDATE_TIME = coalesce(end_time, start_time, create_time, TIMESTAMP '2023-01-01 00:00:00') where UPDATE_TIME is null"); + updateBatch2JobInstance.put( + DriverTypeEnum.MARIADB_10_1, + "update BT2_JOB_INSTANCE set UPDATE_TIME = coalesce(end_time, start_time, create_time, TIMESTAMP '2023-01-01 00:00:00') where UPDATE_TIME is null"); + updateBatch2JobInstance.put( + DriverTypeEnum.MYSQL_5_7, + "update BT2_JOB_INSTANCE set UPDATE_TIME = coalesce(end_time, start_time, create_time, TIMESTAMP '2023-01-01 00:00:00') where UPDATE_TIME is null"); + updateBatch2JobInstance.put( + DriverTypeEnum.ORACLE_12C, + "update BT2_JOB_INSTANCE set UPDATE_TIME = coalesce(end_time, start_time, create_time, TIMESTAMP '2023-01-01 00:00:00') where UPDATE_TIME is null"); + updateBatch2JobInstance.put( + DriverTypeEnum.POSTGRES_9_4, + "update BT2_JOB_INSTANCE set UPDATE_TIME = coalesce(end_time, start_time, create_time, TIMESTAMP '2023-01-01 00:00:00') where UPDATE_TIME is null"); + updateBatch2JobInstance.put( + DriverTypeEnum.MSSQL_2012, + "update BT2_JOB_INSTANCE set UPDATE_TIME = coalesce(end_time, start_time, create_time, CONVERT(DATETIME,'2023-01-01 00:00:00')) where UPDATE_TIME is null"); + version.executeRawSql("20230397.1", updateBatch2JobInstance); + + Map updateBatch2WorkChunk = new HashMap<>(); + updateBatch2WorkChunk.put( + DriverTypeEnum.H2_EMBEDDED, + "update bt2_work_chunk set UPDATE_TIME = coalesce(end_time, start_time, create_time, TIMESTAMP '2023-01-01 00:00:00') where UPDATE_TIME is null"); + updateBatch2WorkChunk.put( + DriverTypeEnum.MARIADB_10_1, + "update bt2_work_chunk set UPDATE_TIME = coalesce(end_time, start_time, create_time, TIMESTAMP '2023-01-01 00:00:00') where UPDATE_TIME is null"); + updateBatch2WorkChunk.put( + DriverTypeEnum.MYSQL_5_7, + "update bt2_work_chunk set UPDATE_TIME = coalesce(end_time, start_time, create_time, TIMESTAMP '2023-01-01 00:00:00') where UPDATE_TIME is null"); + updateBatch2WorkChunk.put( + DriverTypeEnum.ORACLE_12C, + "update bt2_work_chunk set UPDATE_TIME = coalesce(end_time, start_time, create_time, TIMESTAMP '2023-01-01 00:00:00') where UPDATE_TIME is null"); + updateBatch2WorkChunk.put( + DriverTypeEnum.POSTGRES_9_4, + "update bt2_work_chunk set UPDATE_TIME = coalesce(end_time, start_time, create_time, TIMESTAMP '2023-01-01 00:00:00') where UPDATE_TIME is null"); + updateBatch2WorkChunk.put( + DriverTypeEnum.MSSQL_2012, + "update bt2_work_chunk set UPDATE_TIME = coalesce(end_time, start_time, create_time, CONVERT(DATETIME,'2023-01-01 00:00:00')) where UPDATE_TIME is null"); + version.executeRawSql("20230397.2", updateBatch2WorkChunk); } private void init610() {