-
Notifications
You must be signed in to change notification settings - Fork 753
Fix grpc eof wrapping #10190
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
base: master
Are you sure you want to change the base?
Fix grpc eof wrapping #10190
Conversation
The bucketHeartbeatServer, tsoServer, and heartbeatServer wrappers were unconditionally wrapping errors with errors.WithStack, masking io.EOF. This change returns io.EOF explicitly to restore correct stream termination handling. Unit tests added in server/grpc_service_test.go.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi @ljluestc. Thanks for your PR. I'm waiting for a tikv member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits. 📝 Please follow instructions in the contributing guide to update your commits with the DCO Full details of the Developer Certificate of Origin can be found at developercertificate.org. The list of commits missing DCO signoff:
DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #10190 +/- ##
==========================================
- Coverage 78.73% 78.66% -0.08%
==========================================
Files 522 521 -1
Lines 70090 70052 -38
==========================================
- Hits 55188 55108 -80
- Misses 10935 11000 +65
+ Partials 3967 3944 -23
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
What problem does this PR solve?
Issue Number: Close #9390
What is changed and how does it work?
Verification
I added 5 new regression test cases in
server/grpc_service_test.goto verify correctio.EOFhandling and state management for each affected server wrapper. These tests mock the stream to returnio.EOFand assert that the wrapper returns it unwrapped and sets the closed state.TestBucketHeartbeatServerRecvEOF: VerifybucketHeartbeatServerRecvbehavior.TestHeartbeatServerSendEOF: VerifyheartbeatServerSendbehavior.TestHeartbeatServerRecvEOF: VerifyheartbeatServerRecvbehavior.TestTsoServerSendEOF: VerifytsoServerSendbehavior.TestTsoServerRecvEOF: VerifytsoServerrecvbehavior.To run the verification tests:
Check List
Tests
Code changes
Side effects
Related changes
Release note