Issue 1:
Bug Report

Which version of ShardingSphere did you use?

master 6cf1f1e

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

ShardingSphere-Proxy

Expected behavior

CREATE READWRITE_SPLITTING RULE failed.

Actual behavior

Got an exception but CREATE READWRITE_SPLITTING RULE success.

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

Create ms_group_0, use resource_0

CREATE READWRITE_SPLITTING RULE ms_group_0 (
WRITE_RESOURCE=resource_0,
READ_RESOURCES(resource_1),TYPE(NAME=random)
);

Create ms_group_1, use resource_0 too

CREATE READWRITE_SPLITTING RULE ms_group_1` (
WRITE_RESOURCE=resource_0,
READ_RESOURCES(resource_1),TYPE(NAME=random)
);

log

ERROR 1999 (42000): Unknown exception: Can not config duplicate write data source `resource_0` in database `test1`.

But when I execute show readwrite_splitting rules, ms_group_1 exists.

Issue 2:
For English only, other languages we will close it directly.

Please answer these questions before submitting your issue. Thanks!

Before submit a new issue, please check existed issue first, to make sure your issue is not a duplicated one.

Which version of Sharding-Sphere do you using?

3.0.0.M3

Which project do you using? Sharding-JDBC or Sharding-Proxy?

Sharding-JDBC

Expected behavior

my use orchestraion regcenter configuration sharding

but thorw ShardingConfigurationException: No available data source configuration to load

my debugger find this problem is YAML.load(dataSourceMapYamlString) throw exception

the dataSourceMapYamlString is not null

can you help my see the problem, thank you!

sharding configuration:

<import resource="classpath:/applicationContext-sharding-reg-center.xml"/>
<orchestraion:sharding-data-source id="shardingDatabasesTablesDataSource" registry-center-ref="regCenter" />

applicationContext-sharding-reg-center.xml:

<orchestration:zookeeper id="regCenter" server-lists="172.28.1.60:2181" namespace="rdb-orche" base-sleep-time-milliseconds="1000" max-sleep-time-milliseconds="3000" max-retries="3" />

see my zookeeper datasource string is:

dataSource: !!com.jolbox.bonecp.BoneCPDataSource
acquireIncrement: 5
acquireRetryAttempts: 5
acquireRetryDelayInMs: 7000
closeConnectionWatchTimeout: 0
closeConnectionWatchTimeoutInMs: 0
configFile:
connectionHookClassName:
connectionTestStatement:
connectionTimeout: 0
connectionTimeoutInMs: 0
defaultAutoCommit: true
defaultCatalog:
defaultReadOnly: false
defaultTransactionIsolation:
driverClass: com.mysql.jdbc.Driver
idleConnectionTestPeriod: 60
idleConnectionTestPeriodInMinutes: 60
idleMaxAge: 240
idleMaxAgeInMinutes: 240
initSQL:
jdbcUrl: jdbc:mysql://localhost:3306/dayi_spot?characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull
maxConnectionAge: 0
maxConnectionAgeInSeconds: 0
maxConnectionsPerPartition: 10
minConnectionsPerPartition: 5
partitionCount: 3
password: '123456'
poolAvailabilityThreshold: 0
poolName:
poolStrategy: DEFAULT
preparedStatementsCacheSize: 100
queryExecuteTimeLimitInMs: 0
releaseHelperThreads: 0
serviceOrder: FIFO
statementCacheSize: 100
statementReleaseHelperThreads: 0
statementsCacheSize: 100
statementsCachedPerConnection: 0
user: root
username: root
ds-2016: !!com.jolbox.bonecp.BoneCPDataSource
acquireIncrement: 5
acquireRetryAttempts: 5
acquireRetryDelayInMs: 7000
closeConnectionWatchTimeout: 0
closeConnectionWatchTimeoutInMs: 0
configFile:
connectionHookClassName:
connectionTestStatement:
connectionTimeout: 0
connectionTimeoutInMs: 0
defaultAutoCommit: true
defaultCatalog:
defaultReadOnly: false
defaultTransactionIsolation:
driverClass: com.mysql.jdbc.Driver
idleConnectionTestPeriod: 60
idleConnectionTestPeriodInMinutes: 60
idleMaxAge: 240
idleMaxAgeInMinutes: 240
initSQL:
jdbcUrl: jdbc:mysql://localhost:3306/dayi_spot_2016?characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull
maxConnectionAge: 0
maxConnectionAgeInSeconds: 0
maxConnectionsPerPartition: 10
minConnectionsPerPartition: 5
partitionCount: 3
password: '123456'
poolAvailabilityThreshold: 0
poolName:
poolStrategy: DEFAULT
preparedStatementsCacheSize: 100
queryExecuteTimeLimitInMs: 0
releaseHelperThreads: 0
serviceOrder: FIFO
statementCacheSize: 100
statementReleaseHelperThreads: 0
statementsCacheSize: 100
statementsCachedPerConnection: 0
user: root
username: root
ds-2017: !!com.jolbox.bonecp.BoneCPDataSource
acquireIncrement: 5
acquireRetryAttempts: 5
acquireRetryDelayInMs: 7000
closeConnectionWatchTimeout: 0
closeConnectionWatchTimeoutInMs: 0
configFile:
connectionHookClassName:
connectionTestStatement:
connectionTimeout: 0
connectionTimeoutInMs: 0
defaultAutoCommit: true
defaultCatalog:
defaultReadOnly: false
defaultTransactionIsolation:
driverClass: com.mysql.jdbc.Driver
idleConnectionTestPeriod: 60
idleConnectionTestPeriodInMinutes: 60
idleMaxAge: 240
idleMaxAgeInMinutes: 240
initSQL:
jdbcUrl: jdbc:mysql://localhost:3306/dayi_spot_2017?characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull
maxConnectionAge: 0
maxConnectionAgeInSeconds: 0
maxConnectionsPerPartition: 10
minConnectionsPerPartition: 5
partitionCount: 3
password: '123456'
poolAvailabilityThreshold: 0
poolName:
poolStrategy: DEFAULT
preparedStatementsCacheSize: 100
queryExecuteTimeLimitInMs: 0
releaseHelperThreads: 0
serviceOrder: FIFO
statementCacheSize: 100
statementReleaseHelperThreads: 0
statementsCacheSize: 100
statementsCachedPerConnection: 0
user: root
username: root

Actual behavior

Reason analyze

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc

For bug report, please MUST provide the reproduce example codes (such as a github link).