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

refactor(event cache store): use a single transaction to handle all linked chunk updates at once #4395

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

bnjbvr
Copy link
Member

@bnjbvr bnjbvr commented Dec 9, 2024

Instead of one transaction per update. This ensures that if a single update fails, then none is taken into account.

The test triggers a unique constraint violation. Before the patch, it would still contain a single chunk (the first one), while after the patch, it contains none.

Part of #3280.

…inked chunk updates at once

Instead of one transaction per update. This ensures that if a single
update fails, then none is taken into account.
@bnjbvr bnjbvr requested a review from a team as a code owner December 9, 2024 14:57
@bnjbvr bnjbvr requested review from poljar and removed request for a team December 9, 2024 14:57
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.17%. Comparing base (a1a04ee) to head (10e4ae8).
Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4395   +/-   ##
=======================================
  Coverage   85.16%   85.17%           
=======================================
  Files         281      281           
  Lines       30924    30886   -38     
=======================================
- Hits        26337    26306   -31     
+ Misses       4587     4580    -7     

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

Copy link
Member

@Hywan Hywan left a comment

Choose a reason for hiding this comment

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

Looks sane to me! Good catch.

@Hywan Hywan removed the request for review from poljar December 9, 2024 16:34
@bnjbvr bnjbvr merged commit 68cb85a into main Dec 10, 2024
40 checks passed
@bnjbvr bnjbvr deleted the bnjbvr/single-transaction-event-cache-storage branch December 10, 2024 10:32
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.

2 participants