Skip to content

Move forced-id to HFJ_RESOURCE - step 2 #4803

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Oct 20, 2023
Merged

Move forced-id to HFJ_RESOURCE - step 2 #4803

merged 14 commits into from
Oct 20, 2023

Conversation

michaelabuckley
Copy link
Contributor

@michaelabuckley michaelabuckley commented May 2, 2023

Start using new fhir_id column in hfj_resource instead for queries. Still writes forced_id to support zero-downtime.

Reviewer notes:
The existing test coverage seems pretty good, so I'm not too worried about the core behaviour. Two big worries are:

  • the custom migration - it is tested on Sql Server, H2, PG, Oracle, and MySql. Haven't tested Derby.
  • concurrent access by old clients.

We still write to hfj_forced_id, but never query it now. Older servers should have been populating the new FHIR_ID column, and the migration fills in the rest and makes it not-null and indexed.

Start using new fhir_id column in hfj_resource instead.
# Conflicts:
#	hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/HapiFhirHibernateJpaDialect.java
#	hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java
#	hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/custom/IResourceTableDaoImpl.java
#	hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java
#	hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceSearchView.java
#	hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java
#	hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexer.java
#	hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImpl.java
#	hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcImpl.java
#	hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceTable.java
#	hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/provider/r4/MultitenantServerR4Test.java
#	hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/test/BaseJpaR4Test.java
#	hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/test/BaseJpaTest.java
@michaelabuckley michaelabuckley changed the title Move forced-id to HFJ_RESOURCE - step 2 Draft: Move forced-id to HFJ_RESOURCE - step 2 Oct 19, 2023
@michaelabuckley michaelabuckley requested a review from a team as a code owner October 19, 2023 02:09
@github-actions
Copy link

github-actions bot commented Oct 19, 2023

Formatting check succeeded!

@michaelabuckley michaelabuckley changed the title Draft: Move forced-id to HFJ_RESOURCE - step 2 Move forced-id to HFJ_RESOURCE - step 2 Oct 19, 2023
@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2f5ffe7) 81.32% compared to head (f3403de) 82.98%.
Report is 331 commits behind head on master.

❗ Current head f3403de differs from pull request most recent head b9fc4ad. Consider uploading reports for the commit b9fc4ad to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4803      +/-   ##
============================================
+ Coverage     81.32%   82.98%   +1.65%     
- Complexity    23650    26478    +2828     
============================================
  Files          1425     1629     +204     
  Lines         86399   102732   +16333     
  Branches      11677    13110    +1433     
============================================
+ Hits          70265    85251   +14986     
- Misses        10947    11876     +929     
- Partials       5187     5605     +418     

see 1646 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tadgh tadgh enabled auto-merge (squash) October 20, 2023 02:58
@tadgh tadgh merged commit ee36926 into master Oct 20, 2023
@tadgh tadgh deleted the mb-forced-id-step-2 branch October 20, 2023 16:14
michaelabuckley added a commit that referenced this pull request Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants