TheR1sing3un commented on code in PR #6383:
URL: https://github.com/apache/rocketmq/pull/6383#discussion_r1139858386
##########
controller/src/main/java/org/apache/rocketmq/controller/impl/manager/ReplicasInfoManager.java:
##########
@@ -425,6 +425,25 @@ public ControllerResult<Void> cleanBrokerData(final
CleanControllerBrokerDataReq
return result;
}
+ public List<String/*BrokerName*/> scanNeedReelectBrokerSets(final
BrokerValidPredicate validPredicate) {
+ List<String> needReelectBrokerSets = new LinkedList<>();
+ this.syncStateSetInfoTable.forEach((brokerName, syncStateInfo) -> {
+ Long masterBrokerId = syncStateInfo.getMasterBrokerId();
+ String clusterName = syncStateInfo.getClusterName();
+ // Now master is inactive
+ if (masterBrokerId != null && !validPredicate.check(clusterName,
brokerName, masterBrokerId)) {
Review Comment:
> masterBrokerId == null的时候应该也要主动触发选举吧
这个场景是不是一般broker侧早就感知到了当前没有master,并且从broker侧主动触发了这个选举
--
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]