grpc / grpc-java

The Java gRPC implementation. HTTP/2 based RPC
https://grpc.io/docs/languages/java/
Apache License 2.0
11.48k stars 3.85k forks source link

async server: need to ignore unary response msg if status is not OK #5969

Open ejona86 opened 5 years ago

ejona86 commented 5 years ago

The expectation for unary responses is that the server will respond with an message or an error. If the server responds with a message and an error, the message should be thrown away. The async API currently would send the message. For unary responses, we should delay sending the response until the onComplete()/onError(). If onError() is called we should not send the message.

https://github.com/grpc/grpc-java/blob/b22017851560197a41015acd90f443f7b9519984/stub/src/main/java/io/grpc/stub/ServerCalls.java#L336-L349

See #5968 and grpc/grpc#12824

Alam-Saran commented 2 months ago

I working on this issue and analysis is progress.

Alam-Saran commented 2 months ago

@kannanjgithub I started my initial investigation to this defect and found there is no steps how to reproduce it at my local,Can you please suggest me the reprodicing steps of this defect.