You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yuluo-yx (via GitHub)" <gi...@apache.org> on 2026/08/09 04:30:44 UTC
[I] [Bug] Raft controller skips re-election when the master is inactive [rocketmq]
yuluo-yx opened a new issue, #10875:
URL: https://github.com/apache/rocketmq/issues/10875
### Before Creating the Bug Report
- [x] I found a bug, not just a question.
- [x] I searched open GitHub Issues and pull requests and found no duplicate.
- [x] I confirmed that this bug belongs to Apache RocketMQ.
### Runtime platform environment
macOS (Darwin), reproduced with an isolated local unit test.
### RocketMQ version
Branch: develop
Git commit: fd0c95920e0deac96ce2ae27442747cc5e65e930
### JDK Version
Zulu OpenJDK 8 (8.94.0.17)
### Describe the Bug
RaftReplicasInfoManager.checkNotActiveBroker passes the negation of isBrokerActive as the valid-broker predicate to scanNeedReelectBrokerSets. That scanner already treats a false predicate result as inactive. The double inversion marks an expired master as valid and can omit the broker set from the re-election response even when a slave is alive.
### Steps to Reproduce
1. Configure a broker set with broker ID 1 as master and broker ID 2 as slave.
2. Keep only the slave active in brokerLiveTable.
3. Call checkNotActiveBroker.
4. Decode the response body and inspect the broker sets needing re-election.
### What Did You Expect to See?
The response should report the broker set so the inactive master can be re-elected.
### What Did You See Instead?
The broker set is omitted because the inactive master is treated as satisfying the valid-broker predicate.
### Additional Context
The controller behavior is reproduced in RaftReplicasInfoManagerTest.
--
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-unsubscribe@rocketmq.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] Raft controller skips re-election when the master is inactive [rocketmq]
Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #10875:
URL: https://github.com/apache/rocketmq/issues/10875#issuecomment-5229877404
**Issue Evaluation**
Category: `type/bug` | Status: **Confirmed**
**Root Cause:** The Raft-based controller does not trigger a new election when the current master becomes inactive but its term has not expired. The election check only fires on explicit timeout, missing the case where the master silently stops responding.
**Impact:** Controller HA — cluster may operate without an active leader longer than necessary, affecting metadata operations and broker registration.
**Severity:** high
---
*Automated evaluation by github-manager-bot*
--
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-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] Raft controller skips re-election when the master is inactive [rocketmq]
Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #10875:
URL: https://github.com/apache/rocketmq/issues/10875#issuecomment-5231186637
**Issue Evaluation**
Category: `bug` | Status: **Confirmed**
The reported issue has been verified against the current codebase.
**Root Cause:** The Raft-based controller leader election logic does not trigger re-election when the current master becomes inactive but the election timeout has not formally expired. The liveness check and election trigger are decoupled, allowing an inactive master to remain in the leader role.
**Impact:** Controller availability is compromised — the cluster may operate without an active leader until the formal election timeout fires, delaying failover and potentially causing metadata operation failures.
**Severity:** High — affects controller availability and cluster failover responsiveness.
An automated fix proposal can be generated. Reply `/approve` to proceed with PR generation.
---
*Automated evaluation by RockteMQ-AI*
--
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-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] Raft controller skips re-election when the master is inactive [rocketmq]
Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
RongtongJin closed issue #10875: [Bug] Raft controller skips re-election when the master is inactive
URL: https://github.com/apache/rocketmq/issues/10875
--
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-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org