This is an automated email from the ASF dual-hosted git repository.

szetszwo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ratis.git


The following commit(s) were added to refs/heads/master by this push:
     new 5bb587b  RATIS-716. RetryCache$CacheEntry$replyFuture holds onto 
RaftClientRequest until eviction.  Contributed by Lokesh Jain.
5bb587b is described below

commit 5bb587b2193848c45049bd6f7e836b699f42f81c
Author: Tsz Wo Nicholas Sze <[email protected]>
AuthorDate: Thu Oct 17 10:57:50 2019 +0800

    RATIS-716. RetryCache$CacheEntry$replyFuture holds onto RaftClientRequest 
until eviction.  Contributed by Lokesh Jain.
---
 .../java/org/apache/ratis/grpc/client/GrpcClientProtocolService.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/ratis-grpc/src/main/java/org/apache/ratis/grpc/client/GrpcClientProtocolService.java
 
b/ratis-grpc/src/main/java/org/apache/ratis/grpc/client/GrpcClientProtocolService.java
index 2345536..68c1b3e 100644
--- 
a/ratis-grpc/src/main/java/org/apache/ratis/grpc/client/GrpcClientProtocolService.java
+++ 
b/ratis-grpc/src/main/java/org/apache/ratis/grpc/client/GrpcClientProtocolService.java
@@ -217,13 +217,14 @@ public class GrpcClientProtocolService extends 
RaftClientProtocolServiceImplBase
 
     CompletableFuture<Void> processClientRequest(RaftClientRequest request, 
Consumer<RaftClientReply> replyHandler) {
       try {
+        String errMsg = LOG.isDebugEnabled() ? "processClientRequest for " + 
request.toString() : "";
         return protocol.submitClientRequestAsync(request
         ).thenAcceptAsync(replyHandler
         ).exceptionally(exception -> {
           // TODO: the exception may be from either raft or state machine.
           // Currently we skip all the following responses when getting an
           // exception from the state machine.
-          responseError(exception, () -> "processClientRequest for " + 
request);
+          responseError(exception, () -> errMsg);
           return null;
         });
       } catch (IOException e) {

Reply via email to