mirror of
https://github.com/apache/rocketmq.git
synced 2026-09-01 15:47:01 +08:00
Signed-off-by: littleboy <2283985296@qq.com>
This commit is contained in:
@@ -301,6 +301,7 @@ public class RouteInfoManager {
|
||||
registerFirst = registerFirst || (StringUtils.isEmpty(oldAddr));
|
||||
|
||||
boolean isMaster = MixAll.MASTER_ID == brokerId;
|
||||
|
||||
boolean isPrimeSlave = !isOldVersionBroker && !isMaster
|
||||
&& brokerId == Collections.min(brokerAddrsMap.keySet());
|
||||
|
||||
@@ -339,7 +340,8 @@ public class RouteInfoManager {
|
||||
topicConfigWrapper.getDataVersion(), brokerName,
|
||||
entry.getValue().getTopicName())) {
|
||||
final TopicConfig topicConfig = entry.getValue();
|
||||
if (isPrimeSlave) {
|
||||
// In Slave Acting Master mode, Namesrv will regard the surviving Slave with the smallest brokerId as the "agent" Master, and modify the brokerPermission to read-only.
|
||||
if (isPrimeSlave && brokerData.isEnableActingMaster()) {
|
||||
// Wipe write perm for prime slave
|
||||
topicConfig.setPerm(topicConfig.getPerm() & (~PermName.PERM_WRITE));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user