Hello there,

Thanks for posting this. We _should_ make sure that the behavior here is 
such that Write returns ok=false if the server side has sent status (even 
if the client-side hasn't yet received that status).  Although we've 
currently said that an ok=true on Write just means that the Write has made 
it into the flow-control buffers, this is a clear case where the 
flow-control buffer will never get meaningfully emptied, so it's as though 
it didn't actually pass flow control. Can I suggest that you file a github 
issue about your problem, preferably along with any code that would be 
needed to help us repro/test/track/triage it?

Thanks!

-vjpai

PS: That said, I think there should be strong caveats when using 
client-side streaming. Even if we change the behavior as I described, 
there's still no protocol-level way of knowing how many of the client-side 
write operations were actually read by the server. The service should 
generally define its response proto in such a way as to provide that 
information back to the client at the application-level.

On Friday, March 23, 2018 at 8:47:04 AM UTC-7, Norman Link wrote:
>
> Hello,
>
> I have a client to server stream defined as
>
> rpc ClientStream(stream Request) returns (Response);
>
> Both server and client are implemented in C++. The client sends a number 
> of requests to the server, which may then close the stream based on some 
> condition. When doing so, the server calls Finish() on ServerAsyncReader 
> and sends the result.
>
> However, this result is never received on the client, since 
> ClientAsyncReader provides no interface or callback to determine that the 
> server closed the stream. Also, the completion queue does not return ok = 
> false on the Write() operation. So in this case, my client just keeps on 
> sending data to the server, although nobody is listening anymore.
>
> What is the suggested way to detect server-side stream termination?
>
> Best regards,
> Norman Link
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/47a23273-5ad1-4415-a026-d2e0b152f6fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to