-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Reduce storage required for indexing - stop writing sp_name, res_type, and sp_updated to hfj_spidx_* tables #5941
Open
volodymyr-korzh
wants to merge
17
commits into
master
Choose a base branch
from
5937-reduce-storage-required-for-indexing-tables
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Reduce storage required for indexing - stop writing sp_name, res_type, and sp_updated to hfj_spidx_* tables #5941
volodymyr-korzh
wants to merge
17
commits into
master
from
5937-reduce-storage-required-for-indexing-tables
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…_type and sp_updated columns of HFJ_SPIDX tables nullable
Formatting check succeeded! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5941 +/- ##
============================================
+ Coverage 83.39% 83.50% +0.10%
- Complexity 26927 27183 +256
============================================
Files 1681 1697 +16
Lines 103965 104858 +893
Branches 13189 13271 +82
============================================
+ Hits 86702 87560 +858
- Misses 11613 11630 +17
- Partials 5650 5668 +18 ☔ View full report in Codecov by Sentry. |
jamesagnew
reviewed
May 17, 2024
...ver-model/src/main/java/ca/uhn/fhir/jpa/model/listener/IndexStorageOptimizationListener.java
Outdated
Show resolved
Hide resolved
… RES_TYPE after update/load
…-required-for-indexing-tables # Conflicts: # hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java
…eters if IndexMissingFields and optimizeIndexStorage are both enabled
…rect configuration handling
… SP recovery, documentation updates
…-required-for-indexing-tables
…-required-for-indexing-tables
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Migration:
HFJ_SPIDX
tables to allowSP_NAME
andRES_TYPE
columns to be nullable.failureAllowed()
, as bothSP_NAME
andRES_TYPE
could be included in custom indexes, and SQL Server won't let us change nullability on columns with indexes pointing to them.Optimization changes:
HFJ_SPIDX
tables - nullingSP_NAME
,RES_TYPE
SP_UPDATED
if this feature is enabled.JpaSearchParamCache
to recoverSP_NAME
,RES_TYPE
from hash_identity after loading from DB.HASH_IDENTITY
field was added toBaseResourceIndexedSearchParam
entity and removed from all inheritor entities.ResourceIndexedSearchParam
now usingHASH_IDENTITY
instead ofsp_name
andres_type
. This is required to makeResourceIndexedSearchParam
objects with and without optimization to be equal - to not cause unnecessaryResourceIndexedSearchParams
updates. (as we are comparing db version of entities with in-memory built Search params)DaoSearchParamSynchronizer
logic to check whether it is needed to update existing search parameters afterisIndexStorageOptimized
changeisIncludePartitionInSearchHashes
andisIndexStorageOptimized
are enabled on server. (isIncludePartitionInSearchHashes
is not supported ifisIndexStorageOptimized
is set totrue
)InMemoryResourceMatcher
now useshashIdentity
to filter SearchParams instead ofsp_name
. (only if optimization is enabled)hashIdentity
instead ofSP_NAME
,RES_TYPE
to build a query. This way new optimization could work in pair with EnabledIndexMissingFields
setting. (only if optimization is enabled)