mirror of
https://github.com/apache/rocketmq.git
synced 2026-09-24 16:04:00 +08:00
[ISSUE #4726] Return error when unregisterBroker is failed
This commit is contained in:
@@ -531,7 +531,7 @@ public class BrokerOuterAPI {
|
||||
this.unregisterBroker(namesrvAddr, clusterName, brokerAddr, brokerName, brokerId);
|
||||
LOGGER.info("unregisterBroker OK, NamesrvAddr: {}", namesrvAddr);
|
||||
} catch (Exception e) {
|
||||
LOGGER.warn("unregisterBroker Exception, {}", namesrvAddr, e);
|
||||
LOGGER.warn("unregisterBroker Exception, NamesrvAddr: {}", namesrvAddr, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -557,6 +557,9 @@ public class BrokerOuterAPI {
|
||||
case ResponseCode.SUCCESS: {
|
||||
return;
|
||||
}
|
||||
case ResponseCode.SYSTEM_ERROR: {
|
||||
throw new MQBrokerException(response.getCode(), response.getRemark(), brokerAddr);
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
+3
-1
@@ -349,8 +349,10 @@ public class DefaultRequestProcessor implements NettyRequestProcessor {
|
||||
|
||||
if (!this.namesrvController.getRouteInfoManager().submitUnRegisterBrokerRequest(requestHeader)) {
|
||||
log.warn("Couldn't submit the unregister broker request to handler, broker info: {}", requestHeader);
|
||||
response.setCode(ResponseCode.SYSTEM_ERROR);
|
||||
response.setRemark(null);
|
||||
return response;
|
||||
}
|
||||
|
||||
response.setCode(ResponseCode.SUCCESS);
|
||||
response.setRemark(null);
|
||||
return response;
|
||||
|
||||
@@ -489,7 +489,6 @@ public class RouteInfoManager {
|
||||
}
|
||||
|
||||
private int operateWritePermOfBroker(final String brokerName, final int requestCode) {
|
||||
Set<String> changedTopics = new HashSet<>();
|
||||
int topicCnt = 0;
|
||||
|
||||
Iterator<Entry<String, Map<String, QueueData>>> itTopic = this.topicQueueTable.entrySet().iterator();
|
||||
|
||||
Reference in New Issue
Block a user