-
Notifications
You must be signed in to change notification settings - Fork 10
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
Front-load handling of callback responses from the client. #79
Conversation
Previously, a notification handler that issues a call back to the client could block delivery of the reply for its own callback: The barrier we use to preserve issue order means another batch cannot be issued to the dispatcher until all previously-issued notifications have completed. To prevent the handler from deadlocking itself in this case, filter out response messages from the client when the input is received, rather than enqueuing them with the handlers. This basically just moves the existing logic earlier in the transaction, but it means replies can be delivered even if the barrier is active. Fixes #78.
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 can confirm this fixes the issue and the solution looks good to me.
Previous test cases that were hanging downstream are now passing too and the progress reporting feature (relying on this fix) seems to work as intended!
Thank you for the quick turnaround.
This fix is now releaseed at v0.35.5. |
Previously, a notification handler that issues a call back to the client could
block delivery of the reply for its own callback: The barrier we use to
preserve issue order means another batch cannot be issued to the dispatcher
until all previously-issued notifications have completed.
To prevent the handler from deadlocking itself in this case, filter out
response messages from the client when the input is received, rather than
enqueuing them with the handlers. This basically just moves the existing logic
earlier in the transaction, but it means replies can be delivered even if the
barrier is active.
Add regression test for deadlock bug.
Fixes #78.