Zero 1.9
Query Correctness and Reliability
Installation
npm install @rocicorp/zero@1.9You can use zero-cache from Docker Hub or GHCR:
docker pull rocicorp/zero:1.9.0
# or
docker pull ghcr.io/rocicorp/zero:1.9.0Overview
Zero 1.9 improves query correctness and zero-cache reliability.
Performance
Deferred.
Fixes
- Ordered queries now paginate and maintain windows correctly when cursor fields contain
NULL, including compound tie-break fields and reverse walks. This prevents skipped rows, empty windows, and relatedBound should be setfailures. (thanks @YevheniiKotyrlo!) - Schema construction, CRUD mutators, and materialized views now preserve a key named
__proto__as user data instead of invoking JavaScript's legacy prototype setter. (thanks @tjenkinson!) - Clients now receive changed rows after a server-side query is rebuilt, instead of retaining stale results in a rare rehydration case.
zero-cachenow bounds its SQLite prepared-statement caches with LRU eviction, preventing unbounded statement retention when applications generate many distinct query shapes.- Replication lag reports now retry when an expected report is missing, and serving-lag metrics exclude disconnected or not-yet-validated client groups. See the updated OpenTelemetry metric descriptions.
zero-cachenow detects and resets PostgreSQL connections that stop carrying wire traffic, including over TLS, allowing work to recover from proxy-created half-open sockets. See Breaking Changes.zero-cachenow releases custom-query caches when client groups stop, preventing inactive groups from retaining timers and transformed queries.
Breaking Changes
PostgreSQL Socket Inactivity Timeout
zero-cache now monitors wire activity on its PostgreSQL connections. By default, it checks every two minutes and resets a connection after one to two inactive intervals. This recovers half-open connections, but can interrupt a long-running statement that legitimately produces no network traffic.
If legitimate Postgres operations can remain silent for this long, set ZERO_PG_SOCKET_INACTIVITY_TIMEOUT on zero-cache to a longer interval in milliseconds. Set it to 0 to disable the watchdog.