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

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   62005f74f508ff0e5ae3d5882fbbf0cd19c4784f
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   Proxy
   ### Expected behavior
   db_discovery type dropped
   ### Actual behavior
   
   when execute `drop db_discovery rule` exception cannot found db_discovery 
type
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   1.  Register storage units
   ```sql
   register storage unit 
   
ds_0(url="jdbc:mysql://xxx.xxx.xxx.xxx:3306/primary_demo_ds?serverTimezone=UTC&useSSL=false",
 user="root",password="xxxxx"), 
   
ds_1(url="jdbc:mysql://xxx.xxx.xxx.xxx:3307/primary_demo_ds?serverTimezone=UTC&useSSL=false",
 user="root",password="xxxxx"),
   
ds_2(url="jdbc:mysql://xxx.xxx.xxx.xxx:3308/primary_demo_ds?serverTimezone=UTC&useSSL=false",
 user="root",password="xxxxx");
   ```
   2. Create db_discovery rule
   ```sql
   CREATE DB_DISCOVERY RULE group_0 ( STORAGE_UNITS(ds_0, ds_1, ds_2), 
TYPE(NAME='MySQL.MGR',PROPERTIES('group-name'='666edd3c-02ec-11ea-9bb3-000027e33bd2')),
 HEARTBEAT(PROPERTIES('keep-alive-cron'='0/5 * * * * ?')) );
   ```
   3. Drop db_discovery type
   ```sql
   DROP DB_DISCOVERY TYPE group_0_MySQL.MGR FROM test0;
   ```
   ### Screen shot
   <img width="749" alt="image" 
src="https://user-images.githubusercontent.com/57847965/198498682-d107a50e-0ae7-46d4-a5d1-2dd9076cf8e8.png";>
   
   ### Log
   ```
   [ERROR] 2022-10-28 11:27:30.135 [Curator-SafeNotifyService-0] 
c.g.common.eventbus.EventBus.default - Exception thrown by subscriber method 
renew(org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.storage.event.StorageNodeChangedEvent)
 on subscriber 
org.apache.shardingsphere.mode.manager.cluster.coordinator.ClusterContextManagerCoordinator@79b84841
 when dispatching event: 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.storage.event.StorageNodeChangedEvent@4a15eb17
   java.lang.NullPointerException: Can not find database discovery data source 
rule in database `test0`
   ```


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