RaigorJiang opened a new issue, #34040:
URL: https://github.com/apache/shardingsphere/issues/34040

   ## Bug Report
   ### Which version of ShardingSphere did you use?
   5.5.2-SNAPSHOT master f39b52bfee012ef616082b4d48844a0c713150f3
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   
   ### Expected behavior
   Alter storage unit success
   
   ### Actual behavior
   MetaDataChangedSubscriber throws an exception
   <img width="1424" alt="image" 
src="https://github.com/user-attachments/assets/39e55fa8-ba52-4c18-8e61-96c23e9c6137";
 />
   
   ### Reason analyze (If you can)
   No
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   1. create database
   ```sql
   CREATE DATABASE sharding_db;
   USE sharding_db;
   
   REGISTER STORAGE UNIT ds_0 (
       
URL="jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true",
       USER="root",
       PASSWORD="123456",
       PROPERTIES("maximumPoolSize"=10)
   ), ds_1 (
       
URL="jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true",
       USER="root",
       PASSWORD="123456",
       PROPERTIES("maximumPoolSize"=10)
   ), ds_2 (
       
URL="jdbc:mysql://127.0.0.1:3306/demo_ds_2?serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true",
       USER="root",
       PASSWORD="123456",
       PROPERTIES("maximumPoolSize"=10)
   ), ds_3 (
       
URL="jdbc:mysql://127.0.0.1:3306/demo_ds_3?serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true",
       USER="root",
       PASSWORD="123456",
       PROPERTIES("maximumPoolSize"=10)
   );
   ```
   2. create sharding table rule
   ```sql
   CREATE SHARDING TABLE RULE t_order (
       
DATANODES("ds_${0}.t_order_${0..3},ds_${1}.t_order_${4..7},ds_${2}.t_order_${8..11},ds_${3}.t_order_${12..15}"),
       DATABASE_STRATEGY(
           TYPE="STANDARD",
           SHARDING_COLUMN=order_id,
           SHARDING_ALGORITHM(
               
TYPE(NAME="inline",PROPERTIES("algorithm-expression"="ds_${(order_id % 16 / 4) 
as int}","allow-range-query-with-inline-sharding"=true)))
           ),
       TABLE_STRATEGY(
           TYPE="STANDARD",
           SHARDING_COLUMN=order_id,
           SHARDING_ALGORITHM(
               
TYPE(NAME="inline",PROPERTIES("algorithm-expression"="t_order_${order_id % 
16}","allow-range-query-with-inline-sharding"=true)))
            )
   );
   ```
   3. create table
   ```sql
   DROP TABLE IF EXISTS t_order;
   CREATE TABLE `t_order` (
           `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
           `order_id` BIGINT(20) UNSIGNED NOT NULL COMMENT 'order id',
           PRIMARY KEY (`id`)
   );
   ```
   4. alter storage unit
   ```sql
   ALTER STORAGE UNIT ds_0 (
       
URL="jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true",
       USER="root",
       PASSWORD="123456",
       PROPERTIES("maximumPoolSize"=10)
   ), ds_1 (
       
URL="jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true",
       USER="root",
       PASSWORD="123456",
       PROPERTIES("maximumPoolSize"=10)
   ), ds_2 (
       
URL="jdbc:mysql://127.0.0.1:3306/demo_ds_2?serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true",
       USER="root",
       PASSWORD="123456",
       PROPERTIES("maximumPoolSize"=10)
   ), ds_3 (
       
URL="jdbc:mysql://127.0.0.1:3306/demo_ds_3?serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true",
       USER="root",
       PASSWORD="123456",
       PROPERTIES("maximumPoolSize"=10)
   );
   ```
   
   


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