rocketmq
rocketmq copied to clipboard
[Bug] Tiered storage may cause commitLog undeleted once dispatch was held
Before Creating the Bug Report
-
[X] I found a bug, not just asking a question, which should be created in GitHub Discussions.
-
[X] I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
-
[X] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
Any
RocketMQ version
develop
JDK Version
1.8
Describe the Bug
- The bug was found under dledger mode and it should reproduce under normal commitLog.
- The
MessageDispatcherImpldidn't release therefCountof mapped file (DefaultMappedFileorDefaultMmapFile) correctly when diapatch was held, which may cause the refered commitLog undeleted.
Steps to Reproduce
- Enable tiered store, produce message under low rate which cause
MessageDispatcher#dispatchhold at least once. - When
CleanCommitLogService#deleteExpiredFilesdeleting the held file, the log highlighted below should be shown.
What Did You Expect to See?
The expired commitLog should be deleted correctly.
What Did You See Instead?
Unexpected warn log.
Additional Context
No response