You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/11/25 12:42:38 UTC

[GitHub] [rocketmq] ShadowySpirits commented on a diff in pull request #5596: [ISSUE #5595] Add validateSystemTopicWhenUpdateTopic

ShadowySpirits commented on code in PR #5596:
URL: https://github.com/apache/rocketmq/pull/5596#discussion_r1032419199


##########
broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:
##########
@@ -412,10 +412,12 @@ private synchronized RemotingCommand updateAndCreateTopic(ChannelHandlerContext
             response.setRemark(result.getRemark());
             return response;
         }
-        if (TopicValidator.isSystemTopic(topic)) {
-            response.setCode(ResponseCode.SYSTEM_ERROR);
-            response.setRemark("The topic[" + topic + "] is conflict with system topic.");
-            return response;
+        if (brokerController.getBrokerConfig().isValidateSystemTopicWhenUpdateTopic()) {
+            if (TopicValidator.isSystemTopic(topic)) {

Review Comment:
   Some other places, such as updateAndCreateStaticTopic, also use TopicValidator#isSystemTopic. Should we deal with them in the same way?



-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org