Skip to content

Optimize transaction writes#6460

Merged
jamesagnew merged 45 commits intomasterfrom
ja_20241112_optimize_transaction_writes
Nov 22, 2024
Merged

Optimize transaction writes#6460
jamesagnew merged 45 commits intomasterfrom
ja_20241112_optimize_transaction_writes

Conversation

@jamesagnew
Copy link
Collaborator

No description provided.

@github-actions
Copy link

github-actions bot commented Nov 12, 2024

Formatting check succeeded!

@codecov
Copy link

codecov bot commented Nov 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.45%. Comparing base (406db33) to head (959dfc2).
Report is 99 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6460      +/-   ##
============================================
- Coverage     83.54%   83.45%   -0.10%     
- Complexity    27432    27876     +444     
============================================
  Files          1707     1751      +44     
  Lines        106185   108085    +1900     
  Branches      13397    13564     +167     
============================================
+ Hits          88710    90197    +1487     
- Misses        11750    12056     +306     
- Partials       5725     5832     +107     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Copy link
Contributor

@michaelabuckley michaelabuckley left a comment

Choose a reason for hiding this comment

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

Mostly questions.

One correctness worry. One performance worry.

Correctness - with delete entries processed before creates, do we handle delete followed by conditional-create by identifier without flush?

Performance - we have two paths to resolve ids - numeric and string. It might be faster to only use numeric if all ids are numeric, since they will also work when resolving fhir_ids. Or they could be combined into a single query like

select res_id, forced_id, res_type from hfj_resource
where res_id in (?,?,?)
or fhir_id in (?,?,?)

Copy link
Collaborator

@fil512 fil512 left a comment

Choose a reason for hiding this comment

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

Nice work. Really like how much it reduces the db calls.

Copy link
Collaborator

@fil512 fil512 left a comment

Choose a reason for hiding this comment

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

A bunch of my comments went missing. I wonder if this will revive them...

@jamesagnew jamesagnew merged commit d4f1766 into master Nov 22, 2024
@jamesagnew jamesagnew deleted the ja_20241112_optimize_transaction_writes branch November 22, 2024 00:22
jamesagnew added a commit that referenced this pull request Dec 4, 2024
@jamesagnew jamesagnew mentioned this pull request Dec 4, 2024
volodymyr-korzh pushed a commit that referenced this pull request Dec 16, 2024
* Backport #6460 to 7.6.0
* Add support for #6508
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants