You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/08/08 17:17:47 UTC
[GitHub] [shardingsphere] terrymanu opened a new issue #11709: Consider about redesign DistMetaDataPersistRule and governance module
terrymanu opened a new issue #11709:
URL: https://github.com/apache/shardingsphere/issues/11709
The governance module is depend on DistMetaDataPersistRule which is the kernel rule.
The relationship of DistMetaDataPersistRule and governance module are little mess, the current config in YAML is:
```yaml
rules:
- !DIST_METADATA_PERSIST
type: Local
props:
xxx: xxx
overwrite: false
- !GOVERNANCE
registryCenter:
type: ZooKeeper
namespace: governance_ds
serverLists: localhost:2181
props:
retryIntervalMilliseconds: 500
timeToLiveSeconds: 60
maxRetries: 3
operationTimeoutMilliseconds: 500
overwrite: false
```
It is conflict If `!DIST_METADATA_PERSIST` and `!GOVERNANCE` in same YAML file, and we need to resolve as `!GOVERNANCE` as high priority and ignore `!DIST_METADATA_PERSIST`.
It is difficult to understand.

I prefer to discuss the new design. How about to create a new rule interface `PersistRule`, there are 3 type `none`, `stand-alone` and `cluster`, `stand-alone` is mapped to `DistMetaDataPersistRule`, and `cluster` is mapped to `GovernanceRule`.
It is better to push down `DistMetaDataPersistRule` and `GovernanceRule` to type of `PersistRule`, and we just provide storage strategy for `Zookeeper`, `Etcd` and `LocalFile`.
In the other words, there a 3 level of the configuration, which are `rule (PersistRule)`, `type(none | stand-alone | cluster)` and `storage strategy(Zookeeper | Etcd | LocalFile)`
the modified config in YAML should be:
```yaml
rules:
- !PERSIST
type: Standalone
storage-strategy:
type: LocalFile
props:
xxx: xxx
overwrite: false
```
or
```yaml
rules:
- !PERSIST
type: Cluster
storage-strategy:
type: ZooKeeper
namespace: governance_ds
serverLists: localhost:2181
props:
retryIntervalMilliseconds: 500
timeToLiveSeconds: 60
maxRetries: 3
operationTimeoutMilliseconds: 500
overwrite: false
```
or
```yaml
rules:
- !PERSIST
type: None
```

Please advice me, thank you.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu commented on issue #11709: Consider about redesign DistMetaDataPersistRule and governance module
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #11709:
URL: https://github.com/apache/shardingsphere/issues/11709#issuecomment-894911938
Another solution is use running mode to instead of unified rule (PreConditionRule).
There are 3 mode `Memory`, `Standalone` and `Cluster` to map original `None`, `stand-alone` and `cluster` types.
The YAML config is like:
```yaml
mode:
type: Memory
```
or
```yaml
mode:
type: Standalone
storage-strategy:
type: LocalFile
props:
xxx: xxx
overwrite: false
```
or
```yaml
mode:
type: Cluster
storage-strategy:
type: ZooKeeper
namespace: governance_ds
serverLists: localhost:2181
props:
retryIntervalMilliseconds: 500
timeToLiveSeconds: 60
maxRetries: 3
operationTimeoutMilliseconds: 500
overwrite: false
```
Which one is your favorite?
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] menghaoranss commented on issue #11709: Consider about redesign DistMetaDataPersistRule and governance module
Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #11709:
URL: https://github.com/apache/shardingsphere/issues/11709#issuecomment-895025981
I think the second solution is better. `Persit` and `Governance` are different from `Rule` in ShardingSphere, It's a good idea to merge them.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu closed issue #11709: Add 3 mode types to control ShardingSphere startup
Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #11709:
URL: https://github.com/apache/shardingsphere/issues/11709
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu commented on issue #11709: Consider about redesign DistMetaDataPersistRule and governance module
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #11709:
URL: https://github.com/apache/shardingsphere/issues/11709#issuecomment-896959334
Cool
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu edited a comment on issue #11709: Consider about redesign DistMetaDataPersistRule and governance module
Posted by GitBox <gi...@apache.org>.
terrymanu edited a comment on issue #11709:
URL: https://github.com/apache/shardingsphere/issues/11709#issuecomment-894911938
Another solution is use running mode to instead of unified rule (PreConditionRule).
There are 3 mode `Memory`, `Standalone` and `Cluster` to map original `None`, `stand-alone` and `cluster` types.
The YAML config is like:
```yaml
mode:
type: Memory
```
or
```yaml
mode:
type: Standalone
storage-strategy:
type: LocalFile
props:
xxx: xxx
overwrite: false
```
or
```yaml
mode:
type: Cluster
storage-strategy:
type: ZooKeeper
namespace: governance_ds
serverLists: localhost:2181
props:
retryIntervalMilliseconds: 500
timeToLiveSeconds: 60
maxRetries: 3
operationTimeoutMilliseconds: 500
overwrite: false
```
Which one is your favorite?
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu edited a comment on issue #11709: Consider about redesign DistMetaDataPersistRule and governance module
Posted by GitBox <gi...@apache.org>.
terrymanu edited a comment on issue #11709:
URL: https://github.com/apache/shardingsphere/issues/11709#issuecomment-894911938
Another solution is use running mode to instead of unified rule (PreConditionRule).
There are 3 mode `Memory`, `Standalone` and `Cluster` to map original `None`, `stand-alone` and `cluster` types.
The YAML config is like:
```yaml
mode:
type: Memory
```
or
```yaml
mode:
type: Standalone
repository:
type: LocalFile
props:
xxx: xxx
overwrite: false
```
or
```yaml
mode:
type: Cluster
repository:
type: ZooKeeper
namespace: governance_ds
serverLists: localhost:2181
props:
retryIntervalMilliseconds: 500
timeToLiveSeconds: 60
maxRetries: 3
operationTimeoutMilliseconds: 500
overwrite: false
```
Which one is your favorite?
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org