Repository navigation
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.1hubs fall back lazily to legacy object-storageydoc/head/<path>objects on read, but write only toydoc_heads. Av0.20.0process misses updates written onv0.20.1and falls back to older heads orydoc/<sha>history. - Negative
epochtombstones (data_projects): dropped projects now write negativeepochtombstones thatv0.20.0hubs do not filter (epoch >= 0), risking stale writes if mixed or rolled back. - SQL background leases (
op_leases):RunDirtyDataPass,ArchiveBatch, andReconcileDataDirtyLeasedcoordinate throughop_leasesinstead of Postgres advisory locks, so mixedv0.20.0/v0.20.1hubs do not mutually exclude each other. - Comment catch-up (
project_seq.comment_rev):v0.20.0pods do not advancecomment_rev, so mixed-fleet SSE?cursor=1reconnects can miss comments written byv0.20.0pods.
Operational notes:
-
One-time Postgres migration lock: the first
v0.20.1startup runs a one-time transaction addingproject_seq.max_lamport, installing triggertrg_jops_max_lamportonjournal_ops, and backfilling existing rows (ACCESS EXCLUSIVEonproject_seq,SHARE ROW EXCLUSIVEonjournal_ops). Subsequent restarts are lock-free, and new partial indexes (idx_pfiles_live_fold,idx_pfiles_live_empty) buildCONCURRENTLY. -
Object storage lifecycle on
hub-cache/: self-hosted hubs serving large (>= 8 MiB) legacy journals now write derived.jsonl.gzcaches under bucket-roothub-cache/<project>/journal/...; add a bucket lifecycle expiration rule targetinghub-cache/. -
2 MiB Markdown render limit:
GET /api/p/<id>/render(live and?sha=) returns HTTP413JSON for.mdfiles over 2 MiB, and/s/<token>share pages show a?download=1link instead of buffering unbounded files; raw/fileand/blobdownloads remain uncapped. -
Hub SQL performance and lock-convoy elimination. Fixes the S2 receipt
503loop on/file//render//downloadvia linearizable primary SQL lookups, replaces hotpath full-snapshot reloads with synchronous incrementalDataIndexupdates, addsop_leasescoordination andproject_seq.max_lamporttrigger + partialCONCURRENTLYindexes (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-GETGetVersioned/VersionedPutter, moves co-editing heads into SQLydoc_heads, adds optionalbdrive:collab:flush:Redis RPC,?render=1inline edit responses, and?text=1inline restore responses, caches large legacy journal exports under bucket-roothub-cache/<project>/journal/capped at 100 MiB JSONL boundaries, and honors link-local proxy hops (169.254.0.0/16,fe80::/10) plusCLIAuth.UseClientIP. (#378, #382, #383, #386, #390) -
SSE reconnect catch-up, stream eviction, and client
409backoff. AddsLast-Event-ID/?last_event_id=/?cursor=1step-by-step SSE catch-up, evicts oldest streams past16per actor per project, setsstreamMaxAgeto45m ± 5mwithETag/304on/bloband/render?sha=, aborts gzip trailers cleanly on mid-stream errors, caches daemon/scopewhile SSE is open, and keeps daemons pulling withRetry-Afterpush backoff (and non-zerobdrive syncexit) on409 Conflict. (#385, #386) -
Render cap, frontend polish, and maintenance. Caps Markdown rendering at 2 MiB (
413JSON on/renderand/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)