You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by "kubelsp (via GitHub)" <gi...@apache.org> on 2026/01/06 03:29:37 UTC
[D] rocketmq5.3.0清理CommitLog [rocketmq]
GitHub user kubelsp created a discussion: rocketmq5.3.0清理CommitLog
下面是配置
# 存储路径配置(与docker-compose挂载路径一致)
storePathRootDir=/home/rocketmq/rocketmq-5.3.2/store
storePathCommitLog=/home/rocketmq/rocketmq-5.3.2/store/commitlog
storePathConsumeQueue=/home/rocketmq/rocketmq-5.3.2/store/consumequeue
storePathIndex=/home/rocketmq/rocketmq-5.3.2/store/index
# 磁盘空间配置
diskMaxUsedSpaceRatio=75 # 提高磁盘使用率上限
cleanFileForciblyEnable=true # 强制清理文件
# 消息保留时间(小时)
fileReservedTime=24 # 缩短为24小时
# 其他优化配置
#flushDiskType=ASYNC_FLUSH # 异步刷盘提高性能
deleteWhen=04 # 每天凌晨4点删除过期文件
# 指定 Broker 向外暴露的 IP 地址,使用外网 IP
#brokerIP1=
# 指定 Broker 对内暴露的 IP 地址,使用内网 IP
brokerIP1=10.10.66.159
# 如果需要指定 Broker 端口,可以添加以下配置
# 注意这里的端口要和 docker-compose.yml 中映射的端口一致
listenPort=10911
# 新增外网 IP 配置,供外网访问使用
brokerOuterIP=10.10.66.159
proxyListenPort=8081 # 代理监听端口
proxyOuterAddress=10.10.66.159:8081 # 代理对外暴露的地址
brokerClusterName=DefaultCluster
brokerName=rocketmq-broker-idn-tr
ll
total 227945716
-rw-r--r--. 1 3000 3000 1073741824 Nov 28 14:36 00000000000000000000
-rw-r--r--. 1 3000 3000 1073741824 Nov 28 18:43 00000000001073741824
-rw-r--r--. 1 3000 3000 1073741824 Nov 29 03:53 00000000002147483648
-rw-r--r--. 1 3000 3000 1073741824 Nov 29 10:48 00000000003221225472
-rw-r--r--. 1 3000 3000 1073741824 Nov 29 14:51 00000000004294967296
-rw-r--r--. 1 3000 3000 1073741824 Nov 29 17:21 00000000005368709120
-rw-r--r--. 1 3000 3000 1073741824 Nov 29 21:21 00000000006442450944
-rw-r--r--. 1 3000 3000 1073741824 Nov 30 04:16 00000000007516192768
-rw-r--r--. 1 3000 3000 1073741824 Nov 30 10:35 00000000008589934592
-rw-r--r--. 1 3000 3000 1073741824 Nov 30 14:06 00000000009663676416
-rw-r--r--. 1 3000 3000 1073741824 Nov 30 16:38 00000000010737418240
-rw-r--r--. 1 3000 3000 1073741824 Nov 30 19:33 00000000011811160064
-rw-r--r--. 1 3000 3000 1073741824 Dec 1 00:55 00000000012884901888
-rw-r--r--. 1 3000 3000 1073741824 Dec 1 05:35 00000000013958643712
-rw-r--r--. 1 3000 3000 1073741824 Dec 1 10:32 00000000015032385536
-rw-r--r--. 1 3000 3000 1073741824 Dec 1 13:43 00000000016106127360
-rw-r--r--. 1 3000 3000 1073741824 Dec 1 16:36 00000000017179869184
-rw-r--r--. 1 3000 3000 1073741824 Dec 1 20:50 00000000018253611008
-rw-r--r--. 1 3000 3000 1073741824 Dec 2 03:16 00000000019327352832
-rw-r--r--. 1 3000 3000 1073741824 Dec 2 08:10 00000000020401094656
-rw-r--r--. 1 3000 3000 1073741824 Dec 2 12:24 00000000021474836480
-rw-r--r--. 1 3000 3000 1073741824 Dec 2 15:20 00000000022548578304
-rw-r--r--. 1 3000 3000 1073741824 Dec 2 18:37 00000000023622320128
-rw-r--r--. 1 3000 3000 1073741824 Dec 3 00:17 00000000024696061952
-rw-r--r--. 1 3000 3000 1073741824 Dec 3 06:18 00000000025769803776
-rw-r--r--. 1 3000 3000 1073741824 Dec 3 11:46 00000000026843545600
-rw-r--r--. 1 3000 3000 1073741824 Dec 3 14:43 00000000027917287424
-rw-r--r--. 1 3000 3000 1073741824 Dec 3 17:34 00000000028991029248
-rw-r--r--. 1 3000 3000 1073741824 Dec 3 21:10 00000000030064771072
-rw-r--r--. 1 3000 3000 1073741824 Dec 4 03:40 00000000031138512896
-rw-r--r--. 1 3000 3000 1073741824 Dec 4 08:25 00000000032212254720
-rw-r--r--. 1 3000 3000 1073741824 Dec 4 12:13 00000000033285996544
-rw-r--r--. 1 3000 3000 1073741824 Dec 4 15:08 00000000034359738368
-rw-r--r--. 1 3000 3000 1073741824 Dec 4 17:34 00000000035433480192
-rw-r--r--. 1 3000 3000 1073741824 Dec 4 20:52 00000000036507222016
-rw-r--r--. 1 3000 3000 1073741824 Dec 5 02:42 00000000037580963840
-rw-r--r--. 1 3000 3000 1073741824 Dec 5 07:54 00000000038654705664
-rw-r--r--. 1 3000 3000 1073741824 Dec 5 12:03 00000000039728447488
-rw-r--r--. 1 3000 3000 1073741824 Dec 5 14:58 00000000040802189312
-rw-r--r--. 1 3000 3000 1073741824 Dec 5 17:26 00000000041875931136
-rw-r--r--. 1 3000 3000 1073741824 Dec 5 20:43 00000000042949672960
-rw-r--r--. 1 3000 3000 1073741824 Dec 6 01:59 00000000044023414784
-rw-r--r--. 1 3000 3000 1073741824 Dec 6 07:51 00000000045097156608
-rw-r--r--. 1 3000 3000 1073741824 Dec 6 12:25 00000000046170898432
-rw-r--r--. 1 3000 3000 1073741824 Dec 6 15:13 00000000047244640256
-rw-r--r--. 1 3000 3000 1073741824 Dec 6 17:45 00000000048318382080
-rw-r--r--. 1 3000 3000 1073741824 Dec 6 19:54 00000000049392123904
-rw-r--r--. 1 3000 3000 1073741824 Dec 6 23:14 00000000050465865728
-rw-r--r--. 1 3000 3000 1073741824 Dec 7 03:43 00000000051539607552
-rw-r--r--. 1 3000 3000 1073741824 Dec 7 08:00 00000000052613349376
-rw-r--r--. 1 3000 3000 1073741824 Dec 7 11:51 00000000053687091200
-rw-r--r--. 1 3000 3000 1073741824 Dec 7 14:34 00000000054760833024
没有清理。 这是为啥
GitHub link: https://github.com/apache/rocketmq/discussions/9986
----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org
Re: [D] rocketmq5.3.0清理CommitLog [rocketmq]
Posted by "bxfjb (via GitHub)" <gi...@apache.org>.
GitHub user bxfjb added a comment to the discussion: rocketmq5.3.0清理CommitLog
> 我的磁盘已经83%,我咋样可以手动清理磁盘空间
看下 store.log 是否有 ```unmap file``` ```it's time to reclaim disk space```关键字,上下文找一下相关日志
GitHub link: https://github.com/apache/rocketmq/discussions/9986#discussioncomment-15431885
----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org
Re: [D] rocketmq5.3.0清理CommitLog [rocketmq]
Posted by "kubelsp (via GitHub)" <gi...@apache.org>.
GitHub user kubelsp added a comment to the discussion: rocketmq5.3.0清理CommitLog
我的磁盘已经83%,我咋样可以手动清理磁盘空间
GitHub link: https://github.com/apache/rocketmq/discussions/9986#discussioncomment-15420365
----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org
Re: [D] rocketmq5.3.0清理CommitLog [rocketmq]
Posted by "zhishengzhang (via GitHub)" <gi...@apache.org>.
GitHub user zhishengzhang edited a comment on the discussion: rocketmq5.3.0清理CommitLog
> broker.log 和 store.log 里搜索删除相关的日志分析一下
does it support deleting data at a specific point similar to Kafka?
> /**
* Delete records whose offset is smaller than the given offset of the corresponding partition.
* <p>
* This operation is supported by brokers with version 0.11.0.0 or higher.
*
* @param recordsToDelete The topic partitions and related offsets from which records deletion starts.
* @param options The options to use when deleting records.
* @return The DeleteRecordsResult.
*/
DeleteRecordsResult deleteRecords(Map<TopicPartition, RecordsToDelete> recordsToDelete,
DeleteRecordsOptions options);
GitHub link: https://github.com/apache/rocketmq/discussions/9986#discussioncomment-15624852
----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org
Re: [D] rocketmq5.3.0清理CommitLog [rocketmq]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
GitHub user lizhimins added a comment to the discussion: rocketmq5.3.0清理CommitLog
broker.log 和 store.log 里搜索删除相关的日志分析一下
GitHub link: https://github.com/apache/rocketmq/discussions/9986#discussioncomment-15420420
----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org
Re: [D] rocketmq5.3.0清理CommitLog [rocketmq]
Posted by "zhishengzhang (via GitHub)" <gi...@apache.org>.
GitHub user zhishengzhang added a comment to the discussion: rocketmq5.3.0清理CommitLog
> broker.log 和 store.log 里搜索删除相关的日志分析一下
Does it support deleting data at a specific point?
`
/**
* Delete records whose offset is smaller than the given offset of the corresponding partition.
* <p>
* This operation is supported by brokers with version 0.11.0.0 or higher.
*
* @param recordsToDelete The topic partitions and related offsets from which records deletion starts.
* @param options The options to use when deleting records.
* @return The DeleteRecordsResult.
*/
DeleteRecordsResult deleteRecords(Map<TopicPartition, RecordsToDelete> recordsToDelete,
DeleteRecordsOptions options);
`
GitHub link: https://github.com/apache/rocketmq/discussions/9986#discussioncomment-15624852
----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org
Re: [D] rocketmq5.3.0清理CommitLog [rocketmq]
Posted by "zhishengzhang (via GitHub)" <gi...@apache.org>.
GitHub user zhishengzhang edited a comment on the discussion: rocketmq5.3.0清理CommitLog
> broker.log 和 store.log 里搜索删除相关的日志分析一下
does it support deleting data at a specific point similar to Kafka?
> /**
* Delete records whose offset is smaller than the given offset of the corresponding partition.
* <p>
* This operation is supported by brokers with version 0.11.0.0 or higher.
*
* @param recordsToDelete The topic partitions and related offsets from which records deletion starts.
* @param options The options to use when deleting records.
* @return The DeleteRecordsResult.
*/
DeleteRecordsResult deleteRecords(Map<TopicPartition, RecordsToDelete> recordsToDelete,
DeleteRecordsOptions options);
GitHub link: https://github.com/apache/rocketmq/discussions/9986#discussioncomment-15624852
----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org