sandynz opened a new issue, #18609:
URL: https://github.com/apache/shardingsphere/issues/18609
Some discussion notes with @terrymanu . It's related to ElasticJob and
ShardingSphere Proxy Mode.
Currently, registry center client will be created, all of them use
configuration from mode in server.yaml:
- ModeScheduleContext.initRegistryCenter, create
org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter. Which
is used by db-discovery rule.
- CoordinatorRegistryCenterInitializer.createRegistryCenter, create
org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter. Which
is used by scaling.
- ClusterPersistRepositoryFactory.getInstance, create
org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepository.
Which is used by proxy.
It means it might create 3 ZooKeeper client if mode Cluster type is
ZooKeeper.
Why there're several registry center client?
1. `org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter`
is different with
`org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepository`,
seems could not be wrappered simply.
2. Since modules dependency hierarchy, `ModeScheduleContext` could not reuse
`CoordinatorRegistryCenterInitializer`.
```
data-pipeline-core (includes CoordinatorRegistryCenterInitializer)
mode-core (CoordinatorRegistryCenterInitializer depends on it)
schedule-core (includes ModeScheduleContext)
```
It's better to use unified registry center client, just reuse the proxy one.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]