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

KeyValue atomic delete and purge methods. #1092

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

davidmcote
Copy link
Contributor

@davidmcote davidmcote commented Mar 2, 2024

nats-io/nats-architecture-and-design#271
#1091

What's in this patch?

  1. New public methods in KeyValue for delete and purge with optimistic concurrency support:
void delete(String key, long expectedRevision) throws IOException, JetStreamApiException;
void purge(String key, long expectedRevision) throws IOException, JetStreamApiException;
  1. New unit test testAtomicDeleteAtomicPurge with positive and negative cases.

@davidmcote davidmcote force-pushed the atomic-kv-delete branch 3 times, most recently from 4c7cb36 to 3b26c7c Compare March 4, 2024 16:23
@davidmcote
Copy link
Contributor Author

(Brain fart - I let github rebase a signed commit and it predictably became unverified. I re-pushed the signed commit.)

Copy link
Contributor

@scottf scottf left a comment

Choose a reason for hiding this comment

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

LGTM

@scottf scottf merged commit 7ed4990 into nats-io:main Mar 5, 2024
1 check passed
@davidmcote davidmcote deleted the atomic-kv-delete branch March 7, 2024 20:05
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.

None yet

2 participants