Song Ziyang created RATIS-1834:
----------------------------------

             Summary: ServerRequestStreamObserver is not properly closed
                 Key: RATIS-1834
                 URL: https://issues.apache.org/jira/browse/RATIS-1834
             Project: Ratis
          Issue Type: Bug
          Components: gRPC, snapshot
    Affects Versions: 2.5.0
            Reporter: Song Ziyang


ServerRequestStreamObserver is not properly closed.

After receiving the COMPLETE flag from the client side, it immediately closes 
the stream and also sends a COMPLETE flag to the client. see [1]. However, the 
server observer may not finish processing requests in onNext, therefore, the 
replies of these unfinished requests are lost.

If the client side waits on receiving all replies[2], this situation will 
become a deadlock.

[1] 
https://github.com/apache/ratis/blob/master/ratis-grpc/src/main/java/org/apache/ratis/grpc/server/GrpcServerProtocolService.java#L143-L147
 
[2] 
https://github.com/apache/ratis/blob/master/ratis-grpc/src/main/java/org/apache/ratis/grpc/server/GrpcLogAppender.java#L624



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to