Add Non-conditional Put/Delete functionality#17
Conversation
jkczyz
left a comment
There was a problem hiding this comment.
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.
Or DeleteObjectRequest, too?
There was a problem hiding this comment.
Since delete will delete the object, there is nothing left-over afterwards.
There was a problem hiding this comment.
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
jkczyz
left a comment
There was a problem hiding this comment.
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