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

Replace "UpsertBatch" with "InsertOrGetBatch" #1208

Merged
merged 1 commit into from
Mar 7, 2023

Conversation

awrichar
Copy link
Contributor

@awrichar awrichar commented Mar 7, 2023

When persisting an off-chain batch initially received from data exchange or shared storage, it should always be an insert. If the batch exists, just move on. Otherwise we may accidentally revert a confirmed batch to its previous state if it happens to get redelivered.

Bonus: In addition to preventing bugs, this should give a tiny performance boost due to the optimistic batch insert.

When persisting an off-chain batch initially received from data exchange or
shared storage, it should always be an insert. If the batch exists, just move
on. Otherwise we may accidentally revert a confirmed batch to its previous
state if it happens to get redelivered.

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants