fix(storage): drain trailing EOS in gRPC Reader.Read so otelgrpc span…#14530
fix(storage): drain trailing EOS in gRPC Reader.Read so otelgrpc span…#14530yaruno wants to merge 2 commits intogoogleapis:mainfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request updates the Read method in storage/grpc_reader.go to drain the gRPC stream when all bytes have been received, ensuring that the stream finalizes naturally and OpenTelemetry spans are not incorrectly marked as cancelled. It also adds a comprehensive set of unit tests to verify the drain logic, error handling, and idempotency. Feedback was provided to improve the robustness of the stream draining by using a loop and considering context.WithoutCancel for the cleanup process.
8f6f8ff to
03fae7e
Compare
closes #14470