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

Fix Issues with Rebuilding the PatientLastChange Index #2372

Closed
alexanderkiel opened this issue Feb 3, 2025 · 0 comments · Fixed by #2373
Closed

Fix Issues with Rebuilding the PatientLastChange Index #2372

alexanderkiel opened this issue Feb 3, 2025 · 0 comments · Fixed by #2373
Assignees
Labels
bug Something isn't working performance Performance improvement
Milestone

Comments

@alexanderkiel
Copy link
Member

alexanderkiel commented Feb 3, 2025

The PatientLastChange index contains all changes to resources in the compartment of a particular Patient on reverse chronological order. Using the PatientLastChange index it's possible to detect the t of the last change in a Patient compartment.

While migrating from a version of Blaze before 0.27, the PatientLastChange index is rebuild by just traversing all transactions from the transaction log again and create the same index entries as a normal transaction would have done. This is an idea from event sourcing and it works unless one has way too many transactions.

For the PatientLastChange index, it's not important to know how far away in the past the last change on a Patient was, unless old CQL Bloom filter entries exist. So for a newly migrated system, it's actually off to have the current t for all Patients in the index. So instead of going though all transactions again, just using the t at time of index build is ok.

@alexanderkiel alexanderkiel self-assigned this Feb 3, 2025
@alexanderkiel alexanderkiel added this to the v0.32.0 milestone Feb 3, 2025
@alexanderkiel alexanderkiel added bug Something isn't working performance Performance improvement labels Feb 3, 2025
@alexanderkiel alexanderkiel linked a pull request Feb 3, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working performance Performance improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant