Zero 1.4
Performance and Reliability Improvements
Installation
npm install @rocicorp/zero@1.4Features
- Kysely Adapter: Added
zeroKysely, so Zero server mutators can run against a Kysely transaction. - Analyze Query Library: Added
@rocicorp/zero/analyze, for easier CLI-based query analysis. - Shadow Sync:
zero-cachecan now periodically test initial sync in the background, to catch schema drift and full-resync failures earlier. - Client Log Sink: Added a
logSinkparam toZeroconstructor for redirecting Zero client logs. - Cloud Zero Ad 🙃: Added a small notice about Cloud Zero in the
zero-cache-devstartup output. Disable withZERO_ENABLE_STARTUP_MESSAGE=0.
Performance
- 7x faster client-side index construction
- 2x faster backfills by switching zero-cache to binary COPY
- Various optimizations to query hydration and updates:
- Avoid full table scans from reordered compound primary keys
Fixes
- Pagination on non-null columns could trigger full scans (thanks @utkarsh-611!)
- Include details in query/mutator validation errors (thanks @tjenkinson!)
- Inspector query analysis wasn't using Zero's planner
- Add query name to hydration spans in otel
- PgBouncer causing
cached plan must not change result typeerror - Transient
litestream restorefailures were incorrectly alerting - Nullable array columns silently converted to
[](thanks @kvnkusch!) - Change-log entries could be incorrectly purged during handoff
- Concurrent, nested, and
CREATE/DROP INDEX CONCURRENTLYDDL were breaking schema replication - Event-trigger upgrade permission errors sometimes swallowed
- Replication slot creation hanging during startup
- Autoreset during startup could deadlock while recreating a replication slot
- Original SQLite transaction failures hidden behind rollback errors
- Columns with complex Postgres backfilled incorrectly
- Latency histograms buckets are too broad
- Inspector parse and analyze errors incorrectly emitting ERROR logs
- Stalled change-streamer transactions could hang progress indefinitely
- OTel metrics from multiple worker processes clobbering each other
- Drain-mode
SIGTERMexited uncleanly during startup
Breaking Changes
None.