mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-10 17:49:49 -04:00
919908fb70
# Description of Changes This PR fixes the bug where WASM procedures could commit a transaction without refreshing affected materialized views, which caused view-backed subscriptions to miss updates from procedure writes. The equivalent changes for V8 will be made in a separate patch. # API and ABI breaking changes None # Expected complexity level and risk 3 This was not a simple translation of the reducer code path, because reducers are run in a single transaction whereas procedures can have multiple transactions via `with_tx` and views must be refreshed with each transaction instead of once at the end of the procedure. This required refresh to be inserted into the syscall itself which required some extra plumbing. Mainly that we had to attach the validated `ModuleDef` to the `WasmInstanceEnv`. This should not affect hotswapping because we instantiate an entirely new `WasmInstanceEnv` in that case. # Testing - [x] Added a regression test in the form of a smoketest that subscribes to a view and calls a procedure
⚠️ Internal Crate ⚠️
This crate is intended for internal use only. It is not stable and may change without notice.