From df4e98855d461d85e9c4ed43add1b12a58bca7b6 Mon Sep 17 00:00:00 2001 From: lushilin <897401919@qq.com> Date: Thu, 28 Oct 2021 08:51:26 +0800 Subject: [PATCH] fix(broker): can not clear topic unitSubFlag (#3429) Co-authored-by: lushilin --- .../apache/rocketmq/broker/topic/TopicConfigManager.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java b/broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java index 1f2bb4d8..e09080af 100644 --- a/broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java +++ b/broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java @@ -320,7 +320,7 @@ public class TopicConfigManager extends ConfigManager { topicConfig.setTopicSysFlag(TopicSysFlag.clearUnitFlag(oldTopicSysFlag)); } - log.info("update topic sys flag. oldTopicSysFlag={}, newTopicSysFlag", oldTopicSysFlag, + log.info("update topic sys flag. oldTopicSysFlag={}, newTopicSysFlag={}", oldTopicSysFlag, topicConfig.getTopicSysFlag()); this.topicConfigTable.put(topic, topicConfig); @@ -338,9 +338,11 @@ public class TopicConfigManager extends ConfigManager { int oldTopicSysFlag = topicConfig.getTopicSysFlag(); if (hasUnitSub) { topicConfig.setTopicSysFlag(TopicSysFlag.setUnitSubFlag(oldTopicSysFlag)); + } else { + topicConfig.setTopicSysFlag(TopicSysFlag.clearUnitSubFlag(oldTopicSysFlag)); } - log.info("update topic sys flag. oldTopicSysFlag={}, newTopicSysFlag", oldTopicSysFlag, + log.info("update topic sys flag. oldTopicSysFlag={}, newTopicSysFlag={}", oldTopicSysFlag, topicConfig.getTopicSysFlag()); this.topicConfigTable.put(topic, topicConfig); -- GitLab