Skip to content
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

Cleanup search parameters on historical resources #3847

Merged
merged 7 commits into from
May 10, 2024

Conversation

LTA-Thinking
Copy link
Collaborator

@LTA-Thinking LTA-Thinking commented May 8, 2024

Description

Adds a SQL Schema version that cleans up search parameters on historical resources.

Related issues

Addresses AB#102248
#3846

Testing

FHIR Team Checklist

  • Update the title of the PR to be succinct and less than 65 characters
  • Add a milestone to the PR for the sprint that it is merged (i.e. add S47)
  • Tag the PR with the type of update: Bug, Build, Dependencies, Enhancement, New-Feature or Documentation
  • Tag the PR with Open source, Azure API for FHIR (CosmosDB or common code) or Azure Healthcare APIs (SQL or common code) to specify where this change is intended to be released.
  • Tag the PR with Schema Version backward compatible or Schema Version backward incompatible or Schema Version unchanged if this adds or updates Sql script which is/is not backward compatible with the code.
  • CI is green before merge Build Status
  • Review squash-merge requirements

Semver Change (docs)

Patch

@LTA-Thinking LTA-Thinking added Bug Bug bug bug. Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs labels May 8, 2024
@LTA-Thinking LTA-Thinking requested a review from a team as a code owner May 8, 2024 21:41
@LTA-Thinking LTA-Thinking added this to the S140 milestone May 8, 2024
@SergeyGaluzo
Copy link
Contributor

SergeyGaluzo commented May 8, 2024

Is not it too late? We have prior versions that rely on deleted history. They will not be able to apply if they go in version order. Should we fix prior version instead?

@LTA-Thinking
Copy link
Collaborator Author

Is not it too late? We have prior versions that rely on deleted history. They will not be able to apply if they go in version order. Should we fix prior version instead?

Good point, it should be in both. That way people who have already updated will still get it, and people who have yet to update get it sooner.

@SergeyGaluzo
Copy link
Contributor

I don't see how version 73 can be successful with deleting history first. If so, I don't see the need to have special version to do this. We just need to fix 73.

@@ -0,0 +1 @@
Execute dbo.DeleteHistory 0,0,0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for this statement?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What has happened is that after Schema 76 the IsHistory column was removed from search parameter tables. This column hadn't been being used since v48, but for any customers who had data older than that there could be historical data still in those tables. That data was preventing current data from being returned in search requests because it was filling up the count of resources the search was looking for.
This stored procedure was written as part of v48 to clean up this data, but it was never actually run. This change explicitly runs this stored proc to finally clean up this unneeded data. It does not delete the historical resources, just the search parameters connected to them.

@LTA-Thinking LTA-Thinking merged commit 5a98e34 into main May 10, 2024
46 checks passed
@LTA-Thinking LTA-Thinking deleted the personal/rojo/remove-historical-search-parameters branch May 10, 2024 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs Bug Bug bug bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants