Skip to content

v0.6.1

Choose a tag to compare

@github-actions github-actions released this 04 Dec 09:33
4a315c8

Fixes and the 0.6.0 regressions. No breaking changes; 0.6.0 and 0.6.1 clients and servers talk to each other.

Fixes

  • $sync() no longer loops on POST /revalidate after a session claim is removed (for example claim:staff, when the session is re-resolved on a later request). Answers remove tokens the client no longer has; answers to requests sent before a token change are asked again; a pull ends with the session's token changes. A token gain's revalidation names the tokens the client held before it (heldBefore).
  • Setup no longer deadlocks with writes in progress. It locks the synced tables first and retries on deadlock, serialization failure or lock timeout.
  • fromPrisma accepts models.<Model>.relations.<relation>.mayBeUnreadable at runtime.
  • The readability proof accepts narrower memberships (a rule readable by members or admins, where admins are members), so it no longer warns falsely.
  • A child deleted just before its parent moved or was deleted reaches every client that read it through the parent.
  • @clientdb/prisma's BigInt notice goes to stderr.

Performance (one 4-core VM, local Postgres 16)

  • Promote / demote / move-out on a client: 108 / 54 / 14 ms → 51–57 / 20–27 / 3.9–4.9 ms (bench:access; 0.5.0: 52 / 19 / 3.9). Client access evaluation is incremental.
  • One process serves 20,000 WebSockets (p50 5.6–15.4 ms at 300 writes/s; 0.6.0 saturated at 323 ms), with about a third less memory per connection.
  • Polling server CPU at 5,000 / 10,000 clients: 72–76% / 98–102% → 56% / 77%.
  • Postgres CPU per write while the engine drains: 0.35 → 0.21 ms (0.5.0: 0.23); 10,500–10,766 concurrent upserts/s.
  • Serverless throughput with 8 instances: 650 → 920–1,050 pushes/s (0.5.0: 1,184).

Published to npm