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

Return inserted-or-modified in store insert() result #23

Open
density215 opened this issue Oct 20, 2022 · 0 comments
Open

Return inserted-or-modified in store insert() result #23

density215 opened this issue Oct 20, 2022 · 0 comments

Comments

@density215
Copy link
Member

An insert() returns an integer, representing the amount of contention (the number of retries) that was encountered when inserting a prefix+metadata in a store, together with an Error.

But insert() is actually an upsert operation: it either creates a new (prefix, metadata) entry in the store, or it replaces the metadata on an existing entry with the metadata in the meta argument.

It would be useful to return what was actually happened in the store on insert, an insert of a new prefix or the modification of the metadata of the prefix.

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

No branches or pull requests

1 participant