Skip to content

v0.20.1

Latest

Choose a tag to compare

@isac322 isac322 released this 04 Dec 12:02
· 1 commit to main since this release
v0.20.1
a7ab341

Upgrade every hub process that shares a Postgres database and object storage root together; avoid rolling back to v0.20.0. v0.18.x–v0.20.0 clients keep syncing cleanly over the wire, and updating bdrive devices is recommended for 409 push-conflict backoff and cached /scope reads. Do not run v0.20.0 and v0.20.1 hub processes side by side:

  • Co-editing heads move to SQL (ydoc_heads): v0.20.1 hubs fall back lazily to legacy object-storage ydoc/head/<path> objects on read, but write only to ydoc_heads. A v0.20.0 process misses updates written on v0.20.1 and falls back to older heads or ydoc/<sha> history.
  • Negative epoch tombstones (data_projects): dropped projects now write negative epoch tombstones that v0.20.0 hubs do not filter (epoch >= 0), risking stale writes if mixed or rolled back.
  • SQL background leases (op_leases): RunDirtyDataPass, ArchiveBatch, and ReconcileDataDirtyLeased coordinate through op_leases instead of Postgres advisory locks, so mixed v0.20.0 / v0.20.1 hubs do not mutually exclude each other.
  • Comment catch-up (project_seq.comment_rev): v0.20.0 pods do not advance comment_rev, so mixed-fleet SSE ?cursor=1 reconnects can miss comments written by v0.20.0 pods.

Operational notes:

  • One-time Postgres migration lock: the first v0.20.1 startup runs a one-time transaction adding project_seq.max_lamport, installing trigger trg_jops_max_lamport on journal_ops, and backfilling existing rows (ACCESS EXCLUSIVE on project_seq, SHARE ROW EXCLUSIVE on journal_ops). Subsequent restarts are lock-free, and new partial indexes (idx_pfiles_live_fold, idx_pfiles_live_empty) build CONCURRENTLY.

  • Object storage lifecycle on hub-cache/: self-hosted hubs serving large (>= 8 MiB) legacy journals now write derived .jsonl.gz caches under bucket-root hub-cache/<project>/journal/...; add a bucket lifecycle expiration rule targeting hub-cache/.

  • 2 MiB Markdown render limit: GET /api/p/<id>/render (live and ?sha=) returns HTTP 413 JSON for .md files over 2 MiB, and /s/<token> share pages show a ?download=1 link instead of buffering unbounded files; raw /file and /blob downloads remain uncapped.

  • Hub SQL performance and lock-convoy elimination. Fixes the S2 receipt 503 loop on /file//render//download via linearizable primary SQL lookups, replaces hotpath full-snapshot reloads with synchronous incremental DataIndex updates, adds op_leases coordination and project_seq.max_lamport trigger + partial CONCURRENTLY indexes (idx_pfiles_live_fold, idx_pfiles_live_empty), batches comment follow queries, and eliminates MetaStore/SSE DB storms. (#378, #379, #381, #382, #383, #384, #385, #386)

  • Storage round-trips, Redis collab RPC, and derived hub-cache/ prefix. Cuts cold reads with 1-GET GetVersioned/VersionedPutter, moves co-editing heads into SQL ydoc_heads, adds optional bdrive:collab:flush: Redis RPC, ?render=1 inline edit responses, and ?text=1 inline restore responses, caches large legacy journal exports under bucket-root hub-cache/<project>/journal/ capped at 100 MiB JSONL boundaries, and honors link-local proxy hops (169.254.0.0/16, fe80::/10) plus CLIAuth.UseClientIP. (#378, #382, #383, #386, #390)

  • SSE reconnect catch-up, stream eviction, and client 409 backoff. Adds Last-Event-ID / ?last_event_id= / ?cursor=1 step-by-step SSE catch-up, evicts oldest streams past 16 per actor per project, sets streamMaxAge to 45m ± 5m with ETag/304 on /blob and /render?sha=, aborts gzip trailers cleanly on mid-stream errors, caches daemon /scope while SSE is open, and keeps daemons pulling with Retry-After push backoff (and non-zero bdrive sync exit) on 409 Conflict. (#385, #386)

  • Render cap, frontend polish, and maintenance. Caps Markdown rendering at 2 MiB (413 JSON on /render and /render?sha=, with accurate blob size reporting on historical ?sha=), fixes dark-mode print ink CSS cascades, and resolves daemon test kqueue/pidfile timing flakes. (#380, #385, #389, #391)