Retries on xds:/// channels (or with RawMessageClientInterceptor) send empty 0-byte payload on retry
I maintainer di solito rispondono entro 1 giorno
@kannanjgithub ci sta già lavorando.
Dal 31/8/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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.
- Lingua principale
- Java
- Stelle
- 12.1k
- Fork
- 4k
- Merge medio
- 2g 7h
- PR unite (30g)
- 29
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di grpc/grpc-java
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
grpc/grpc-java#13063 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
grpc/grpc-java#13052 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Support of `dns:name` URIsApertadocs enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
grpc/grpc-java#10824 · 8 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
grpc/grpc-java#13075 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
question
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
grpc/grpc-java#13066 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di grpc/grpc-java
Issue simili
-
1.0.0-rc2
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
wso2/dpdp-accelerator#377 ·
I maintainer di solito rispondono entro 1 giorno
-
area/dependencies backport/26.4 kind/cve severity/high source/scan-dependencies status/triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 2 giorni
-
(primitive-collections-base) Use `NumberInput` to parse numeric map keys, as `jackson-databind` doesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
FasterXML/jackson-datatypes-collections#270 ·
I maintainer di solito rispondono entro 1 giorno
-
type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno