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

Should not shutdown and re-create grpc channel/stub in GrpcClientProtocolClient.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • gRPC

    Description

      according to reply from grpc community

      https://github.com/grpc/grpc-java/issues/7449

      https://github.com/grpc/grpc-java/issues/7442

      A channel can be used throughout the lifetime of the application. There shouldn't be a case that the application needs to shut down and recreate it.

      We would like to let StreamObserver.onError() to call ManagedChannel.resetConnectBackoff() as one of the recovery step: for non-backoff state channel, it would be a no-op; for backoff state channel, it will trigger an immediate re-connect to avoid restarted followers from timeout.

       

      We've handled this issue for the ManagedChannel in GrpcServerProtocolClient in RATIS-1072. Just file this Jira to track the same problem in GrpcClientProtocolClient. There should not be any safety issues for GrpcClientProtocolClient, but since 

      The overhead for creating a channel is big.

      remove un-necessary shutdown and re-create grpc channel may improve performance of client operations.

       

      BTW, ozone may suffer the same issue, since it also use ManagedChannel in:

      org.apache.hadoop.ozone.container.replication.GrpcReplicationClient
      org.apache.hadoop.hdds.scm.XceiverClientGrpc
      

      Attachments

        Issue Links

          Activity

            People

              glengeng Glen Geng
              glengeng Glen Geng
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: