Jean-Daniel Cryans has uploaded a new change for review.

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

Change subject: [java client] Fix a race involving the read timeout
......................................................................

[java client] Fix a race involving the read timeout

The ReadTimeoutHanlder isn't something we really want (per-RPC timer
would be better than socket read timeout), but some handling that was
added a year ago (01698c3) made things worse. Being the author of that other
patch, I think my fix was misguided.

The race this patch fixes is that some RPCs were able send their payload
on the wire even after cleanup() had run, but before `chan` was set to
null, when a ReadTimeoutException was fired. The proper way is to close
the channel first, then start cleaning up, so that concurrent threads who
process RPCs won't think that we're all good because the channel isn't null.

I'm easily able to repro this on a cluster with a 1s read timeout along
with ITBLL.

Change-Id: I486fb4c099a9f110f17b4bc72e48d91f258ee044
---
M java/kudu-client/src/main/java/org/kududb/client/TabletClient.java
1 file changed, 1 insertion(+), 4 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I486fb4c099a9f110f17b4bc72e48d91f258ee044
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jean-Daniel Cryans <jdcry...@apache.org>

Reply via email to