backport AddBroker removes parsing configuration from body

This commit is contained in:
shizhili 2023-12-08 16:41:19 +08:00
parent 6bc3726f82
commit d86849f9f3
2 changed files with 38 additions and 2 deletions

View File

@ -0,0 +1,32 @@
From 82b2f8eefac157843c6ccec80d94f202c06bd195 Mon Sep 17 00:00:00 2001
From: rongtong <jinrongtong5@163.com>
Date: Wed, 18 Oct 2023 13:51:47 +0800
Subject: [PATCH] AddBroker removes parsing configuration from body (#7472)
---
.../rocketmq/container/BrokerContainerProcessor.java | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/container/src/main/java/org/apache/rocketmq/container/BrokerContainerProcessor.java b/container/src/main/java/org/apache/rocketmq/container/BrokerContainerProcessor.java
index 2ac69112d..5b825fe81 100644
--- a/container/src/main/java/org/apache/rocketmq/container/BrokerContainerProcessor.java
+++ b/container/src/main/java/org/apache/rocketmq/container/BrokerContainerProcessor.java
@@ -91,11 +91,10 @@ public class BrokerContainerProcessor implements NettyRequestProcessor {
LOGGER.error("addBroker load config from {} failed, {}", configPath, e);
}
} else {
- byte[] body = request.getBody();
- if (body != null) {
- String bodyStr = new String(body, MixAll.DEFAULT_CHARSET);
- brokerProperties = MixAll.string2Properties(bodyStr);
- }
+ LOGGER.error("addBroker config path is empty");
+ response.setCode(ResponseCode.SYSTEM_ERROR);
+ response.setRemark("addBroker config path is empty");
+ return response;
}
if (brokerProperties == null) {
--
2.32.0.windows.2

View File

@ -5,7 +5,7 @@
Summary: Cloud-Native, Distributed Messaging and Streaming
Name: rocketmq
Version: 5.1.5
Release: 26
Release: 27
License: Apache-2.0
Group: Applications/Message
URL: https://rocketmq.apache.org/
@ -35,6 +35,7 @@ Patch0022: patch022-backport-Support-KV-Storage-for-ConsumeQueue.patch
Patch0023: patch023-backport-some-bugfixes.patch
Patch0024: patch024-backport-some-format.patch
Patch0025: patch025-backport-Fix-channel-connect-issue.patch
Patch0026: patch026-backport-AddBroker-removes-parsing-configuration-from-body.patch
BuildRequires: java-1.8.0-openjdk-devel, maven, maven-local, git
Requires: java-1.8.0-openjdk-devel
@ -75,8 +76,11 @@ exit 0
%changelog
* Fri Dec 8 2023 ShiZhili <shizhili_yewu@cmss.chinamobile.com> - 5.1.3-27
- backport AddBroker removes parsing configuration from body
* Fri Dec 8 2023 ShiZhili <shizhili_yewu@cmss.chinamobile.com> - 5.1.3-26
- backport Fix channel connect issue
- backport Fix channel connect issue
* Fri Dec 8 2023 ShiZhili <shizhili_yewu@cmss.chinamobile.com> - 5.1.3-25
- backport some format and doc