hzh0425 commented on code in PR #4798:
URL: https://github.com/apache/rocketmq/pull/4798#discussion_r941323588
##########
controller/src/main/java/org/apache/rocketmq/controller/impl/manager/ReplicasInfoManager.java:
##########
@@ -160,25 +161,30 @@ public ControllerResult<ElectMasterResponseHeader>
electMaster(
// First, check whether the master is still active
final String oldMaster = syncStateInfo.getMasterAddress();
if (StringUtils.isNoneEmpty(oldMaster) &&
brokerAlivePredicate.test(brokerInfo.getClusterName(), oldMaster)) {
- String err = String.format("The old master %s is still alive,
not need to elect new master for broker %s", oldMaster,
brokerInfo.getBrokerName());
- log.warn("{}", err);
-
result.setCodeAndRemark(ResponseCode.CONTROLLER_INVALID_REQUEST, err);
- return result;
+
+ if (StringUtils.isBlank(assignBrokerAddress) ||
StringUtils.equals(oldMaster, assignBrokerAddress)) {
+ String err = String.format("The old master %s is still
alive, not need to elect new master for broker %s", oldMaster,
brokerInfo.getBrokerName());
Review Comment:
This err log is inappropriate here
--
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]