-
Notifications
You must be signed in to change notification settings - Fork 171
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 transaction into batch and snapshot #2182
Conversation
3c3cf6c
to
ceed6f5
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2182 +/- ##
==========================================
+ Coverage 78.44% 78.52% +0.07%
==========================================
Files 100 102 +2
Lines 9191 9205 +14
==========================================
+ Hits 7210 7228 +18
+ Misses 1348 1346 -2
+ Partials 633 631 -2 ☔ View full report in Codecov by Sentry. |
ceed6f5
to
22dc7b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, it looks good to me. I have let some comments
Description
This PR removes the Transaction struct and added
batch
andsnapshot
which implements theTransaction
interface.batch
is used for read-write operations whilesnapshot
is used for read-only operations.Rationale
A transaction can only be a
batch
or asnapshot
, not both at the same time. The following pattern may be unnecessary:It's clearer to just separate
batch
andsnapshot
into different structs and use them accordingly.