dd-xiaozhi commented on code in PR #11497:
URL: https://github.com/apache/rocketmq/pull/11497#discussion_r4564842739
##########
store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:
##########
@@ -208,7 +209,7 @@ public int deleteExpiredFile(
} else {
disableDeleteDledger();
}
- int count = super.deleteExpiredFile(expiredTime, deleteFilesInterval,
intervalForcibly, cleanImmediately);
+ int count = super.deleteExpiredFile(expiredTime, deleteFilesInterval,
intervalForcibly, cleanImmediately, deleteFileBatchMax);
Review Comment:
Thanks for the review, good catch! Fixed in e663dfa: the method now returns
`1` only when the last legacy file is actually destroyed, and returns `0` when
it is kept (not expired and `cleanImmediately` is false). Added
`MixCommitlogTest#testKeepLastOldCommitlogFileNotExpired` as a regression test.
It asserts `0` and that the file is kept, then asserts `1` and an empty queue
with `cleanImmediately = true`.
--
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]