1782935682 opened a new issue, #11585:
URL: https://github.com/apache/rocketmq/issues/11585

   ### 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
   
   centos7
   
   ### RocketMQ version
   
   5.3.3
   
   ### JDK Version
   
   1.8
   
   ### Describe the Bug
   
   In Controller mode, after the original master restarts, the controller keeps 
the same MasterEpoch, but the master rewrites that epoch's startOffset from 
`1-0` to `1-5802`.
   
   The slave still has `1-0`, so it cannot find a consistent point and 
repeatedly logs `Failed to find a consistent point`. The slave remains 
NotInSyncReplica, while the master continues accepting writes. Effective 
replication silently drops to one replica.
   
   ### Steps to Reproduce
   
   
   1. Start a fresh NameServer at `9876` with an embedded Controller at `9878`.
   2. Start only broker `10911`. It becomes master with epoch `1-0`.
   3. Start broker `10921`. Confirm both brokers are in SyncStateSet and have 
the same commitlog max offset, for example `5802`.
   4. Stop the NameServer with the embedded Controller first, then stop both 
brokers.
   5. Restart the NameServer and start only `10911`. Confirm MasterEpoch 
remains 1 and the epoch checkpoint changes from `1-0` to `1-5802`.
   6. Start `10921`. It remains NotInSyncReplica and repeatedly logs `Failed to 
find a consistent point`.
   7. Send more messages. The master offset continues to grow, while the slave 
offset remains unchanged.
   
   ### What Did You Expect to See?
   
   After the original master restarts, it should either preserve the current 
epoch's original startOffset or receive a new MasterEpoch.
   
   The existing slave should then rejoin SyncStateSet normally, and both 
brokers' commitlog offsets should continue to stay in sync.
   
   ### What Did You See Instead?
   
   The controller kept the same MasterEpoch, but the master changed the epoch 
checkpoint from `1-0` to `1-5802`. The slave still had `1-0` and repeatedly 
logged `Failed to find a consistent point`.
   
   The slave remained NotInSyncReplica, and getSyncStateSet contained only the 
master. The master continued accepting writes while the slave offset remained 
unchanged.
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to