Skip to content

Conversation

@joshua-spacetime
Copy link
Collaborator

@joshua-spacetime joshua-spacetime commented Nov 6, 2025

Description of Changes

This patch:

  1. Materializes views on subscribe by invoking call_view on the ModuleHost.
  2. Downgrades to a read-only transaction after view materialization but before query execution.
  3. Updates the st_view_sub system table on both subscribe and unsubscribe.
  4. Makes subscribe methods on the SubscriptionManager async.

API and ABI breaking changes

None

Expected complexity level and risk

1

Testing

TODO

@joshua-spacetime joshua-spacetime force-pushed the joshua/update-st-view-sub-on-query branch from 0e43a96 to 8168623 Compare November 6, 2025 23:20
@joshua-spacetime joshua-spacetime force-pushed the joshua/update-st-view-sub-on-subscribe branch from 97436d2 to 028782f Compare November 6, 2025 23:28
@joshua-spacetime joshua-spacetime force-pushed the joshua/update-st-view-sub-on-query branch from 8168623 to b0a6942 Compare November 6, 2025 23:38
@joshua-spacetime joshua-spacetime force-pushed the joshua/update-st-view-sub-on-subscribe branch from 028782f to 664577c Compare November 6, 2025 23:41
@joshua-spacetime joshua-spacetime force-pushed the joshua/update-st-view-sub-on-query branch from 3c5530b to eadfc38 Compare November 7, 2025 00:49
Comment on lines 811 to 812
let mut_tx = ScopeGuard::<MutTxId, _>::into_inner(mut_tx);
let (tx, tx_offset) = self.materialize_views_and_downgrade_tx(mut_tx, &queries, auth.caller)?;
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be good to explain why we are doing this in the code.

@joshua-spacetime joshua-spacetime force-pushed the joshua/update-st-view-sub-on-subscribe branch 3 times, most recently from e1d6e16 to f2af6fe Compare November 7, 2025 05:15
@joshua-spacetime joshua-spacetime changed the base branch from joshua/update-st-view-sub-on-query to master November 7, 2025 05:16
@joshua-spacetime joshua-spacetime force-pushed the joshua/update-st-view-sub-on-subscribe branch from f2af6fe to 223dc20 Compare November 7, 2025 05:50
@joshua-spacetime joshua-spacetime force-pushed the joshua/update-st-view-sub-on-subscribe branch from fa7a28c to 3383fd5 Compare November 8, 2025 00:02
@joshua-spacetime joshua-spacetime force-pushed the joshua/update-st-view-sub-on-subscribe branch from 3383fd5 to 2c86ee8 Compare November 8, 2025 00:07
Copy link
Contributor

@Shubham8287 Shubham8287 left a comment

Choose a reason for hiding this comment

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

LGTM,we should also do the code cleanup to remove module_rx field from ModuleSubscription as we decided to not go with that (works in next PR too).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants