Willhow-Gao opened a new issue, #8380:
URL: https://github.com/apache/rocketmq/issues/8380

   ### 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
   
   macos 12.6.3
   
   ### RocketMQ version
   
   develop branch
   
   ### JDK Version
   
   _No response_
   
   ### Describe the Bug
   
   When controllerMode is true, inactive brokers and brokers that need to be 
elected will be checked regularly (the code is in 
RaftBrokerHeartBeatManager#scanNotActiveBroker). But the logic to determine 
whether a broker needs to be elected is incorrect. The consequence is that 
unexpected elections occur when follow broker is inactive and master broker is 
active.
   <img width="957" alt="image" 
src="https://github.com/apache/rocketmq/assets/65004897/61a901f0-af87-4f2f-afc8-b79c9a3ccbca";>
   <img width="1006" alt="image" 
src="https://github.com/apache/rocketmq/assets/65004897/e491a783-4c6b-4c21-a113-1ec9fb2a10de";>
   <img width="1001" alt="image" 
src="https://github.com/apache/rocketmq/assets/65004897/04ff4349-ed9f-4299-860f-680404482ccc";>
   
   
   ### Steps to Reproduce
   
   stop a follow broker
   
   ### What Did You Expect to See?
   
   master broker active and follow broker inactive, no election
   
   ### What Did You See Instead?
   
   an election took place
   
   ### 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