szetszwo commented on a change in pull request #206:
URL: https://github.com/apache/incubator-ratis/pull/206#discussion_r495733484
##########
File path:
ratis-grpc/src/main/java/org/apache/ratis/grpc/server/GrpcLogAppender.java
##########
@@ -86,7 +86,12 @@ private GrpcServerProtocolClient getClient() throws
IOException {
}
private synchronized void resetClient(AppendEntriesRequest request, boolean
onError) {
- rpcService.getProxies().resetProxy(getFollowerId());
+ try {
+ rpcService.getProxies().getProxy(getFollowerId()).resetConnectBackoff();
Review comment:
Use getClient() for rpcService.getProxies().getProxy(getFollowerId()).
##########
File path:
ratis-grpc/src/main/java/org/apache/ratis/grpc/server/GrpcLogAppender.java
##########
@@ -86,7 +86,12 @@ private GrpcServerProtocolClient getClient() throws
IOException {
}
private synchronized void resetClient(AppendEntriesRequest request, boolean
onError) {
- rpcService.getProxies().resetProxy(getFollowerId());
+ try {
+ rpcService.getProxies().getProxy(getFollowerId()).resetConnectBackoff();
+ } catch (IOException ie) {
+ LOG.warn(this + ": Failed to reset channel by " + ie);
Review comment:
Since resetConnectBackoff() won't throw IOException, let's change the
error message to
`
` LOG.warn(this + ": Failed to getClient for " + getFollowerId(), ie);
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]