Skip to content

Move check for "running reindex" in the data store#5648

Open
SergeyGaluzo wants to merge 30 commits into
mainfrom
users/sergal/running-reindex
Open

Move check for "running reindex" in the data store#5648
SergeyGaluzo wants to merge 30 commits into
mainfrom
users/sergal/running-reindex

Conversation

@SergeyGaluzo

Copy link
Copy Markdown
Contributor

@SergeyGaluzo SergeyGaluzo requested a review from a team as a code owner June 28, 2026 16:20
@github-actions github-actions Bot added the SQL Scripts If SQL scripts are added to the PR label Jun 28, 2026
@codecov-commenter

codecov-commenter commented Jun 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@7ebcc52). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #5648   +/-   ##
=======================================
  Coverage        ?   76.92%           
=======================================
  Files           ?     1004           
  Lines           ?    36760           
  Branches        ?     5562           
=======================================
  Hits            ?    28276           
  Misses          ?     7134           
  Partials        ?     1350           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

SergeyGaluzo and others added 4 commits June 29, 2026 14:05
… on local IDisposable'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…e may be null'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…tunity'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
PTaladay
PTaladay previously approved these changes Jun 30, 2026
@PTaladay PTaladay added this to the FY27\Q1\2wk\2wk01 milestone Jun 30, 2026
@rajithaalurims

Copy link
Copy Markdown
Contributor

Backward- and forward-compatible schema changes
The old code works with the new schema changes as expected, which covers our rollback scenario.
However, new code with the old schema changes will silently skip the Reindex check.
Since our rolling release leaves us in a state where pods running new code need to work with the old schema, I think we need version-gated behavior for this change.

Change in customer visible error message:
Before PR: Changes to search parameters is not allowed while a reindex job is ongoing.  Wait for the reindex job with Id: {jobId} to finish, or cancel it.
After PR : Reindex job is in progress. Job Id=12345
Could we replace the SQL message with the resource string so the error message stays the same?

Change in when customer receives the error:
For example when customer runs Bulk delete, it used to fail with 409 at the controller level and return 409 right away. Now it starts the job (returns 202 Accepted), and the job itself fails later with 409 status and a conflict issue in the OperationOutcome. This changes when the error surfaces. Do we need to announce the behavior change? What if the customer was only listening to the bulk update API response and not depending on the actual operation outcome?

@SergeyGaluzo

SergeyGaluzo commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

Backward- and forward-compatible schema changes The old code works with the new schema changes as expected, which covers our rollback scenario. However, new code with the old schema changes will silently skip the Reindex check. Since our rolling release leaves us in a state where pods running new code need to work with the old schema, I think we need version-gated behavior for this change.

Change in customer visible error message: Before PR: Changes to search parameters is not allowed while a reindex job is ongoing.  Wait for the reindex job with Id: {jobId} to finish, or cancel it. After PR : Reindex job is in progress. Job Id=12345 Could we replace the SQL message with the resource string so the error message stays the same?

Change in when customer receives the error: For example when customer runs Bulk delete, it used to fail with 409 at the controller level and return 409 right away. Now it starts the job (returns 202 Accepted), and the job itself fails later with 409 status and a conflict issue in the OperationOutcome. This changes when the error surfaces. Do we need to announce the behavior change? What if the customer was only listening to the bulk update API response and not depending on the actual operation outcome?

  1. Compatibility. Old schema is also checking for reindex conflicts, so we should be covered. New schema is accepting 0 reindex id and does the checks too.
  2. I will replace the message with old one.
  3. I doubt that there are real customers, who use bulk delete to delete search parameters. If there are, we should announce before, if not - we can just update in release notes. I might need some help in determining that.

Comment thread test/Microsoft.Health.Fhir.Shared.Tests.E2E/Rest/BulkDeleteTests.cs Dismissed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

SQL Scripts If SQL scripts are added to the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants