You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "zhaojinchao95 (via GitHub)" <gi...@apache.org> on 2023/02/21 07:43:27 UTC

[GitHub] [shardingsphere] zhaojinchao95 opened a new issue, #24274: NPE occurred when drop database xx and restart Proxy

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: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] tuichenchuxin closed issue #24274: NPE occurred when drop database xx and restart Proxy

Posted by "tuichenchuxin (via GitHub)" <gi...@apache.org>.
tuichenchuxin closed issue #24274: NPE occurred when drop database xx and restart Proxy
URL: https://github.com/apache/shardingsphere/issues/24274


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