Skip to content

fix: make last batch operation take effect#150

Merged
gammazero merged 2 commits into
masterfrom
batch-put-delete
Jun 24, 2026
Merged

fix: make last batch operation take effect#150
gammazero merged 2 commits into
masterfrom
batch-put-delete

Conversation

@gammazero

Copy link
Copy Markdown
Contributor

When adding Put and Delete operations to a batch, for the same key, make the last operation be the one to take effect.

Put and Delete for same key:

  • Delete after Put: Commit removes Put and deletes item from datastore.
  • Put after Delete: Put removes Delete from batch and adds Put.

Closes #49

When adding Put and Delete operations to a batch, for the same key, make the last operation be the one to take effect.

Put and Delete for same key:
- Delete after Put: Commit removes Put and deletes item from datastore.
- Put after Delete: Put removes Delete from batch and adds Put.

Closes #49
@gammazero gammazero requested a review from lidel June 24, 2026 20:34

@lidel lidel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, feels correct, thanks for locking this down with docs and test (pushed small typo fix).

@gammazero gammazero merged commit ac3bbd2 into master Jun 24, 2026
9 checks passed
@gammazero gammazero deleted the batch-put-delete branch June 24, 2026 21:41
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.

Handle puts *and* deletes in Batch

2 participants