You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "thswlsqls (via GitHub)" <gi...@apache.org> on 2026/10/15 00:14:34 UTC
[I] REGISTER STORAGE UNIT with out-of-range pool properties returns "Unknown exception." instead of a storage unit validation error [shardingsphere]
thswlsqls opened a new issue, #40197:
URL: https://github.com/apache/shardingsphere/issues/40197
## Bug Report
### Which version of ShardingSphere did you use?
master @ 01446d4fad4
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy (DistSQL)
### Expected behavior
An out-of-range pool property is reported as a `StorageUnitsValidateException` naming the storage unit, e.g. `Storage unit name: 'ds_0', error message is: maxPoolSize can not less than 1.`
### Actual behavior
The client receives `Unknown exception.` (SQLState HY000, code 0) without the storage unit name. When several units are validated together, result aggregation stops at the first failure.
### Reason analyze (If you can)
`DataSourcePoolPropertiesValidator.validateProperties()` (`infra/data-source-pool/core`) catches only `IllegalArgumentException` from the content validator. The only implementation, `HikariDataSourcePoolPropertiesContentValidator`, uses Guava `Preconditions.checkState` since #28037 and throws `IllegalStateException`, so the exception is not wrapped into `InvalidDataSourcePoolPropertiesException` and `SQLExceptionTransformEngine` turns it into `UnknownSQLException`.
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
```sql
REGISTER STORAGE UNIT ds_0 (URL="jdbc:mysql://127.0.0.1:3306/demo_ds_0", USER="root", PASSWORD="root", PROPERTIES("maxPoolSize"="0"));
```
`ALTER STORAGE UNIT` with the same property behaves the same way.
### Example codes for reproduce this issue (such as a github link).
N/A
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] REGISTER STORAGE UNIT with out-of-range pool properties returns "Unknown exception." instead of a storage unit validation error [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu closed issue #40197: REGISTER STORAGE UNIT with out-of-range pool properties returns "Unknown exception." instead of a storage unit validation error
URL: https://github.com/apache/shardingsphere/issues/40197
--
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