[
https://issues.apache.org/jira/browse/HBASE-23917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17048743#comment-17048743
]
Reid Chan commented on HBASE-23917:
-----------------------------------
This code should be quite a long time, from 0.x version.
If as you said, shouldn't be discovered much more earlier, I just doubt.
Please describe how to reproduce.
> [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
> Priority: Major
>
> 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)