szetszwo commented on pull request #3195:
URL: https://github.com/apache/ozone/pull/3195#issuecomment-1071035528
```
Caused by: java.lang.IndexOutOfBoundsException: End index: 16842756 >= 6292
at
org.apache.ratis.thirdparty.com.google.protobuf.ByteString.checkRange(ByteString.java:1272)
at
org.apache.ratis.thirdparty.com.google.protobuf.ByteString$LiteralByteString.substring(ByteString.java:1343)
at
org.apache.hadoop.hdds.ratis.ContainerCommandRequestMessage.toProto(ContainerCommandRequestMessage.java:68)
at
org.apache.hadoop.ozone.container.keyvalue.impl.KeyValueStreamDataChannel.readPutBlockRequest(KeyValueStreamDataChannel.java:201)
```
@captainzmc , could you try removing line 201 as below? That line actually
is not need.
```
+++
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/impl/KeyValueStreamDataChannel.java
@@ -187,7 +187,7 @@ static ContainerCommandRequestProto
readPutBlockRequest(ByteBuf b)
final int protoLength = readProtoLength(b.duplicate(), lengthIndex);
final int protoIndex = lengthIndex - protoLength;
final ContainerCommandRequestProto proto = readPutBlockRequest(
- b.duplicate(), protoIndex, lengthIndex);
+ b.duplicate(), protoIndex);
// set index for reading data
b.writerIndex(protoIndex);
@@ -196,9 +196,8 @@ static ContainerCommandRequestProto
readPutBlockRequest(ByteBuf b)
}
private static ContainerCommandRequestProto readPutBlockRequest(
- ByteBuf b, int protoIndex, int lengthIndex) throws IOException {
+ ByteBuf b, int protoIndex) throws IOException {
b.readerIndex(protoIndex);
- b.writerIndex(lengthIndex);
final ByteString byteString = CONVERTER.apply(b.nioBuffer());
final ContainerCommandRequestProto request =
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]