zjcnb opened a new issue #13800:
URL: https://github.com/apache/shardingsphere/issues/13800
Hi, community
Now, The `db-discovery` module integrates MYSQL MGR and openGuass, they
get master-slave relation through timed task polling, and about job code are
duplicat. So we plan to strip job code out of
s`hardingsphere-db-discovery-provider` module, move it to
`shardingsphere-db-discovery-core` management.
`shardingsphere-db-discovery-provider` module is only provide master-slave
relation. In order to achieve the purpose mentioned before, we will adjust
`db-discovery` module api.
`Before adjustment` :
```
schemaName: database_discovery_db
dataSources:
ds_0:
url:
jdbc:mysql://127.0.0.1:13306/demo_primary_ds?serverTimezone=UTC&useSSL=false
username: root
password: 123456
connectionTimeoutMilliseconds: 3000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
ds_1:
url:
jdbc:mysql://127.0.0.1.18:13307/demo_primary_ds?serverTimezone=UTC&useSSL=false
username: root
password: 123456
connectionTimeoutMilliseconds: 3000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
ds_2:
url:
jdbc:mysql://127.0.0.1:13308/demo_primary_ds?serverTimezone=UTC&useSSL=false
username: root
password: 123456
connectionTimeoutMilliseconds: 3000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
rules:
- !READWRITE_SPLITTING
dataSources:
rd_rs:
autoAwareDataSourceName: pr_ds
- !DB_DISCOVERY
dataSources:
pr_ds:
dataSourceNames:
- ds_0
- ds_1
- ds_2
discoveryTypeName: mgr
discoveryTypes:
mgr:
type: MGR
props:
groupName: 64ce3a6b-3d25-11ec-931a-6c92bf049e78
zkServerLists: 'localhost:2181'
keepAliveCron: '0/50 * * * * ?'
```
`After adjustment` :
```
schemaName: database_discovery_db
dataSources:
ds_0:
url:
jdbc:mysql://127.0.0.1:3306/demo_primary_ds?serverTimezone=UTC&useSSL=false
username: root
password:
connectionTimeoutMilliseconds: 3000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
ds_1:
url:
jdbc:mysql://127.0.0.1:3306/demo_replica_ds_0?serverTimezone=UTC&useSSL=false
username: root
password:
connectionTimeoutMilliseconds: 3000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
ds_2:
url:
jdbc:mysql://127.0.0.1:3306/demo_replica_ds_1?serverTimezone=UTC&useSSL=false
username: root
password:
connectionTimeoutMilliseconds: 3000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
rules:
- !READWRITE_SPLITTING
dataSources:
rd_rs:
autoAwareDataSourceName: pr_ds
- !DB_DISCOVERY
dataSources:
pr_ds:
dataSourceNames:
- ds_0
- ds_1
- ds_2
discoveryTypeName: mgr1
discoveryScheduleName: mgr-job1
discoverySchedulers:
mgr-job1:
type: e-job
props:
zkServerLists: 'localhost:2181'
keepAliveCron: '0/5 * * * * ?'
discoveryTypes:
mgr1:
type: MGR
props:
groupName: 92504d5b-6dec-11e8-91ea-246e9612aaf1
```
--
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]