You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by to...@apache.org on 2016/06/28 19:29:55 UTC

[3/4] incubator-kudu git commit: KUDU-1496. NoLeaderMasterFoundException are mishandled

KUDU-1496. NoLeaderMasterFoundException are mishandled

This is a regression from 0c8f72b4c5d637dba4c0c0da4f55ea918c287d88.

Once we have multi-master unit tests re-enabled, we'll have this
covered.

Change-Id: Ie33410bdcfcc1bf9d3afb559a01f50538d7e10b5
Reviewed-on: http://gerrit.cloudera.org:8080/3516
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Reviewed-by: Dan Burkert <da...@cloudera.com>
Tested-by: Jean-Daniel Cryans <jd...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/bb16e36a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/bb16e36a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/bb16e36a

Branch: refs/heads/master
Commit: bb16e36af6d792f84df1932c18fc3a3855917a88
Parents: cef102d
Author: Jean-Daniel Cryans <jd...@apache.org>
Authored: Mon Jun 27 16:10:46 2016 -0700
Committer: Jean-Daniel Cryans <jd...@apache.org>
Committed: Mon Jun 27 23:44:29 2016 +0000

----------------------------------------------------------------------
 .../src/main/java/org/kududb/client/AsyncKuduClient.java | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/bb16e36a/java/kudu-client/src/main/java/org/kududb/client/AsyncKuduClient.java
----------------------------------------------------------------------
diff --git a/java/kudu-client/src/main/java/org/kududb/client/AsyncKuduClient.java b/java/kudu-client/src/main/java/org/kududb/client/AsyncKuduClient.java
index e5f23a4..de95f08 100644
--- a/java/kudu-client/src/main/java/org/kududb/client/AsyncKuduClient.java
+++ b/java/kudu-client/src/main/java/org/kududb/client/AsyncKuduClient.java
@@ -809,13 +809,14 @@ public class AsyncKuduClient implements AutoCloseable {
         // TODO: Handle the situation when multiple in-flight RPCs are queued waiting
         // for the leader master to be determine (either after a failure or at initialization
         // time). This could re-use some of the existing piping in place for non-master tablets.
+        Deferred<R> d = request.getDeferred();
         delayedSendRpcToTablet(request, (NoLeaderMasterFoundException) arg);
-      } else {
-        if (LOG.isDebugEnabled()) {
-          LOG.debug(String.format("Notify RPC %s after lookup exception", request), arg);
-        }
-        request.errback(arg);
+        return d;
+      }
+      if (LOG.isDebugEnabled()) {
+        LOG.debug(String.format("Notify RPC %s after lookup exception", request), arg);
       }
+      request.errback(arg);
       return Deferred.fromError(arg);
     }