-
Notifications
You must be signed in to change notification settings - Fork 842
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 workerthread hang due to grpc client cancel connection #1854
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1854 +/- ##
=======================================
Coverage 45.23% 45.23%
=======================================
Files 64 64
Lines 2602 2602
Branches 60 60
=======================================
Hits 1177 1177
Misses 1425 1425 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Hi! just to understand the fix: will worker still restart(correctly without hanging), or catch the exception and worker can alive ? Asking because in high-throughput production use case, cancellation can be often, and frequent worker restart might result in frequent 'no worker error'. |
@hgong-snap This fixing does not throw exception (only log warning "grpc client call already cancelled") so the worker is still alive and is able to process the incoming new request). The behind the philosophy is the worker is independent on front grpc handler(ie. client interruption). |
Can someone review it as it is resolving a blocking issue @maaquib , @msaroufim |
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.
Stamping because this is urgent but wondering out loud if we should integrate a test case with an interrupt
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.
LGTM. Wondering if we should refactor this to a method in grpc utils to avoid code duplication
Description
Please read our CONTRIBUTING.md prior to creating your first pull request.
Please include a summary of the feature or issue being fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
GPRC service throw exception when it is trying to send response if GRPC client was already disconnected. This exception trigger workerthread is trying to shutdown. However, the shutdown is blocked due to GRPC server call lock.
Fixes #(issue)
#1815
Type of change
Please delete options that are not relevant.
Feature/Issue validation/testing
Please describe the Unit or Integration tests that you ran to verify your changes and relevant result summary. Provide instructions so it can be reproduced.
Please also list any relevant details for your test configuration.
Follow the reproduce steps.
Result: workerthread 9000 keep alive
ts_log.log.zip
Logs for Test B
Checklist: