echooymxq opened a new issue, #7219: URL: https://github.com/apache/rocketmq/issues/7219
### 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 ### RocketMQ version develop ### JDK Version openjdk8 ### Describe the Bug https://github.com/apache/rocketmq/blob/cc16a1b51216e1e80c22011b8b01e060bb4af8b3/store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAService.java#L288-L295 1. The newSyncStateSet foreach maybe `ConcurrentModificationException` and cause the checkSyncStateSetTask stop forever. 2. The `connectionCaughtUpTimeTable` always not contain masterBrokerId, it will cause mark synchronizing frequently when shrink syncStateSet. ### Steps to Reproduce Use the latest develop branch code, just run in controller mode. ### What Did You Expect to See? No error happen or No shrink if the syncStateSet no change. ### What Did You See Instead? 1. shrink replication task stoped. ### 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