Zero 1.8
Operational Visibility and Reliability
Installation
npm install @rocicorp/zero@1.8Overview
Zero 1.8 focuses on operational visibility, production reliability, and performance under large replication and query workloads.
Features
- Request header forwarding:
zero-cachecan now forward allowlisted headers from the incoming HTTP request to query and mutate endpoints. This is useful for server-injected proxy or load-balancer headers such asx-forwarded-forthat clients cannot safely set themselves. (#6144) (thanks @tjenkinson!) - GHCR Docker images: Zero Docker images are now published to
ghcr.io/rocicorp/zeroin addition to Docker Hub. (#6161) - View-syncer serving lag metrics: Added
zero.sync.serving-lag,zero.sync.serving-lag-stats, andzero.sync.serving-lagging-client-groupsso operators can see when replica data is ready locally but has not finished serving to active client groups. (#6157) (thanks @tantaman!) - Initial sync metrics: Added OpenTelemetry metrics and structured logs for initial-sync runs, COPY time, SQLite flush time, index creation time, copied rows, copied bytes, chunks, sync mode, copy format, and outcomes. (#6191)
- Litestream v0.5 backup cleanup: Added an opt-in path for backing up with Litestream v0.5.x and reading verified cleanup watermarks through the Litestream SQLite VFS. (#6146) (thanks @tantaman!)
Performance
- Large upstream transactions persist to the CDC
changeLogabout 13x faster in local pg-16 benchmarks, with much lower transient heap usage, by batching change-log writes throughjson_to_recordset. (#6142) - Common in-memory ZQL fetch shapes are 1.4x-2.0x faster by collapsing the
MemorySourcegenerator stack in the common no-overlay/no-start/no-connection-filter path. (#6127) - Take-window maintenance fetches on ordered SQLite sources can avoid planner-hostile partition scans by adding seekable leading-column bounds for non-null sort columns. (#6184) (thanks @tantaman!)
Fixes
- Postgres logical replication could stall indefinitely when Postgres stopped returning responses. (thanks @tantaman!)
- Drizzle ORM 1.0.0-rc integrations could receive raw array rows instead of object rows from prepared queries. (thanks @typedrat!)
- Persisted
gotquery state could make stale local data appearcompleteafter reconnect. - Malformed SQLite replicas could be accepted until later failures instead of being detected during restore/open and routed through reset or recovery. (thanks @tantaman!)
- React Native apps using op-sqlite v17 could fail to read rows because op-sqlite changed the raw row result shape.
- Fresh multi-node stacks could crash-loop view-syncers with
max attempts exceeded restoring replicabefore the initial backup became restorable. #6135 - Opt-in Litestream v0.5 backup cleanup could start without the required v0.5 executable and restore configuration instead of failing fast. (thanks @tantaman!)
Breaking Changes
None.