This is an automated email from the ASF dual-hosted git repository.

jinrongtong pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new 48ef5ced46 [ISSUE #7505] Do not validate the length when deleting a 
topic
48ef5ced46 is described below

commit 48ef5ced4639699e3ba207b1a648b1fd47649a69
Author: rongtong <jinrongto...@163.com>
AuthorDate: Thu Oct 26 14:43:24 2023 +0800

    [ISSUE #7505] Do not validate the length when deleting a topic
---
 .../apache/rocketmq/broker/processor/AdminBrokerProcessor.java   | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git 
a/broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java
 
b/broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java
index 0b7a6d2068..004bf12acd 100644
--- 
a/broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java
+++ 
b/broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java
@@ -518,12 +518,13 @@ public class AdminBrokerProcessor implements 
NettyRequestProcessor {
             requestHeader.getTopic(), 
RemotingHelper.parseChannelRemoteAddr(ctx.channel()));
 
         String topic = requestHeader.getTopic();
-        TopicValidator.ValidateTopicResult result = 
TopicValidator.validateTopic(topic);
-        if (!result.isValid()) {
+
+        if (UtilAll.isBlank(topic)) {
             response.setCode(ResponseCode.SYSTEM_ERROR);
-            response.setRemark(result.getRemark());
+            response.setRemark("The specified topic is blank.");
             return response;
         }
+
         if 
(brokerController.getBrokerConfig().isValidateSystemTopicWhenUpdateTopic()) {
             if (TopicValidator.isSystemTopic(topic)) {
                 response.setCode(ResponseCode.SYSTEM_ERROR);
@@ -2726,7 +2727,7 @@ public class AdminBrokerProcessor implements 
NettyRequestProcessor {
             return response;
         }
         final EpochEntryCache entryCache = new 
EpochEntryCache(brokerConfig.getBrokerClusterName(),
-                brokerConfig.getBrokerName(), brokerConfig.getBrokerId(), 
replicasManager.getEpochEntries(), 
this.brokerController.getMessageStore().getMaxPhyOffset());
+            brokerConfig.getBrokerName(), brokerConfig.getBrokerId(), 
replicasManager.getEpochEntries(), 
this.brokerController.getMessageStore().getMaxPhyOffset());
 
         response.setBody(entryCache.encode());
         response.setCode(ResponseCode.SUCCESS);

Reply via email to