Adar Dembo has posted comments on this change.

Change subject: [java client] fix ClassCastException: DeferredGroupException 
cannot be cast to ArrayList
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/3020/1/java/kudu-client/src/main/java/org/kududb/client/AsyncKuduClient.java
File java/kudu-client/src/main/java/org/kududb/client/AsyncKuduClient.java:

Line 1492:     // Notice that we do not handle the errback, if there's an 
exception it will come straight out.
> I don't understand this at all, but I also don't understand the async clien
My understanding:

Previously, if closeAllSessions() failed, DisconnectCB.call() would be invoked 
with an exception as its first argument. This yielded a ClassCastException in 
the async client, which tried to cast the exception into an ArrayList.

With this patch, an exception thrown in closeAllSessions() will propagate up 
the stack to whomever invoked the Deferred returned from shutdown(). In this 
way, disconnectCB.call() is never invoked with an exception as its first 
argument.

JD: Doesn't this mean that a failure in closeAllSessions() will cause us to 
skip the disconnection and resource releasing phases of the shutdown? Is that 
safe?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1f3d084fae276c5dbbb46f36c43ad0d337f260a8
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jean-Daniel Cryans
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-HasComments: Yes

Reply via email to