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 2025/07/13 02:41:11 UTC

(incubator-seata) branch 2.5.0 updated: bugfix: the server does not send heartbeats when the namingserver is used with other registries (#7529)

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

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


The following commit(s) were added to refs/heads/2.5.0 by this push:
     new 90f3cf45f2 bugfix: the server does not send heartbeats when the namingserver is used with other registries (#7529)
90f3cf45f2 is described below

commit 90f3cf45f2f8ba6471c570f67a959e77525730b9
Author: jimin <sl...@163.com>
AuthorDate: Sun Jul 13 10:41:08 2025 +0800

    bugfix: the server does not send heartbeats when the namingserver is used with other registries (#7529)
---
 changes/en-us/2.x.md                                                 | 1 +
 changes/zh-cn/2.x.md                                                 | 1 +
 .../apache/seata/server/instance/AbstractSeataInstanceStrategy.java  | 5 +++--
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/changes/en-us/2.x.md b/changes/en-us/2.x.md
index 3ec0853d6f..cf2d1e2beb 100644
--- a/changes/en-us/2.x.md
+++ b/changes/en-us/2.x.md
@@ -35,6 +35,7 @@ Add changes here for all PR submitted to the 2.x branch.
 - [[#7502](https://github.com/apache/incubator-seata/pull/7502)] remove extra dots and keep the naming style consistent with other tables
 - [[#7498](https://github.com/apache/incubator-seata/pull/7498)] fix the class name whitelist check issue in fury deserialization
 - [[#7504](https://github.com/apache/incubator-seata/pull/7504)] fix load driver class in Hikari
+- [[#7512](https://github.com/apache/incubator-seata/pull/7512)] fix the server does not send heartbeats when the namingserver is used with other registries
 
 
 ### optimize:
diff --git a/changes/zh-cn/2.x.md b/changes/zh-cn/2.x.md
index 5b0b6de888..e197306f3f 100644
--- a/changes/zh-cn/2.x.md
+++ b/changes/zh-cn/2.x.md
@@ -35,6 +35,7 @@
 - [[#7502](https://github.com/apache/incubator-seata/pull/7502)] 删除多余点号和保持命名规范统一
 - [[#7498](https://github.com/apache/incubator-seata/pull/7498)] 修复fury反序列化的类名白名单检查问题
 - [[#7504](https://github.com/apache/incubator-seata/pull/7504)] 修复 Hikari 中的加载驱动程序类
+- [[#7512](https://github.com/apache/incubator-seata/pull/7512)] 修复多注册中心下server不会向namingserver发送心跳的问题
 
 
 ### optimize:
diff --git a/server/src/main/java/org/apache/seata/server/instance/AbstractSeataInstanceStrategy.java b/server/src/main/java/org/apache/seata/server/instance/AbstractSeataInstanceStrategy.java
index f7197ffdbe..329d3e1777 100644
--- a/server/src/main/java/org/apache/seata/server/instance/AbstractSeataInstanceStrategy.java
+++ b/server/src/main/java/org/apache/seata/server/instance/AbstractSeataInstanceStrategy.java
@@ -18,7 +18,6 @@ package org.apache.seata.server.instance;
 
 import org.apache.seata.common.metadata.Instance;
 import org.apache.seata.common.thread.NamedThreadFactory;
-import org.apache.seata.common.util.StringUtils;
 import org.apache.seata.server.session.SessionHolder;
 import org.apache.seata.server.store.VGroupMappingStoreManager;
 import org.apache.seata.spring.boot.autoconfigure.properties.registry.RegistryNamingServerProperties;
@@ -31,6 +30,7 @@ import org.springframework.context.ApplicationContext;
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
 import javax.annotation.Resource;
+import java.util.Arrays;
 import java.util.Optional;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledThreadPoolExecutor;
@@ -64,7 +64,8 @@ public abstract class AbstractSeataInstanceStrategy implements SeataInstanceStra
 
     @Override
     public void init() {
-        if (!StringUtils.equals(registryProperties.getType(), NAMING_SERVER)) {
+        String types = registryProperties.getType();
+        if (types == null || !Arrays.asList(types.split(",")).contains(NAMING_SERVER)) {
             return;
         }
         Instance instance = serverInstanceInit();


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