You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Todd Lipcon (Code Review)" <ge...@cloudera.org> on 2017/03/30 21:03:28 UTC

[kudu-CR](branch-1.3.x) KUDU-1962. Fix NPE when master returns SERVER TOO BUSY

Todd Lipcon has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/6519

Change subject: KUDU-1962. Fix NPE when master returns SERVER_TOO_BUSY
......................................................................

KUDU-1962. Fix NPE when master returns SERVER_TOO_BUSY

If the master's RPC queue overflows, it returns a TOO_BUSY error to the
clients. We were not properly handling this in the case of
ConnectToMaster RPCs.

This adds a new unit test which provokes the behavior by setting a short
queue and injecting latency into tablet location lookups while starting
several threads which make clients and perform lookups. This also fixes
the issue by reverting back to passing the placeholder 'masterTable'
into these RPCs.

Longer term we should avoid this 'masterTable' hack, since the master is
not a table, but given that this causes serious problems, a more
targeted fix is desirable for 1.3.1 and 1.4.0.

Change-Id: Ic4aba2e39f05488da500c18247c72181c8e9dceb
Reviewed-on: http://gerrit.cloudera.org:8080/6516
Reviewed-by: Jean-Daniel Cryans <jd...@apache.org>
Tested-by: Kudu Jenkins
(cherry picked from commit bee8e875e21acb1d36f104f8388fc9ed6c963821)
---
M java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
M java/kudu-client/src/main/java/org/apache/kudu/client/ConnectToCluster.java
M java/kudu-client/src/main/java/org/apache/kudu/client/ConnectToMasterRequest.java
M java/kudu-client/src/main/java/org/apache/kudu/client/KuduClient.java
M java/kudu-client/src/test/java/org/apache/kudu/client/BaseKuduTest.java
M java/kudu-client/src/test/java/org/apache/kudu/client/MiniKuduCluster.java
A java/kudu-client/src/test/java/org/apache/kudu/client/TestHandleTooBusy.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestMasterFailover.java
8 files changed, 160 insertions(+), 36 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/19/6519/1
-- 
To view, visit http://gerrit.cloudera.org:8080/6519
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic4aba2e39f05488da500c18247c72181c8e9dceb
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: branch-1.3.x
Gerrit-Owner: Todd Lipcon <to...@apache.org>

[kudu-CR](branch-1.3.x) KUDU-1962. Fix NPE when master returns SERVER TOO BUSY

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has submitted this change and it was merged.

Change subject: KUDU-1962. Fix NPE when master returns SERVER_TOO_BUSY
......................................................................


KUDU-1962. Fix NPE when master returns SERVER_TOO_BUSY

If the master's RPC queue overflows, it returns a TOO_BUSY error to the
clients. We were not properly handling this in the case of
ConnectToMaster RPCs.

This adds a new unit test which provokes the behavior by setting a short
queue and injecting latency into tablet location lookups while starting
several threads which make clients and perform lookups. This also fixes
the issue by reverting back to passing the placeholder 'masterTable'
into these RPCs.

Longer term we should avoid this 'masterTable' hack, since the master is
not a table, but given that this causes serious problems, a more
targeted fix is desirable for 1.3.1 and 1.4.0.

Change-Id: Ic4aba2e39f05488da500c18247c72181c8e9dceb
Reviewed-on: http://gerrit.cloudera.org:8080/6516
Reviewed-by: Jean-Daniel Cryans <jd...@apache.org>
Tested-by: Kudu Jenkins
(cherry picked from commit bee8e875e21acb1d36f104f8388fc9ed6c963821)
Reviewed-on: http://gerrit.cloudera.org:8080/6519
---
M java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
M java/kudu-client/src/main/java/org/apache/kudu/client/ConnectToCluster.java
M java/kudu-client/src/main/java/org/apache/kudu/client/ConnectToMasterRequest.java
M java/kudu-client/src/main/java/org/apache/kudu/client/KuduClient.java
M java/kudu-client/src/test/java/org/apache/kudu/client/BaseKuduTest.java
M java/kudu-client/src/test/java/org/apache/kudu/client/MiniKuduCluster.java
A java/kudu-client/src/test/java/org/apache/kudu/client/TestHandleTooBusy.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestMasterFailover.java
8 files changed, 160 insertions(+), 36 deletions(-)

Approvals:
  Jean-Daniel Cryans: Looks good to me, approved
  Kudu Jenkins: Verified



-- 
To view, visit http://gerrit.cloudera.org:8080/6519
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic4aba2e39f05488da500c18247c72181c8e9dceb
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: branch-1.3.x
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR](branch-1.3.x) KUDU-1962. Fix NPE when master returns SERVER TOO BUSY

Posted by "Jean-Daniel Cryans (Code Review)" <ge...@cloudera.org>.
Jean-Daniel Cryans has posted comments on this change.

Change subject: KUDU-1962. Fix NPE when master returns SERVER_TOO_BUSY
......................................................................


Patch Set 1: Code-Review+2

-- 
To view, visit http://gerrit.cloudera.org:8080/6519
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic4aba2e39f05488da500c18247c72181c8e9dceb
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: branch-1.3.x
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: No