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

Extending the db.transaction removal fix to the FhirEngine.search #2626

Open
LZRS opened this issue Jul 16, 2024 · 1 comment
Open

Extending the db.transaction removal fix to the FhirEngine.search #2626

LZRS opened this issue Jul 16, 2024 · 1 comment
Labels
effort:small Small effort - 2 days P2 Medium priority issue

Comments

@LZRS
Copy link
Collaborator

LZRS commented Jul 16, 2024

          > From discussion with @yigit, this particular read api should be executed independently of any transaction.

Reason (in Yigt's words): The transaction you add there doesn't really help with anything because you are only doing a read inside that transaction and it is a single read. SQLite will already do a "read transaction" for it implicitly, which will make that consistent.

Would you like to work on this @LZRS ?

Would it also affect reads using FhirEngine#search , that joins to other tables?

Originally posted by @LZRS in #2552 (comment)

@aditya-07 aditya-07 added P2 Medium priority issue effort:small Small effort - 2 days labels Jul 22, 2024
@aditya-07
Copy link
Collaborator

@LZRS The search api may have to do up to three different database calls to full fill a single search based on the search query.
Because of this, we have to consider one of the three cases.

  1. Don't remove transaction
  2. Remove for single search and keep if include/revInclude is there, so that the all the db queries for a single search happen in database transaction and the results are always correct.
  3. Remove for all and be OK with the consequences of maybe divergent results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort:small Small effort - 2 days P2 Medium priority issue
Projects
Status: New
Development

No branches or pull requests

2 participants