redlsz opened a new issue, #9689: URL: https://github.com/apache/rocketmq/issues/9689
### 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 CentOS 7 ### RocketMQ version 5.2.0 ### JDK Version JDK8 ### Describe the Bug HA in controller mode. During the normal synchronization process, master may encounter an error that current epoch can't be found. > 2025-08-17 19:54:37 ERROR WriteSocketService - Failed to find epochEntry with epoch 13 when build msg header 2025-08-17 19:54:37 ERROR WriteSocketService - Failed to find epochEntry with epoch 13 when build msg header 2025-08-17 19:54:38 ERROR WriteSocketService - Failed to find epochEntry with epoch 13 when build msg header ### Steps to Reproduce When a new epoch is generated but the master node does not change. > 2025-08-13 15:53:52 INFO ReplicasManager_ScheduledService_1 - Change ha to master success, last role is master, newMasterEpoch:17, startOffset:15258840904 In this case, the current transfer epoch is not rolled over even though the synchronization offset is already in netxt epoch. As time goes by, expired commitlog files are deleted and the corresponding epochs are also deleted. ### What Did You Expect to See? Normal synchronization. ### What Did You See Instead? Synchronization is interrupted and the slave node is removed from the syncStateSet. ### Additional Context _No response_ -- 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: commits-unsubscr...@rocketmq.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org