thswlsqls opened a new pull request, #40199:
URL: https://github.com/apache/shardingsphere/pull/40199

   Fixes #40197.
   
   Changes proposed in this pull request:
     - `DataSourcePoolPropertiesValidator.validateProperties()` now catches 
`IllegalArgumentException | IllegalStateException` from the content validator 
and wraps both into `InvalidDataSourcePoolPropertiesException`.
     - `HikariDataSourcePoolPropertiesContentValidator`, the only 
implementation, throws `IllegalStateException` via `Preconditions.checkState` 
since #28037, so out-of-range properties such as `maxPoolSize=0` surfaced as 
`Unknown exception.` from `REGISTER/ALTER STORAGE UNIT`.
     - With the fix, the error is reported as a `StorageUnitsValidateException` 
naming the storage unit, and multi-unit validation keeps collecting results.
     - Added `assertValidateWithIllegalStateContentProperties` to 
`DataSourcePoolPropertiesValidatorTest`; it fails without the fix and passes 
with it. The existing `IllegalArgumentException` test is kept.
     - Added a Bug Fixes entry to `RELEASE-NOTES.md`.
   
   AI assistance: Claude Code was used to draft the change and its unit test in 
`infra/data-source-pool/core` (`DataSourcePoolPropertiesValidator`, 
`DataSourcePoolPropertiesValidatorTest`) and the `RELEASE-NOTES.md` entry. I 
reviewed, verified, and take responsibility for every line submitted.
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following 
options:
   - [x] My code follows the [code of 
conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) 
of this project.
   - [x] I have self-reviewed the commit code.
   - [ ] I have (or in comment I request) added corresponding labels for the 
pull request.
   - [ ] I have passed maven check locally : `./mvnw clean install -B -T1C 
-Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`. Ran instead: repo-wide 
`spotless:check`, `checkstyle:check`, `apache-rat:check` with `-Pcheck`, and 
`./mvnw install -pl infra/data-source-pool/core -am -B -T1C 
-Dmaven.javadoc.skip -Dmaven.jacoco.skip -e` (all passed).
   - [ ] I have made corresponding changes to the documentation. Not 
applicable: no documented behavior changes.
   - [x] I have added corresponding unit tests for my changes.
   - [x] I have updated the Release Notes of the current development version. 
For more details, see [Update Release 
Note](https://shardingsphere.apache.org/community/en/involved/contribute/contributor/)
   - [x] I have disclosed the tool and affected files or scope for any material 
AI assistance, as required by the [AI-assisted contribution policy].
   
   [AI-assisted contribution policy]: 
https://github.com/apache/shardingsphere/blob/master/AI_POLICY.md
   
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to