You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2021/01/11 02:49:16 UTC

[shardingsphere] branch master updated: Init scaling worker in proxy (#8971)

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

panjuan 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 97c569d  Init scaling worker in proxy (#8971)
97c569d is described below

commit 97c569db25bbf584a549298874aa96f5968c7485
Author: Haoran Meng <me...@gmail.com>
AuthorDate: Mon Jan 11 10:48:57 2021 +0800

    Init scaling worker in proxy (#8971)
---
 .../proxy/initializer/impl/GovernanceBootstrapInitializer.java          | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/java/org/apache/shardingsphere/proxy/initializer/impl/GovernanceBootstrapInitializer.java b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/java/org/apache/shardingsphere/proxy/initializer/impl/GovernanceBootstrapInitializer.java
index f87955b..6e46151 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/java/org/apache/shardingsphere/proxy/initializer/impl/GovernanceBootstrapInitializer.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/java/org/apache/shardingsphere/proxy/initializer/impl/GovernanceBootstrapInitializer.java
@@ -42,6 +42,7 @@ import org.apache.shardingsphere.proxy.config.yaml.YamlProxyServerConfiguration;
 import org.apache.shardingsphere.scaling.core.config.ScalingContext;
 import org.apache.shardingsphere.scaling.core.config.ServerConfiguration;
 import org.apache.shardingsphere.scaling.core.service.impl.DistributedScalingJobService;
+import org.apache.shardingsphere.scaling.core.spi.ScalingWorkerLoader;
 import org.apache.shardingsphere.transaction.context.TransactionContexts;
 
 import java.util.Collection;
@@ -143,6 +144,7 @@ public final class GovernanceBootstrapInitializer extends AbstractBootstrapIniti
             ServerConfiguration serverConfiguration = scalingConfigurationOptional.get();
             serverConfiguration.setDistributedScalingService(new GovernanceConfigurationYamlSwapper().swapToObject(yamlConfig.getServerConfiguration().getGovernance()));
             ScalingContext.getInstance().init(serverConfiguration);
+            ScalingWorkerLoader.initScalingWorker();
             ScalingServiceHolder.getInstance().init(new DistributedScalingJobService());
         }
     }