[
https://issues.apache.org/jira/browse/HBASE-23917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17048791#comment-17048791
]
chenxu commented on HBASE-23917:
--------------------------------
Not so easy to reproduce this, occasional happens.
After branch 2.0, NettyRpcServer is enabled by default, and KeyValueCodec has
some refactoring
but how it works with SimpleRpcServer maybe untested
Serializing the KV by PB (not CellBlock) has no problem, so suspected the
problem is KeyValueCodec
> [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)