You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by ji...@apache.org on 2026/10/02 14:02:02 UTC

(incubator-seata) branch 2.x updated: bugfix: preserve long configuration values in etcd3 upload script (#8287)

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

slievrly pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/incubator-seata.git


The following commit(s) were added to refs/heads/2.x by this push:
     new d3cd47dd1e bugfix: preserve long configuration values in etcd3 upload script (#8287)
d3cd47dd1e is described below

commit d3cd47dd1e7fac6ab65f43f7a68e08b742890102
Author: zxxwyt <zo...@gmail.com>
AuthorDate: Fri Oct 2 22:01:58 2026 +0800

    bugfix: preserve long configuration values in etcd3 upload script (#8287)
---
 changes/en-us/2.x.md                       | 1 +
 changes/zh-cn/2.x.md                       | 1 +
 script/config-center/etcd3/etcd3-config.sh | 4 ++--
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/changes/en-us/2.x.md b/changes/en-us/2.x.md
index ca4967bf86..7ba0db5aa9 100644
--- a/changes/en-us/2.x.md
+++ b/changes/en-us/2.x.md
@@ -26,6 +26,7 @@ Add changes here for all PR submitted to the 2.x branch.
 
 ### bugfix:
 
+- [[#8287](https://github.com/apache/incubator-seata/pull/8287)] fix Base64 encoding of configuration keys and values in the etcd3 upload script
 - [[#8275](https://github.com/apache/incubator-seata/pull/8275)] handle RM resource unregistration in the mock Netty server
 - [[#8237](https://github.com/apache/incubator-seata/pull/8237)] avoid parsing a missing optional server service port as an error
 - [[#8278](https://github.com/apache/incubator-seata/pull/8278)] guard concurrent fastjson2 JSONB decoding to preserve RPC and undo-log references
diff --git a/changes/zh-cn/2.x.md b/changes/zh-cn/2.x.md
index 7652575167..ceadc42f8a 100644
--- a/changes/zh-cn/2.x.md
+++ b/changes/zh-cn/2.x.md
@@ -26,6 +26,7 @@
 
 ### bugfix:
 
+- [[#8287](https://github.com/apache/incubator-seata/pull/8287)] 修复 etcd3 上传脚本对长配置键值及特殊字符的编码
 - [[#8275](https://github.com/apache/incubator-seata/pull/8275)] 补齐 Mock Netty 服务端 RM 资源注销处理器并校验实际注销结果
 - [[#8237](https://github.com/apache/incubator-seata/pull/8237)] 未配置可选服务端口时直接使用默认值,保留非法配置错误提示
 - [[#8278](https://github.com/apache/incubator-seata/pull/8278)] 保护 Fastjson2 JSONB 并发解码,避免 RPC 与 UndoLog 引用字段丢失
diff --git a/script/config-center/etcd3/etcd3-config.sh b/script/config-center/etcd3/etcd3-config.sh
index 85d3bfb677..5477d2a6d5 100755
--- a/script/config-center/etcd3/etcd3-config.sh
+++ b/script/config-center/etcd3/etcd3-config.sh
@@ -48,8 +48,8 @@ echo "Set etcd3Addr=$etcd3Addr"
 failCount=0
 tempLog=$(mktemp -u)
 function addConfig() {
-  keyBase64=$(printf "%s""$2" | base64)
-	valueBase64=$(printf "%s""$3" | base64)
+  keyBase64=$(printf "%s" "$2" | base64 | tr -d '\r\n')
+  valueBase64=$(printf "%s" "$3" | base64 | tr -d '\r\n')
   curl -X POST -H "${1}" -d "{\"key\": \"$keyBase64\", \"value\": \"$valueBase64\"}" "http://$4/v3/kv/put" >"${tempLog}" 2>/dev/null
   if [[ -z $(cat "${tempLog}") ]]; then
     echo " Please check the cluster status. "


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org