symious commented on PR #1179:
URL: https://github.com/apache/ratis/pull/1179#issuecomment-2495453447

   Handle close for local stream specifically to resolve the following error.
   ```
   2024-11-22 16:58:34,074 
[a07093ab-6bbb-48c7-ae8d-2c67b5270e69-ChunkWriter-3-0] WARN 
org.apache.ratis.netty.server.DataStreamManagement: Failed to process 
DataStreamRequestByteBuf:clientId=client-C97A2E634E73,type=STREAM_DATA,id=568891,offset=78643200,length=0,timeoutMs=1732265937487
   java.util.concurrent.CompletionException: Failed to close 
org.apache.hadoop.ozone.container.common.transport.server.ratis.LocalStream@78fa8311
           at 
org.apache.ratis.netty.server.DataStreamManagement.close(DataStreamManagement.java:342)
           at 
org.apache.ratis.netty.server.DataStreamManagement.writeTo(DataStreamManagement.java:333)
           at 
org.apache.ratis.netty.server.DataStreamManagement.lambda$writeToAsync$5(DataStreamManagement.java:307)
           at 
java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604)
           at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
           at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
           at java.lang.Thread.run(Thread.java:748)
   Caused by: java.io.IOException: Failed to readPutBlockRequest from 
ReadOnlyByteBuf(ridx: 0, widx: 1048576, cap: 1048576, unwrapped: 
CompositeByteBuf(ridx: 0, widx: 1048576, cap: 1048576, components=17)): 
readerIndex=0, protoIndex=-1111115338, protoLength=1112163910, 
lengthIndex=1048572
           at 
org.apache.hadoop.ozone.container.keyvalue.impl.KeyValueStreamDataChannel.readPutBlockRequest(KeyValueStreamDataChannel.java:273)
           at 
org.apache.hadoop.ozone.container.keyvalue.impl.KeyValueStreamDataChannel.closeBuffers(KeyValueStreamDataChannel.java:236)
           at 
org.apache.hadoop.ozone.container.keyvalue.impl.KeyValueStreamDataChannel.close(KeyValueStreamDataChannel.java:215)
           at 
org.apache.ratis.netty.server.DataStreamManagement.close(DataStreamManagement.java:340)
           ... 6 more
   Caused by: java.lang.IndexOutOfBoundsException: CompositeByteBuf(ridx: 0, 
widx: 1048576, cap: 1048576, components=17).slice(-1111115338, 1112163910)
           at 
org.apache.ratis.thirdparty.io.netty.buffer.AbstractUnpooledSlicedByteBuf.checkSliceOutOfBounds(AbstractUnpooledSlicedByteBuf.java:474)
           at 
org.apache.ratis.thirdparty.io.netty.buffer.AbstractUnpooledSlicedByteBuf.<init>(AbstractUnpooledSlicedByteBuf.java:38)
           at 
org.apache.ratis.thirdparty.io.netty.buffer.UnpooledSlicedByteBuf.<init>(UnpooledSlicedByteBuf.java:24)
           at 
org.apache.ratis.thirdparty.io.netty.buffer.AbstractByteBuf.slice(AbstractByteBuf.java:1221)
           at 
org.apache.ratis.thirdparty.io.netty.buffer.ReadOnlyByteBuf.slice(ReadOnlyByteBuf.java:298)
           at 
org.apache.hadoop.ozone.container.keyvalue.impl.KeyValueStreamDataChannel.readPutBlockRequest(KeyValueStreamDataChannel.java:270)
           ... 9 more
   ```


-- 
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]

Reply via email to