nats-io / nats-architecture-and-design

Architecture and Design Docs
Apache License 2.0
177 stars 20 forks source link

ObjectStore `put` doesn't have `previousRevision` #195

Open aricart opened 1 year ago

aricart commented 1 year ago

Overview

For object store, we are missing a previousRevision option for put. Without it, it is very possible to create object store entries that are unable to prune the previous entry, as the put operation determines if the object exists at the start of the operation. This means that if another operation is in flight, the data for the object be leaked on the stream as the client that writes the last entry will win effectively making the chunk data invisible.

The implementation for object store is exactly the same as the put option in KV.

Clients and Tools

Other Tasks

Client authors please update with your progress. If you open issues in your own repositories as a result of this request, please link them to this one by pasting the issue URL in a comment or main issue description.

scottf commented 9 months ago

There is no put with revision in KV. There is create which requires no revisions exist for a key. There is update, which requires matching the previous revision.

So do you mean to make parallel for OS, or did you really specifically mean put with revision?