[
https://issues.apache.org/jira/browse/RATIS-1076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17752728#comment-17752728
]
Sammi Chen commented on RATIS-1076:
-----------------------------------
Hi [~szetszwo], is this improvement already done in the current version?
> Should not shutdown and re-create grpc channel/stub in
> GrpcClientProtocolClient.
> --------------------------------------------------------------------------------
>
> Key: RATIS-1076
> URL: https://issues.apache.org/jira/browse/RATIS-1076
> Project: Ratis
> Issue Type: Bug
> Reporter: Glen Geng
> Assignee: Glen Geng
> Priority: Major
> Labels: MultiRaft, dense-storage
>
> according to reply from grpc community
> [https://github.com/grpc/grpc-java/issues/7449|https://github.com/apache/incubator-ratis/pull/206]
> [https://github.com/grpc/grpc-java/issues/7442]
> {quote}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.
> {quote}
> {quote}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.
> {quote}
>
> 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
> {quote}The overhead for creating a channel is big.
> {quote}
> 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:
> {code:java}
> org.apache.hadoop.ozone.container.replication.GrpcReplicationClient
> org.apache.hadoop.hdds.scm.XceiverClientGrpc
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)