apache / apache/shardingsphere
Can we provide check for configuration of `server.yaml`?
- Dominant language
- Java
- Stars
- 20.8k
- Forks
- 6.9k
- Avg merge
- 11h 35m
- Merged PRs (30d)
- 326
Description
## Feature Request
```
ShardingSphere-5.2.2-SNAPSHOT
Commit ID: 34c5cba3bb9bc58c61496112ba44f533a63f9b94
Commit Message: Move RunnerParameters (#22496)
Branch: master
Build time: 2022-11-29T15:17:29+0800
```
Can we provide check for configuration of `server.yaml`?
Now i can config wrong value for some key.
It is obviously not true.
### Is your feature request related to a problem?
no
### Describe the feature you would like.
```
[root@localhost 1129]# mysql -uroot -proot -P3333 -h192.168.10.23
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.7.22-ShardingSphere-Proxy 5.2.2-SNAPSHOT-34c5cba
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SHOW TRANSACTION RULE;
+--------------+---------------+-------+
| default_type | provider_type | props |
+--------------+---------------+-------+
| XA | testasdasd | |
+--------------+---------------+-------+
1 row in set (0.26 sec)
mysql> ^DBye
[root@localhost 1129]# cat conf/server.yaml | grep -v ^# | grep -v ^$
authority:
users:
- user: root@%
password: root
- user: sharding
password: sharding
privilege:
type: ALL_PERMITTED
transaction:
defaultType: XA
providerType: testasdasd
sqlParser:
sqlCommentParseEnabled: true
sqlStatementCache:
initialCapacity: 1000
maximumSize: 55535
parseTreeCache:
initialCapacity: 28
maximumSize: 1000
```

Contributor guide
Research direction
Start by reproducing the behavior with the server.yaml transaction.providerType setting and the SHOW TRANSACTION RULE command shown in the issue. Determine how an invalid providerType such as testasdasd is currently accepted; done means invalid server.yaml values are detected instead of being exposed as valid transaction configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100