Hello Adar Dembo, Alexey Serbin,

I'd like you to do a code review.  Please visit

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

to review the following change.

Change subject: [java client] Remove timeouts when joining in the sync client
......................................................................

[java client] Remove timeouts when joining in the sync client

Folks have often seen the following exception:

CAUSED BY: TimeoutException: Timed out after 1ms when joining

followed by some gibberish about Deferreds. What happens here is that we 
short-circuit
the operation and we return to the user exactly when the timeout they provided 
expire.
This is nice because it means we respect their deadline to the millisecond. But 
it's
not nice because we don't know what's going on with their operation and in many 
cases
we have nothing to interrogate.

This patch removes the timeout when calling Deferred.join() so that the timeout 
instead
comes from the client internals with all the context we need. The two downsides 
are 1)
we will not be able to respect their timeout as closely and 2) if there's a bug 
in the
client then it might join forever. The latter means we expose bugs, so it's not 
that bad.

This patch also changes DeferredGroupException handling to make it more useful.

Change-Id: Iff4c0783e3c338d268ee1e37b000d45517b3880b
---
M java/kudu-client/src/main/java/org/apache/kudu/client/KuduClient.java
M java/kudu-client/src/main/java/org/apache/kudu/client/KuduException.java
M java/kudu-client/src/main/java/org/apache/kudu/client/KuduScanner.java
M java/kudu-client/src/main/java/org/apache/kudu/client/KuduSession.java
4 files changed, 15 insertions(+), 31 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff4c0783e3c338d268ee1e37b000d45517b3880b
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jean-Daniel Cryans <jdcry...@apache.org>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>

Reply via email to