amaliujia commented on code in PR #11446:
URL: https://github.com/apache/ozone/pull/11446#discussion_r4220758402
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/impl/KeyValueStreamDataChannel.java:
##########
@@ -144,9 +144,11 @@ private void writeBuffers() throws IOException {
final ReferenceCountedObject<ByteBuf> ref = buffers.pollAll();
final ByteBuf buf = ref.retain();
try {
- setEndIndex(buf);
- // write the remaining data
- writeFully(buf.nioBuffer(), super::writeFileChannel);
+ if (buf.isReadable()) {
Review Comment:
<img width="735" height="91" alt="Screenshot 2026-10-08 at 23 12 49"
src="https://github.com/user-attachments/assets/3f43480e-a4c4-427a-80db-3bc06c71d7ec"
/>
The empty ByteBuf is neither writable nor readable so we cannot apply
`setEndIndex` over it.
--
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]