apache / apache/shardingsphere

ShardingRule does not verify the existence of the data source, at the startup stage

Open
#25,894 2 comments 0 reactions 1 assignee Claimed by @strongduanmu View on GitHub
in: kernel
Dominant language
Java
Stars
20.8k
Forks
6.9k
Avg merge
11h 35m
Merged PRs (30d)
326

Description

## Bug Report

**For English only**, other languages will not accept.

Before report a bug, make sure you have:

- Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
- Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).

Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will **close it**.

Please answer these questions before submitting your issue. Thanks!

### Which version of ShardingSphere did you use?
master b90e5a17

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

### Expected behavior
I use config like this
```yaml
databaseName: sharding_db

dataSources:
ds_0:
xxx
ds_1:
xxx

rules:
- !SHARDING
defaultDatabaseStrategy:
standard:
shardingAlgorithmName: database_inline
shardingColumn: user_id
shardingAlgorithms:
database_inline:
props:
algorithm-expression: readwrite_ds
type: INLINE
t_order_inline:
props:
algorithm-expression: t_order_$->{order_id % 2}
type: INLINE
tables:
t_order:
actualDataNodes: readwrite_ds.t_order_$->{0..1}
logicTable: t_order
tableStrategy:
standard:
shardingAlgorithmName: t_order_inline
shardingColumn: order_id
```

When initializing the ShardingRule, it should be checked that the database readwrite_ds does not exist.
### Actual behavior
Proxy start successful

### Reason analyze (If you can)
missing check

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.