[
https://issues.apache.org/jira/browse/HBASE-6313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405701#comment-13405701
]
binlijin commented on HBASE-6313:
---------------------------------
Call call = calls.remove(id); // first remove from the calls
// Read the flag byte
byte flag = in.readByte();
boolean isError = ResponseFlag.isError(flag);
if (ResponseFlag.isLength(flag)) {
// Currently length if present is unused.
in.readInt();
}
int state = in.readInt(); // Read the state. Currently unused.
if (isError) {
if (call != null) {
//noinspection ThrowableInstanceNeverThrown
call.setException(new RemoteException(WritableUtils.readString(in),
WritableUtils.readString(in)));
// if some error happens in WritableUtils.readString(in), the client that wait
for the call will not be notifed. because the call has been removed from the
calls and call.callComplete() will not be called.
}
} else {
Writable value = ReflectionUtils.newInstance(valueClass, conf);
value.readFields(in); // read value
// it's possible that this call may have been cleaned up due to a RPC
// timeout, so check if it still exists before setting the value.
if (call != null) {
call.setValue(value);
}
}
> Client hangs because the client is not notified
> ------------------------------------------------
>
> Key: HBASE-6313
> URL: https://issues.apache.org/jira/browse/HBASE-6313
> Project: HBase
> Issue Type: Bug
> Affects Versions: 0.94.0
> Reporter: binlijin
> Fix For: 0.94.1
>
> Attachments: HBASE-6313-0.94.patch
>
>
> If the call first remove from the calls, when some exception happened in
> reading from the DataInputStream, the call will not be notified, cause the
> client hangs.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira