Skip to content

Release v2.16.3

Latest

Choose a tag to compare

@rekhoff rekhoff released this 24 Nov 20:37
· 6 commits to master since this release
d0413bd

Improvements

TypeScript SDK: much lower client cache memory use

The client cache previously built every index of every subscribed table eagerly, which could use several times more heap than the rows themselves and run memory-constrained Node processes out of memory at startup. Indexes are now built on their first lookup, index nodes allocate child maps only when needed, and unique single-column indexes use a flat map. In one measured client (about 197k rows across 25 tables and 100 indexes), cache heap after the initial subscription dropped from 324 MB to 85 MB, and the initial fill went from roughly 1 to 1.5 seconds to under 250 ms.

find and filter keep their signatures and results. The first lookup on a given index pays a one-time build cost.

(#6614)

Out-of-energy reducer aborts now appear in database logs

When a reducer is aborted for exceeding its CPU budget, the reason was previously only visible in host logs. The error is now written to the database logs, where module developers can see it.

(#6612)

Bug Fixes

Rust SDK: on_disconnect now fires when a call is queued after disconnecting

Calling a reducer or procedure right after disconnect(), or losing the WebSocket sender unexpectedly, previously ended the connection silently without invoking on_disconnect callbacks. In the sender-loss case, the SDK could also panic and poison its internal send-channel lock. The SDK now routes these cases through normal connection teardown, so on_disconnect is reliably called and no panic occurs.

(#6329)

Fixed snapshot verification failing on freed page slots

Verifying a snapshot that contained a freed page slot failed the object lookup against the previous snapshot, which prevented snapshot archival from advancing. Freed slots are now skipped during verification.

(#6659)

Fixed databases failing to load when over the memory budget

Databases whose resident memory footprint exceeded the configured limit could fail to finish loading. The memory budget is now suspended through snapshot restoration, replay, and index rebuilding, then re-enforced afterward. Databases that remain over budget still reject new ordinary allocations.

(#6658)

Build against OpenSSL 4

Updated the openssl crate so SpacetimeDB builds from source on systems that ship OpenSSL 4.

(#6583)

What's Changed

  • Fixed the Rust SDK skipping on_disconnect when a mutation is queued after disconnect in #6329
  • Fixed snapshot verification failing on freed page slots, which blocked snapshot archival, in #6659
  • Fixed databases failing to load when over the configured memory budget in #6658
  • Bumped the openssl crate to support OpenSSL 4 in #6583
  • Built TypeScript SDK cache indexes on first lookup with a flat map for unique single-column indexes in #6614
  • Added the out-of-energy error to database logs in #6612
  • Fixed the Stripe, PostHog and Auth packages emitting incompatible types on TypeScript SDK 2.12 in #6681

Full public changelog: v2.16.1...v2.16.3