-
Notifications
You must be signed in to change notification settings - Fork 663
fix view deadlock #3938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix view deadlock #3938
Conversation
gefjon
left a comment
There was a problem hiding this 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.
gefjon
left a comment
There was a problem hiding this 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.
# 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.
# 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]>
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
Sendfor 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.