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

GrpcLogAppender stucks while sending an installSnapshot notification request

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.1.1
    • gRPC
    • None

    Description

      In `GrpcLogAppender`, it waits for signal at the end of `notifyInstallSnapshot` as following.
      https://github.com/apache/ratis/blob/master/ratis-grpc/src/main/java/org/apache/ratis/grpc/server/GrpcLogAppender.java#L825-L831
      However, checking whether the `InstallSnapshotResponseHandler` is done and the call `AwaitForSignal.await()` are not atomic. This creates a potential race condition where InstallSnapshotResponseHandler.close() could finish after the check but before the wait, causing that `GrpcLogAppender` is still waiting even though `InstallSnapshotResponseHandler` has already completed, leading to timeout. 

      Attachments

        Issue Links

          Activity

            People

              wfps1210 Chung En Lee
              wfps1210 Chung En Lee
              Votes:
              0 Vote for this issue
              Watchers:
              2 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
                  1h