Reindex racing and incremental cache update fixes#5350
Merged
SergeyGaluzo merged 118 commits intomainfrom Feb 12, 2026
Merged
Conversation
...icrosoft.Health.Fhir.Shared.Tests.Integration/Features/Operations/Reindex/ReindexJobTests.cs
Fixed
Show fixed
Hide fixed
This reverts commit c87f99c.
feordin
reviewed
Feb 10, 2026
src/Microsoft.Health.Fhir.SqlServer/Features/Schema/Migrations/103.diff.sql
Show resolved
Hide resolved
feordin
reviewed
Feb 10, 2026
src/Microsoft.Health.Fhir.CosmosDb/Features/Storage/CosmosFhirDataStore.cs
Show resolved
Hide resolved
feordin
reviewed
Feb 10, 2026
src/Microsoft.Health.Fhir.Core/Features/Operations/Reindex/ReindexOrchestratorJob.cs
Outdated
Show resolved
Hide resolved
feordin
previously approved these changes
Feb 10, 2026
jestradaMS
reviewed
Feb 12, 2026
src/Microsoft.Health.Fhir.Core/Features/Search/Registry/ISearchParameterStatusDataStore.cs
Show resolved
Hide resolved
jestradaMS
reviewed
Feb 12, 2026
src/Microsoft.Health.Fhir.Core/Features/Search/Registry/SearchParameterStatusManager.cs
Show resolved
Hide resolved
jestradaMS
reviewed
Feb 12, 2026
jestradaMS
reviewed
Feb 12, 2026
...t.Health.Fhir.SqlServer/Features/Storage/Registry/SqlServerSearchParameterStatusDataStore.cs
Show resolved
Hide resolved
jestradaMS
reviewed
Feb 12, 2026
...th.Fhir.Shared.Tests.Integration/Persistence/SqlServerSearchParameterStatusDataStoreTests.cs
Show resolved
Hide resolved
jestradaMS
approved these changes
Feb 12, 2026
This file contains hidden or 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
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.
Fixes the problem in the incremental search param cache update logic.
Before the fix:
Any transactions between #2 and #4 were not reflected in cache
After the fix:
In #4 code does not read the database but uses data point saved in #1.
Racing between search parameter create and cache refresh
Before the fix:
After the fix:
There is an additional check in 2 whether search param is added to cache. If not, SearchParam.LastUpdated internal property is not advanced.
Subsequent attempt to update cache succeeds.
Other fixes of racing bugs:
https://microsofthealth.visualstudio.com/Health/_workitems/edit/180950/
https://microsofthealth.visualstudio.com/Health/_workitems/edit/180898/
Removes ALL retries from e2e reindex tests, which were hiding the issues.