apache / apache/rocketmq

[Bug] dledger模式下,历史消息文件无法删除

Open
#9,854 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
22.6k
Forks
12k
Avg merge
2d 20h
Merged PRs (30d)
26

Description

### Before Creating the Bug Report

- [x] I found a bug, not just asking a question, which should be created in [GitHub Discussions](https://github.com/apache/rocketmq/discussions).

- [x] I have searched the [GitHub Issues](https://github.com/apache/rocketmq/issues) and [GitHub Discussions](https://github.com/apache/rocketmq/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

linux rocky

### RocketMQ version

rocketmq5.3.1

### JDK Version

zulu jdk21

### Describe the Bug

我使用dLeger模式,部署rocketmq集群。如下为其中一个broker节点的配置文件。
brokerClusterName = RaftCluster
brokerName=RaftNode00
listenPort=30931
namesrvAddr=172.16.4.132:9876
storePathRootDir=/data/rmqstore/node02
storePathCommitLog=/data/rmqstore/node02/commitlog
enableDLegerCommitLog=true
dLegerGroup=RaftNode00
dLegerPeers=n0-172.16.4.131:40911;n1-172.16.4.138:40912;n2-172.16.4.134:40913
## must be unique
dLegerSelfId=n2
sendMessageThreadPoolNums=4
deleteWhen=04
fileReservedTime=168

### Steps to Reproduce

查看store.log有如下日志,/data/rmqstore/node02/dledger-n2 目录下面的文件越占越多。历史的消息文件没有删除
2025-11-11 03:43:57 ERROR StoreScheduledThread1 - Error when measuring disk space usage, file doesn't exist on this path: /data/rmqstore/node02/commitlog
2025-11-11 03:43:57 INFO StoreScheduledThread1 - commitLog disk maybe full soon, so reclaim space, -1.0
2025-11-11 03:43:57 INFO StoreScheduledThread1 - begin to delete before 72 hours file. isTimeUp: false isUsageExceedsThreshold: true manualDeleteFileSeveralTimes: 0 cleanAtOnce: false deleteFileBatchMax: 10
2025-11-11 03:43:57 WARN StoreScheduledThread1 - disk space will be full soon, but delete file failed.

### What Did You Expect to See?

消息文件会正常删除

### What Did You See Instead?

disk space will be full soon, but delete file failed.

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.