Skip to content

"Memset-esque" Update #12

Answered by smoyergh
victorstewart asked this question in Q&A
Discussion options

You must be logged in to vote

No. Internally we use MVCC to implement snapshot isolation, and the mechanisms we use assume a put operation replaces the existing value.

That said, there is a way to logically implement what you want using the HSE API, assuming a degree of structure to the values you are storing.

Consider a value with K logical components that you need to update individually. You can store each component of the value individually with keys of the form (ID, COMP), where ID uniquely identifies the value, and COMP is the logical component number (e.g., 0 through K-1). In this case, ID is the key prefix, and the KVS storing the KV pairs has a pfx_len=sizeof(ID).

You can initially store the value atomically u…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by smoyergh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #12 on December 11, 2020 18:53.