Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] wrong election when using JRaftContorller #8380

Open
3 tasks done
Willhow-Gao opened this issue Jul 8, 2024 · 0 comments · May be fixed by #8383
Open
3 tasks done

[Bug] wrong election when using JRaftContorller #8380

Willhow-Gao opened this issue Jul 8, 2024 · 0 comments · May be fixed by #8383

Comments

@Willhow-Gao
Copy link
Contributor

Before Creating the Bug Report

  • I found a bug, not just asking a question, which should be created in GitHub Discussions.

  • I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.

  • 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.
image
image
image

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

@Willhow-Gao Willhow-Gao changed the title [Bug] Bug title Jul 8, 2024
Willhow-Gao added a commit to Willhow-Gao/rocketmq that referenced this issue Jul 8, 2024
Willhow-Gao added a commit to Willhow-Gao/rocketmq that referenced this issue Jul 9, 2024
@Willhow-Gao Willhow-Gao linked a pull request Jul 9, 2024 that will close this issue
@Willhow-Gao Willhow-Gao changed the title [Bug] wrong election in controllerMode Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant