Repository navigation
A store kept under a prefix, and a volume removed whole
Summary
This release adds lode.Prefixed, a factory whose store keeps every object of another factory's store under a prefix, and volume.Remove, which removes a volume with its data so that the volume stays removed. It also fixes every commit after a dataset's first on Hetzner Object Storage.
Highlights
lode.Prefixed: the factory wraps another factory's store so that every object lives under a prefix, on any backend. A dataset or a volume therefore sits at a location of the caller's choice in a store the caller already holds.- Keys stay under the prefix: the store refuses a key that would leave the prefix with
ErrInvalidPath, and the factory refuses a prefix outside the root withErrInvalidArgument. volume.Remove: the call removes a volume with its data, and the volume stays removed.LatestandCommiton any handle of the volume return the newvolume.ErrRemoved, and a second call completes an interrupted removal.- Removal deletes nothing while a commit is in flight:
RemovereturnsErrHeadUncommittedwhile the head it fenced has no manifest, pending or abandoned. It returnsErrSnapshotConflictwhen a commit races it and the retries ofWithRetryCountare spent. - Commits succeed on Hetzner Object Storage: the S3 adapter sends
If-Matchwith the ETag's bare value. Hetzner refuses the quoted form with 412 even when the ETag matches, so every commit after a dataset's first returnedErrSnapshotConflictthere. AWS S3 and Cloudflare R2 accept both forms.
Known Limitations
- The v1.0 API freeze window restarts with this release, because
Prefixedis new in thelodepackage.
Full Changelog: v0.12.2...v0.13.0