You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by "610991905 (via GitHub)" <gi...@apache.org> on 2025/05/12 08:45:25 UTC

[D] 意外断电重启后,store/config/timermetrics文件损坏,broker无法启动 [rocketmq]

GitHub user 610991905 created a discussion: 意外断电重启后,store/config/timermetrics文件损坏,broker无法启动

意外断电重启后,store/config/timermetrics文件损坏,导致broker无法启动。这个是bug吗?还是说设计的时候没有考虑过意外断电的情况?
![image](https://github.com/user-attachments/assets/ea36e6a4-e693-49d2-8d57-26e41e007dc6)

另外观察这个文件,发现即使这个`store/config/timermetrics`文件内容没有任何更新,依然会每秒被删除1次,然后重新生成。这个机制背后对应的原因是什么?为什么这么设计呢?
![image](https://github.com/user-attachments/assets/26783ff5-857c-497d-83aa-144bc777724a)


GitHub link: https://github.com/apache/rocketmq/discussions/9400

----
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] 5.2.0版本Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动 [rocketmq]

Posted by "GenerousMan (via GitHub)" <gi...@apache.org>.
GitHub user GenerousMan added a comment to the discussion: 5.2.0版本Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动

The problem should be that the timermetric file was not flushed to disk successfully during the downtime. I can fix this problem later.

GitHub link: https://github.com/apache/rocketmq/discussions/9400#discussioncomment-13115373

----
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] Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动 [rocketmq]

Posted by "610991905 (via GitHub)" <gi...@apache.org>.
GitHub user 610991905 edited a discussion: Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动

单机版本服务器断电重启后,broker启动报store/config/timermetrics文件损坏,导致broker无法启动。这个是bug吗?还是说设计的时候没有考虑过意外断电自恢复的情况?
![image](https://github.com/user-attachments/assets/ea36e6a4-e693-49d2-8d57-26e41e007dc6)

另外观察这个文件,发现即使这个`store/config/timermetrics`文件内容没有任何更新,依然会每秒被删除1次,然后重新生成。这个机制背后对应的原因是什么?为什么这么设计呢?
![image](https://github.com/user-attachments/assets/26783ff5-857c-497d-83aa-144bc777724a)
因为我们是在纯私有化场景使用,期望能够支撑意外断电自恢复,而不是还需要手工重建数据进行恢复。


GitHub link: https://github.com/apache/rocketmq/discussions/9400

----
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] 5.2.0版本Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动 [rocketmq]

Posted by "GenerousMan (via GitHub)" <gi...@apache.org>.
GitHub user GenerousMan added a comment to the discussion: 5.2.0版本Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动

Did you back up the timermetrics file at that time? You can check whether it is indeed an unclosed json file.

GitHub link: https://github.com/apache/rocketmq/discussions/9400#discussioncomment-13115473

----
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] Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动 [rocketmq]

Posted by "610991905 (via GitHub)" <gi...@apache.org>.
GitHub user 610991905 edited a discussion: Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动

单机版本服务器断电重启后,broker启动报store/config/timermetrics文件损坏,导致broker无法启动。这个是bug吗?还是说设计的时候没有考虑过意外断电自恢复的情况?
![image](https://github.com/user-attachments/assets/ea36e6a4-e693-49d2-8d57-26e41e007dc6)

另外观察这个文件,发现即使这个`store/config/timermetrics`文件内容没有任何更新,依然会每秒被删除1次,然后重新生成。这个机制背后对应的原因是什么?为什么这么设计呢?
![image](https://github.com/user-attachments/assets/26783ff5-857c-497d-83aa-144bc777724a)


GitHub link: https://github.com/apache/rocketmq/discussions/9400

----
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] 5.2.0版本Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动 [rocketmq]

Posted by "GenerousMan (via GitHub)" <gi...@apache.org>.
GitHub user GenerousMan added a comment to the discussion: 5.2.0版本Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动

> the disk flushing once per second Increased the probability of problems occurring,is not necessary

I get it. I will try to fix this problem.

GitHub link: https://github.com/apache/rocketmq/discussions/9400#discussioncomment-13125519

----
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] 5.2.0版本Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动 [rocketmq]

Posted by "GenerousMan (via GitHub)" <gi...@apache.org>.
GitHub user GenerousMan deleted a comment on the discussion: 5.2.0版本Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动

The problem should be that the timermetric file was not flushed to disk successfully during the downtime. I can fix this problem later.

GitHub link: https://github.com/apache/rocketmq/discussions/9400#discussioncomment-13115373

----
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] 5.2.0版本Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动 [rocketmq]

Posted by "610991905 (via GitHub)" <gi...@apache.org>.
GitHub user 610991905 edited a discussion: 5.2.0版本Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动

单机版本服务器断电重启后,broker启动报store/config/timermetrics文件损坏,导致broker无法启动。这个是bug吗?还是说设计的时候没有考虑过意外断电自恢复的情况?
![image](https://github.com/user-attachments/assets/ea36e6a4-e693-49d2-8d57-26e41e007dc6)

另外观察这个文件,发现即使这个`store/config/timermetrics`文件内容没有任何更新,依然会每秒被删除1次,然后重新生成。这个机制背后对应的原因是什么?为什么这么设计呢?
![image](https://github.com/user-attachments/assets/26783ff5-857c-497d-83aa-144bc777724a)
因为我们是在纯私有化场景使用,期望能够支撑意外断电自恢复,而不是还需要手工重建数据进行恢复。


GitHub link: https://github.com/apache/rocketmq/discussions/9400

----
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] 5.2.0版本Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动 [rocketmq]

Posted by "GenerousMan (via GitHub)" <gi...@apache.org>.
GitHub user GenerousMan added a comment to the discussion: 5.2.0版本Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动

> the disk flushing once per second Increased the probability of problems occurring,is not necessary

https://github.com/apache/rocketmq/pull/9413/files

GitHub link: https://github.com/apache/rocketmq/discussions/9400#discussioncomment-13165667

----
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] 5.2.0版本Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动 [rocketmq]

Posted by "610991905 (via GitHub)" <gi...@apache.org>.
GitHub user 610991905 added a comment to the discussion: 5.2.0版本Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动

yes,is a bug, i found it。
org.apache.rocketmq.store.timer.TimerMetrics.persist()
![image](https://github.com/user-attachments/assets/ab8d7d40-2630-4ba6-b7fe-4e10b94ce181)
org.apache.rocketmq.common.ConfigManager.loadBak()
![image](https://github.com/user-attachments/assets/824eda59-78b6-4aab-8d70-9c4ba928f02c)

the same promble in org.apache.rocketmq.broker.transaction.TransactionMetrics.persist()



GitHub link: https://github.com/apache/rocketmq/discussions/9400#discussioncomment-13116698

----
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] 5.2.0版本Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动 [rocketmq]

Posted by "GenerousMan (via GitHub)" <gi...@apache.org>.
GitHub user GenerousMan added a comment to the discussion: 5.2.0版本Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动

This problem should be a bug in the parsing process of the timermetric file. I can fix this problem later. As for the disk flushing once per second, it is a simple regular update strategy without any deeper design purpose and meaning.

GitHub link: https://github.com/apache/rocketmq/discussions/9400#discussioncomment-13115404

----
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] 5.2.0版本Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动 [rocketmq]

Posted by "610991905 (via GitHub)" <gi...@apache.org>.
GitHub user 610991905 edited a comment on the discussion: 5.2.0版本Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动

the disk flushing once per second  Increased the probability of problems occurring,is  not  necessary

GitHub link: https://github.com/apache/rocketmq/discussions/9400#discussioncomment-13116834

----
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] 5.2.0版本Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动 [rocketmq]

Posted by "GenerousMan (via GitHub)" <gi...@apache.org>.
GitHub user GenerousMan edited a comment on the discussion: 5.2.0版本Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动

> the disk flushing once per second Increased the probability of problems occurring,is not necessary

https://github.com/apache/rocketmq/pull/9413/files 
The problem may be fixed through this pull request. Before deleting the original file, the bak file should be flushed. 

GitHub link: https://github.com/apache/rocketmq/discussions/9400#discussioncomment-13165667

----
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] 意外断电重启后,store/config/timermetrics文件损坏,broker无法启动 [rocketmq]

Posted by "610991905 (via GitHub)" <gi...@apache.org>.
GitHub user 610991905 edited a discussion: 意外断电重启后,store/config/timermetrics文件损坏,broker无法启动

单机版本服务器断电重启后,broker启动报store/config/timermetrics文件损坏,导致broker无法启动。这个是bug吗?还是说设计的时候没有考虑过意外断电自恢复的情况?
![image](https://github.com/user-attachments/assets/ea36e6a4-e693-49d2-8d57-26e41e007dc6)

另外观察这个文件,发现即使这个`store/config/timermetrics`文件内容没有任何更新,依然会每秒被删除1次,然后重新生成。这个机制背后对应的原因是什么?为什么这么设计呢?
![image](https://github.com/user-attachments/assets/26783ff5-857c-497d-83aa-144bc777724a)


GitHub link: https://github.com/apache/rocketmq/discussions/9400

----
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] 5.2.0版本Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动 [rocketmq]

Posted by "610991905 (via GitHub)" <gi...@apache.org>.
GitHub user 610991905 added a comment to the discussion: 5.2.0版本Broker意外断电重启后,store/config/timermetrics文件损坏,无法启动

the disk flushing once per second  Increased the probability of problems occurring。

GitHub link: https://github.com/apache/rocketmq/discussions/9400#discussioncomment-13116834

----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org