You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "chenxu (Jira)" <ji...@apache.org> on 2020/03/01 19:36:00 UTC
[jira] [Created] (HBASE-23917) [SimpleRpcServer] Subsequent
requests will have no response in case of request IO mess up
chenxu created HBASE-23917:
------------------------------
Summary: [SimpleRpcServer] Subsequent requests will have no response in case of request IO mess up
Key: HBASE-23917
URL: https://issues.apache.org/jira/browse/HBASE-23917
Project: HBase
Issue Type: Bug
Components: rpc
Affects Versions: master
Reporter: chenxu
Assignee: chenxu
Code in SimpleServerRpcConnection#readAndProcess work like this
{code:java}
public int readAndProcess() throws IOException, InterruptedException {
…
if (data == null) {
…
initByteBuffToReadInto(dataLength);
…
}
count = channelDataRead(channel, data);
if (count >= 0 && data.remaining() == 0) { // count==0 if dataLength == 0
process();
}
return count;
}
{code}
In case of request IO mess up, _data.remaining()_ may be greater than 0, so _process()_ method will not be executed.
There are some cleanup operations in _process()_
{code:java}
private void process() throws IOException, InterruptedException {
data.rewind();
try {
..
} finally {
dataLengthBuffer.clear(); // Clean for the next call
data = null; // For the GC
this.callCleanup = null;
}
}
{code}
If _process()_ not executed, variable _data_ will always not null, and _data.remaining()_ will always be greater than 0, so _process()_ will never be executed again, and subsequent requests will have no response, this has been occured in our product env.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)