Skip to content

feat: Store.head content-version probe + parallel chunk decode (v0.7.2)#10

Merged
guidocerqueira merged 2 commits into
mainfrom
feat/store-head-content-version
Jun 17, 2026
Merged

feat: Store.head content-version probe + parallel chunk decode (v0.7.2)#10
guidocerqueira merged 2 commits into
mainfrom
feat/store-head-content-version

Conversation

@guidocerqueira

@guidocerqueira guidocerqueira commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Two changes, two commits.

1. Store.head for content-version probing (4edc6e3)

Adds an optional Store.head(key) + S3Store.head returning { etag, lastModified, size } | null (null for an absent key; other failures throw, mirroring has()'s retry + 404 handling) and a StoreHead type.

Why: the ZarrDatasetRegistry keys every cache tier (handle/L1, metadata + coordinate Redis caches, on-disk chunk cache) by the open() id and assumes a dataset is immutable per id. When an upstream pipeline overwrites a dataset in place, every tier kept serving stale state — in nautilus-api this surfaced as a collapsed/constant forecast time axis that survived a Redis flush and only cleared on a pod restart. head() exposes the ETag as a cheap content-version probe so a consumer can fold it into the cache key (id = \${s3Path}@${etag}``) and invalidate all tiers at once on re-ingestion.

  • src/store/store.ts — optional head? + StoreHead.
  • src/store/s3.tsS3Store.head() (retry + AbortSignal timeout; null on 404).
  • tests/integration/s3.test.ts — head ok + 404→null (local fake S3).

2. Parallel chunk decode via worker pool (d759100)

Off-thread Blosc/codec decoding through a worker pool (decode-pool + decode-worker), wired into the chunk loader so the models x variables x chunks fan-out no longer serializes decode on the main thread. Adds a benchmark, unit coverage, and updates the CJS/ESM interop tests + README for the new export.

Release

Bumps to 0.7.2 + CHANGELOG (head feature). After merge, tag v0.7.2 to publish.

Test

typecheck clean; full suite 344 passing / 17 skipped; lint + format clean.

Add an optional Store.head(key) and its S3Store implementation, returning
{ etag, lastModified, size } | null (null for an absent key; other failures
throw, mirroring has()'s retry/404 handling).

Motivation: the dataset registry keys every tier (handle/L1, metadata +
coordinate caches, on-disk chunk cache) by the open() id and assumes a dataset
is immutable per id. When an upstream pipeline overwrites a dataset in place
(same path), every tier kept serving stale state. head() exposes the object's
ETag as a cheap content-version probe so consumers can fold it into the cache
key and invalidate precisely on overwrite.

Adds s3 integration tests (head ok + 404 -> null) against the local fake S3.
Off-thread Blosc/codec decoding through a worker pool (decode-pool +
decode-worker), wired into the chunk loader so the models x variables x chunks
fan-out no longer serializes decode on the main thread. Adds a benchmark and
unit coverage; CJS/ESM interop tests and README updated for the new export.

(Pre-existing working-tree changes, committed together with the Store.head
content-version feature per request.)
@guidocerqueira guidocerqueira changed the title feat: Store.head for content-version probing (v0.7.2) feat: Store.head content-version probe + parallel chunk decode (v0.7.2) Jun 16, 2026
@guidocerqueira guidocerqueira merged commit ee99438 into main Jun 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants