Skip to content

safe-fs: preserve a per-handle publication token independently of namespace revision #783

Description

@kamilio

ObjectFilePublicationStore.publish receives only expectedRevision plus size/mode/signal. Hosts that reserve publication capacity during writable acquisition need the exact retained lease when publishing. Encoding the lease ID into revision breaks the public immutable-read conformance requirement: independent acquisitions of one namespace generation must report the same revision. A path/revision lookup is ambiguous when two writers hold that same generation.

Validated in poe-internal/poe2 PR #14982: CI run 35956382627 fails object publication: immutable reads survive replacement with acquisition did not observe the published namespace revision after the consumer encoded updatedAt:leaseId. Current upstream still drops all version fields except revision/stat/read/close before publication.

Add an optional bounded opaque publication token on ObjectFileVersion, preserve it through descriptor validation, and pass the current token in ObjectFilePublicationOptions. Keep expectedRevision stable and retain all existing conformance cases. Add a regression with two distinct acquired handles sharing one revision, sequential flushes, and updated tokens from each publication. Existing stores without tokens must retain their behavior.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions