You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Attila Doroszlai (Jira)" <ji...@apache.org> on 2023/04/27 18:15:00 UTC

[jira] [Updated] (RATIS-1834) ServerRequestStreamObserver is not properly closed

     [ https://issues.apache.org/jira/browse/RATIS-1834?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Attila Doroszlai updated RATIS-1834:
------------------------------------
    Fix Version/s: 2.5.1

> 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
>            Assignee: Tsz-wo Sze
>            Priority: Major
>             Fix For: 3.0.0, 2.5.1
>
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> 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)