Retries on xds:/// channels (or with RawMessageClientInterceptor) send empty 0-byte payload on retry
メンテナーはふだん 1 日以内に返信
@kannanjgithub がすでに取り組んでいます。
2026年8月31日 から。
評価
この issue はまだ評価されていません。
説明
What version of gRPC-Java are you using?
Broken: 1.83.0/1.83.1
Working: 1.82.2
What is your environment?
Azul Zulu JDK 26
Summary
When an RPC is retried on an 'xds:///' channel (or any channel with raw 'InputStream' pass-through marshalling), retry attempts send an empty 0-byte payload (a 5-byte gRPC frame '00 00 00 00 00') rather than replying with the original request payload. If the backend server is configured to also accept an empty protobuf message (e.g. a batch request containing 0 items) and returns 'OK', this results in silent false positives, ie the replayed (now) empty message doesn't throw any error.
RetriableStream replays messages via 'method.streamRequest(message)'. When 'method' uses a raw 'InputStream' pass-through marshaller, the already consumed 'InputStream' is passed to subsequent retry attempts without being re-buffered. Starting on version 1.83.0, 'XdsNameResolver' introduced 'RawMessageClientInterceptor' on every 'xds:///' call. In turn, that rebuilds the method with a pass-through InputStream marshaller. As a result, all retried calls on 'xds:///' channels transmit empty request bodies.
The retry itself comes from Traffic Director over xDS.
What did you expect to see?
On retry, the client should replay the full original payload buffer
user-agent: grpc-java-netty/1.83.0
Attempt 1 (StreamId=3): sends 857 bytes -> server returns grpc-status: 13
Retry 1 (streamId=3 on second connection): sends 857 bytes -> server returns grpc-status: 13
Retry 2 (streamId=5): sends 857 bytes -> server returns grpc-status: 13
Retry 3 (streamId=5): sends 857 bytes -> server returns grpc-status: 13
Retry 4 (streamId=7): sends 857 bytes -> server returns grpc-status: 13
StatusRuntimeException(INTERNAL) -> MyServiceInternalException
What did you see instead?
user-agent: grpc-java-netty/1.83.0
Attempt 1 (StreamId=3): sends 857 bytes -> server returns grpc-status: 13
Retry (streamId=5): sends 5 bytes (0000000000 - empty body) -> server returns grpc-status: 0 (OK) with empty response
Steps to reproduce the bug
- Using grpc-java 1.83.0+, create an xds:// channel (or a channel with XdsNameResolver.RawMessageClientInterceptor) with RetryPolicy configured in serviceConfig
- Issue a unary or batch RPC (with a non-empty payload)
- Have the server return a retryable status (INTERNAL/UNAVAILABLE) on attempt 1
- Attempt 2 will transmit an empty 5-byte frame with 0 payload bytes.
- 主要言語
- Java
- スター
- 12.1k
- フォーク
- 4k
- 平均マージ
- 2日 1時間
- マージ済み PR(30日)
- 31
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
grpc/grpc-java のほかの issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
grpc/grpc-java#13063 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
grpc/grpc-java#13052 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
docs enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
grpc/grpc-java#10824 · コメント 8 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
grpc/grpc-java#13075 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
question
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
grpc/grpc-java#13066 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
go 🏃 testing 🧪
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
valkey-io/valkey-glide#7239 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
github/copilot-sdk#2793 ·
メンテナーはふだん 1 日以内に返信