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

soulasuna pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 56f3f91eeaa fix persist invalid instance data when zookeeper connect 
timeout (#18412)
56f3f91eeaa is described below

commit 56f3f91eeaa98366acf65513ccb3ab70bfc690b7
Author: Haoran Meng <[email protected]>
AuthorDate: Fri Jun 17 18:29:59 2022 +0800

    fix persist invalid instance data when zookeeper connect timeout (#18412)
---
 .../cluster/zookeeper/listener/SessionConnectionListener.java           | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/mode/repository/cluster/zookeeper/listener/SessionConnectionListener.java
 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-reposit
 [...]
index 16d61e8bd11..83ccaf16821 100644
--- 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/mode/repository/cluster/zookeeper/listener/SessionConnectionListener.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-repository/shardingsphere-cluster-mode-repository-provider/shardingsphere-cluster-mode-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/mode/repository/cluster/zookeeper/listener/SessionConnectionListener.java
@@ -58,7 +58,7 @@ public final class SessionConnectionListener implements 
ConnectionStateListener
         try {
             if (client.getZookeeperClient().blockUntilConnectedOrTimedOut()) {
                 
repository.persistEphemeral(ComputeNode.getOnlineInstanceNodePath(instanceContext.getInstance().getCurrentInstanceId(),
-                        
instanceContext.getInstance().getInstanceDefinition().getInstanceType()), "");
+                        
instanceContext.getInstance().getInstanceDefinition().getInstanceType()), 
instanceContext.getInstance().getInstanceDefinition().getAttributes());
                 return true;
             }
             sleepInterval();

Reply via email to