Uploaded image for project: 'Ratis'
  1. Ratis
  2. RATIS-1834

ServerRequestStreamObserver is not properly closed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.5.0
    • 3.0.0, 2.5.1
    • gRPC, snapshot
    • None

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              szetszwo Tsz-wo Sze
              William Song Song Ziyang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m