-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add Non-conditional Put/Delete functionality #17
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How will this be exposed in the clients? Is there risk of accidentally corrupting data if a device has misconfigured its client to use non-conditional writes while another device is properly configured to do conditional writes? Is there any way to guard agains this?
app/src/main/proto/vss.proto
Outdated
// After any non-conditional upsert, `version` against the `key` is reset to '1'. Hence the next | ||
// `PutObjectRequest` for the `key` can either be a non-conditional upsert or a conditional write |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or DeleteObjectRequest
, too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since delete will delete the object, there is nothing left-over afterwards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, you mean delete it after put, yes we could of-course do get/list/delete as well.
Only wanted to clarify for next write operation.
Yes that risk exists, this risk is similar to using single-device storage and having a multi-device app. It will be directly exposed in thin-client and will not be exposed in phase-2's PrimarySecondaryStorage. |
b8a745c
to
4984189
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few minor comments. Otherwise, looks good.
Just like popular kvstores, we should also support non-conditional put/delete operations. This opens up new patterns for usage of VSS, allows clients to easily onboard to VSS (without versioning, just for remote-backups) or to just use global_version for versioning and avoid key-level version checks.
4984189
to
14744ae
Compare
Similar to popular kvstores, we should also support non-conditional put/delete operations. This opens up new patterns for usage of VSS, allows clients to easily onboard to VSS (without versioning, just for remote-backups) or to just use global_version for versioning and avoid key-level version checks.
DynamoDB: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.ConditionExpressions.html
If-match in cosmos: https://learn.microsoft.com/en-us/rest/api/cosmos-db/replace-a-document