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

duanzhengqiang 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 9bb70678620 Adjustment registryCenter#onlineInstance method index 
(#25885)
9bb70678620 is described below

commit 9bb70678620f20fa58943b5be8a1fe153022ca73
Author: zhaojinchao <[email protected]>
AuthorDate: Thu May 25 19:45:07 2023 +0800

    Adjustment registryCenter#onlineInstance method index (#25885)
---
 .../mode/manager/cluster/ClusterContextManagerBuilder.java              | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/ClusterContextManagerBuilder.java
 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/ClusterContextManagerBuilder.java
index d90052985d0..47e02cdb2d9 100644
--- 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/ClusterContextManagerBuilder.java
+++ 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/ClusterContextManagerBuilder.java
@@ -77,11 +77,11 @@ public final class ClusterContextManagerBuilder implements 
ContextManagerBuilder
     }
     
     private void registerOnline(final MetaDataPersistService persistService, 
final RegistryCenter registryCenter, final ContextManagerBuilderParameter 
param, final ContextManager contextManager) {
+        
registryCenter.onlineInstance(contextManager.getInstanceContext().getInstance());
         loadClusterStatus(registryCenter, contextManager);
         
contextManager.getInstanceContext().getInstance().setLabels(param.getLabels());
         
contextManager.getInstanceContext().getAllClusterInstances().addAll(registryCenter.getComputeNodeStatusService().loadAllComputeNodeInstances());
         new ContextManagerSubscriberFacade(persistService, registryCenter, 
contextManager);
-        
registryCenter.onlineInstance(contextManager.getInstanceContext().getInstance());
     }
     
     private void loadClusterStatus(final RegistryCenter registryCenter, final 
ContextManager contextManager) {

Reply via email to