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

   ### 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
   
   5.1.x
   
   ### JDK Version
   
   JDK8
   
   ### Describe the Bug
   
   After enabling the enableSlaveActingMaster switch, if the master node 
crashes and scheduled messages are triggered before the route information is 
updated, the slave may choose the dead master node for send. Combined with the 
four retry mechanism, this can easily lead to message loss. 
   for example:
   
![image](https://github.com/apache/rocketmq/assets/51144340/2b9a52f0-cd35-4444-bd3b-0136aa4027d6)
   code:
   
![image](https://github.com/apache/rocketmq/assets/51144340/aceb5f27-52e1-4506-b0d6-d6c22dc92323)
   
   ### Steps to Reproduce
   
   To increase the probability of reproducing the issue, it's necessary to 
increase the value of loadBalancePollNameServerInterval.
   1.Set up a cluster with 3 masters and 3 slaves, and enable the 
enableSlaveActingMaster feature.
   2.Send 100 scheduled messages to the cluster with message time range between 
1 to 3 minutes.
   3.Start consumption, and during the consumption process, shut down one of 
the master nodes.
   By comparing the sent messages with the consumed messages, you may encounter 
message loss and Broker errors.
   
   ### What Did You Expect to See?
   
   choosing the correct master node ensures that scheduled messages are not 
lost.
   
   ### What Did You See Instead?
   
   exclude the master that are down.
   
   ### 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

Reply via email to