nats-architecture-and-design icon indicating copy to clipboard operation
nats-architecture-and-design copied to clipboard

ObjectStore links/updates

Open aricart opened this issue 3 years ago • 3 comments

Overview

This issue documents some updates made to the Go client object store implementation to handle some conditions reasonably.

  • update the meta of a deleted object should not be allowed by the client.
  • updating the meta to point to an already existing name should not be allowed
  • put should not allow setting the meta.link information - this is only supported via the link API
  • getInfo should not return info for deleted objects. Optional methods can be added to support getting info on deleted objects.
  • list should not return info for deleted objects. Optional methods can be added to support getting info on deleted objects.

ObjectStore ADR https://github.com/nats-io/nats.deno/commit/6164d014a3e19c4d75c1adcbafb141d6db86e118

Clients and Tools

  • [x] Go @piotrpio
  • [x] Java @scottf
  • [X] JavaScript https://github.com/nats-io/nats.deno/commit/d85bbf55cfa70cee5f5651f1acdd605f3aae6b2a, https://github.com/nats-io/nats.deno/commit/6164d014a3e19c4d75c1adcbafb141d6db86e118
  • [x] .Net @scottf
  • [ ] C @levb
  • [ ] Python @wallyqs
  • [ ] Ruby @wallyqs
  • [ ] Rust @Jarema @caspervonb

Other Tasks

  • [ ] docs.nats.io updated @jnmoyne
  • [x] Update ADR https://github.com/nats-io/nats-architecture-and-design/pull/158
  • [ ] Update client features spreadsheet

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.

aricart avatar Sep 19 '22 19:09 aricart

Object Store ADR-20 is here https://github.com/nats-io/nats-architecture-and-design/blob/main/adr/ADR-20.md

scottf avatar Sep 19 '22 20:09 scottf

updating the meta to point to an already existing name should not be allowed

It's an error to update an object's name to an existing and not deleted object. You can update an objects name to an existing but deleted object.

scottf avatar Sep 19 '22 20:09 scottf

put should not allow setting the meta.link information - this is only supported via the link API

The put method should check the incoming meta for a link and fail with error if it finds one.

scottf avatar Sep 19 '22 20:09 scottf