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

   Fixes #38846.
   
     ### Motivation
   
     `storageUnitName` is documented as case-sensitive for `REGISTER STORAGE 
UNIT`, and the `SHOW RULES USED STORAGE UNIT` executor already checks storage 
unit
     existence with exact key matching.
   
     However, the rule-specific retrievers used by `SHOW RULES USED STORAGE 
UNIT` matched storage unit names case-insensitively. When storage units such as 
`ds_0`
     and `DS_0` existed at the same time, the statement could not distinguish 
the requested storage unit correctly.
   
     ### Changes
   
     - Use exact storage unit name matching in `SHOW RULES USED STORAGE UNIT` 
retrievers for:
       - Readwrite-splitting rule
       - Sharding rule
       - Shadow rule
       - Single rule
     - Remove unnecessary case-insensitive matching from the affected 
retrievers.
     - Add regression tests for storage unit names that differ only by case.
   
     ### Compatibility
   
     This restores the documented case-sensitive storage unit name behavior.
   
     No SQL grammar, DistSQL syntax, API/SPI contract, configuration format, 
metadata storage format, or protocol behavior is changed.
   
     ### Verification
   
     - `./mvnw -pl features/readwrite-splitting/distsql/handler -DskipITs 
-Dspotless.skip=true -Dtest=InUsedReadwriteSplittingStorageUnitRetrieverTest
     -DfailIfNoTests=true -Dsurefire.failIfNoSpecifiedTests=false test`
     - `./mvnw -pl features/sharding/distsql/handler -DskipITs 
-Dspotless.skip=true -Dtest=InUsedShardingStorageUnitRetrieverTest 
-DfailIfNoTests=true
     -Dsurefire.failIfNoSpecifiedTests=false test`
     - `./mvnw -pl features/shadow/distsql/handler -DskipITs 
-Dspotless.skip=true -Dtest=InUsedShadowStorageUnitRetrieverTest 
-DfailIfNoTests=true
     -Dsurefire.failIfNoSpecifiedTests=false test`
     - `./mvnw -pl kernel/single/distsql/handler -DskipITs -Dspotless.skip=true 
-Dtest=InUsedSingleStorageUnitRetrieverTest -DfailIfNoTests=true
     -Dsurefire.failIfNoSpecifiedTests=false test`
     - `./mvnw -pl 
features/readwrite-splitting/distsql/handler,features/sharding/distsql/handler,features/shadow/distsql/handler,kernel/single/distsql/handler
     -am -DskipITs -Dspotless.skip=true
     
-Dtest=InUsedReadwriteSplittingStorageUnitRetrieverTest,InUsedShardingStorageUnitRetrieverTest,InUsedShadowStorageUnitRetrieverTest,InUsedSingleStorageUnitRe
     trieverTest -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false 
test`
     - `./mvnw -pl 
features/readwrite-splitting/distsql/handler,features/sharding/distsql/handler,features/shadow/distsql/handler,kernel/single/distsql/handler
     spotless:check -Pcheck -T1C`
     - `./mvnw -pl 
features/readwrite-splitting/distsql/handler,features/sharding/distsql/handler,features/shadow/distsql/handler,kernel/single/distsql/handler
     checkstyle:check -Pcheck -T1C`


-- 
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