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

   
https://github.com/apache/shardingsphere/commit/ee9a4b10ef824625b19792a177fd8712932585b4
   
   NPE occurred when i drop database xx, this database has discovery + 
readwrite rule.
   
   
![image](https://user-images.githubusercontent.com/33742097/220279799-4db57948-12be-40cc-9923-eaa6994560ab.png)
   
   
   ```
   CREATE DATABASE database_discovery_db;
   
   REGISTER STORAGE UNIT ds_0 (
       HOST="127.0.0.1",
       PORT=3306,
       DB="db_0",
       USER="root",
       PASSWORD="root"
   );
   REGISTER STORAGE UNIT ds_1 (
       HOST="127.0.0.1",
       PORT=3306,
       DB="db_0",
       USER="root",
       PASSWORD="root"
   );
   REGISTER STORAGE UNIT ds_2 (
       HOST="127.0.0.1",
       PORT=3306,
       DB="db_0",
       USER="root",
       PASSWORD="root"
   );
   
   CREATE DB_DISCOVERY RULE replica_ds (
       STORAGE_UNITS(ds_0, ds_1, ds_2),
       TYPE(NAME='MySQL.MGR',PROPERTIES('group-name'='92504d5b-6dec')),
       HEARTBEAT(PROPERTIES('keep-alive-cron'='0/1 * * * * ?'))
   );
   
   CREATE READWRITE_SPLITTING RULE readwrite_ds (
       AUTO_AWARE_RESOURCE=replica_ds,
       WRITE_DATA_SOURCE_QUERY_ENABLED=false,
       TYPE(NAME="random")
   );
   
   DROP DATABASE database_discovery_db;
   
   CREATE DATABASE readwrite_splitting_db;
   
   REGISTER STORAGE UNIT ds_0 (
       HOST="127.0.0.1",
       PORT=3306,
       DB="db_0",
       USER="root",
       PASSWORD="root"
   );
   REGISTER STORAGE UNIT ds_1 (
       HOST="127.0.0.1",
       PORT=3306,
       DB="db_0",
       USER="root",
       PASSWORD="root"
   );
   
   CREATE READWRITE_SPLITTING RULE readwrite_ds (
       WRITE_STORAGE_UNIT=ds_0,
       READ_STORAGE_UNITS(ds_1),
       TYPE(NAME="random")
   );
   ```


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