Skip to content

Conversation

@Shubham8287
Copy link
Contributor

@Shubham8287 Shubham8287 commented Dec 30, 2025

Description of Changes

Fixes a deadlock in the subscription code and HTTP SQL handler that was caused by calling view methods on the module while holding the transaction lock.

I tried a couple of approaches to make the closures Send for all code paths that need to hold the transaction while working with views, but that didn’t work out well. The V8 module communicates with the host through channels, which would require dynamic dispatch.

In the current approach, all existing methods that were calling views from the host are now invoked from inside the module itself. In future, It will be better to move these methods to common place rather than being scattrered.

@Shubham8287 Shubham8287 changed the title call methgods from module fix view deadlock Dec 30, 2025
Copy link
Contributor

@gefjon gefjon left a comment

Choose a reason for hiding this comment

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

Very preliminary, not a full review, but I have some concerns.

Copy link
Contributor

@gefjon gefjon left a comment

Choose a reason for hiding this comment

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

I feel reasonably OK with this PR. I'd be happier if we had more rigorous testing, and if we had more of the team here, especially @joshua-spacetime . But given the time and the importance of this bugfix, I think it's good to merge.

@Shubham8287 Shubham8287 added this pull request to the merge queue Dec 30, 2025
Merged via the queue into master with commit 10fd8b2 Dec 30, 2025
41 of 42 checks passed
jdetter pushed a commit that referenced this pull request Dec 30, 2025
# Description of Changes
Fixes a deadlock in the subscription code and HTTP SQL handler that was
caused by calling view methods on the module while holding the
transaction lock.

I tried a couple of approaches to make the closures `Send` for all code
paths that need to hold the transaction while working with views, but
that didn’t work out well. The V8 module communicates with the host
through channels, which would require dynamic dispatch.

In the current approach, all existing methods that were calling views
from the host are now invoked from inside the module itself. In future,
It will be better to move these methods to common place rather than
being scattrered.
@Shubham8287 Shubham8287 deleted the shub/fix-deadlock branch January 5, 2026 18:19
github-merge-queue bot pushed a commit that referenced this pull request Jan 6, 2026
# Description of Changes

Exntention of #3938 to
polish some of the code, which was not done in original PR due to hurry.
- Adds some missing commentary.
- code cleaning mostly limited to changed functions signature.

# API and ABI breaking changes

NA

# Expected complexity level and risk
0

# Testing
Exisiting tests should be enough.

---------

Signed-off-by: Shubham Mishra <[email protected]>
Co-authored-by: joshua-spacetime <[email protected]>
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.

3 participants