Skip to content

Trigger view refresh when a V8 procedure commits a transaction#4302

Merged
joshua-spacetime merged 3 commits intomasterfrom
joshua/procedures-dont-trigger-views-ts
Feb 17, 2026
Merged

Trigger view refresh when a V8 procedure commits a transaction#4302
joshua-spacetime merged 3 commits intomasterfrom
joshua/procedures-dont-trigger-views-ts

Conversation

@joshua-spacetime
Copy link
Collaborator

@joshua-spacetime joshua-spacetime commented Feb 16, 2026

Description of Changes

This PR fixes the bug where V8 procedures could commit a transaction without refreshing affected materialized views, which caused view-backed subscriptions to miss updates from procedure writes.

API and ABI breaking changes

None

Expected complexity level and risk

3

Almost the exact same change as #4301. The main difference between the V8 change and the WASM change is that for V8 we persist the hook functions (__call_view__, __call_view_anon__, etc.) and the hook receiver (recv / this) into V8 context embedder slots, and reconstruct them later from syscall scope.

Testing

  • Added a regression test in the form of a typescript smoketest that subscribes to a view and calls a procedure

@joshua-spacetime joshua-spacetime linked an issue Feb 16, 2026 that may be closed by this pull request
@joshua-spacetime joshua-spacetime added bugfix Fixes something that was expected to work differently release-2.0 labels Feb 16, 2026
Base automatically changed from joshua/procedures-dont-trigger-views to master February 16, 2026 22:52
@joshua-spacetime joshua-spacetime force-pushed the joshua/procedures-dont-trigger-views-ts branch from 4e86b06 to 2add0bb Compare February 16, 2026 22:53
Copy link
Collaborator

@coolreader18 coolreader18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@joshua-spacetime joshua-spacetime added this pull request to the merge queue Feb 17, 2026
Merged via the queue into master with commit 716e18a Feb 17, 2026
31 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixes something that was expected to work differently release-2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Procedures don't trigger view changes

2 participants