Skip to content

Implicit vs explicit groups #184

@jbms

Description

@jbms

Currently the zarr v3 spec does not require that every group have a metadata document, and instead allows a group to be defined implicitly by the presence of a descendant.

Pros:

  • No need to write an empty metadata document just to have a group.
  • Multiple machines can create distinct arrays in parallel within the same, possibly not-yet-existing group without any coordination or store-level locking/atomic operations to create the group metadata document.

Cons:

  • Possibility of simultaneously creating a group and array with the same name. This could be fixed by allowing arrays to also be groups.
  • If group-level storage transformers are allowed, there is a possible race condition: one machine may attempt to create "a/b" as an array, and another machine may simultaneously create "a" as a group with a storage transformer. We may end up with a corrupted result, where "a/b" does not correctly take into account the storage transformer.

An alternative to implicit groups is to use a separator other than "/", such as ".", if the equivalent of implicit groups are desired.

Metadata

Metadata

Assignees

No one assigned

    Labels

    core-protocol-v3.0Issue relates to the core protocol version 3.0 spec

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions