From 18a1a4bdacc1e428fa21aebf5487ca39ec5f20a6 Mon Sep 17 00:00:00 2001 From: Andrew Purtell Date: Sat, 11 Jun 2022 10:40:40 -0700 Subject: [PATCH] HBASE-27097 SimpleRpcServer is broken (#4521) Apply https://issues.apache.org/jira/secure/attachment/13044874/MultiByteBuff.patch from Lijin Bin on JIRA. Co-authored-by: Lijin Bin Signed-off-by: Lijin Bin Signed-off-by: Viraj Jasani --- .../main/java/org/apache/hadoop/hbase/nio/MultiByteBuff.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/nio/MultiByteBuff.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/nio/MultiByteBuff.java index 003e2305fb97..a3c0b5c528c7 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/nio/MultiByteBuff.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/nio/MultiByteBuff.java @@ -1148,6 +1148,9 @@ private int internalRead(ReadableByteChannel channel, long offset, ChannelReader offset += len; } if (buffer.hasRemaining()) { + // reset + curItem = buffer; + curItemIndex = (curItemIndex - 1); break; } }