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 2020/01/20 06:52:54 UTC
[GitHub] [incubator-shardingsphere] KomachiSion opened a new issue #4043:
Raw-yaml configuration configure none sharding strategy failed
KomachiSion opened a new issue #4043: Raw-yaml configuration configure none sharding strategy failed
URL: https://github.com/apache/incubator-shardingsphere/issues/4043
## Bug Report
Similar problem to #4005 .
### Which version of ShardingSphere did you use?
4.0.0-RC1 ~ 4.0.0
### Which project did you use? Sharding-JDBC or Sharding-Proxy?
Sharding-JDBC
### Expected behavior
```yaml
shardingRule:
tables:
t_order:
actualDataNodes: ds_${0..1}.t_order
databaseStrategy:
inline:
shardingColumn: user_id
algorithmExpression: ds_${user_id % 2}
tableStrategy:
none:
```
tableStrategy in shardingRule of t_order is `NoneStrategy`.
### Actual behavior
tableStrategy in shardingRule of t_order is null.
### Reason analyze (If you can)
`Yaml.loadAs()` parse value of `none` as `Tag.NULL`. So set the tableStrategy as null.
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
configuration
```yaml
dataSources:
ds_0: !!com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.jdbc.Driver
jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
username: root
password:
ds_1: !!com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.jdbc.Driver
jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
username: root
password:
shardingRule:
tables:
t_order:
actualDataNodes: ds_${0..1}.t_order
databaseStrategy:
inline:
shardingColumn: user_id
algorithmExpression: ds_${user_id % 2}
tableStrategy:
none:
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] terrymanu closed issue #4043: Raw-yaml
configuration configure none sharding strategy failed
Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #4043: Raw-yaml configuration configure none sharding strategy failed
URL: https://github.com/apache/incubator-shardingsphere/issues/4043
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services