yx9o commented on code in PR #11380:
URL: https://github.com/apache/rocketmq/pull/11380#discussion_r4524166138
##########
tieredstore/src/main/java/org/apache/rocketmq/tieredstore/core/MessageStoreDispatcherImpl.java:
##########
@@ -325,6 +340,11 @@ public CompletableFuture<Boolean>
doScheduleDispatch(FlatFileInterface flatFile,
}
}
);
+ } else if (!appendingBufferList.isEmpty()) {
+ // Nothing was appended to the consume queue (e.g.
appendCommitLog succeeded
+ // but the first appendConsumeQueue failed), so no commit or
index build will
+ // ever take this context: release the fetched message buffers
here.
+ groupCommitContext.release();
Review Comment:
Could we keep the buffer hold until the successful commitlog append is
either committed or rolled back? When the first CQ append fails,
FileSegment.append() has already retained the original ByteBuffer for a later
commit, so releasing the mapped-file reference here lets commitlog cleanup
unmap memory that the pending upload still reads.
--
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]