You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/10/28 03:59:30 UTC

[GitHub] [shardingsphere] Qianyi951015 opened a new issue, #21816: Cannot drop db_discovery type

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

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


[GitHub] [shardingsphere] Pace2Car commented on issue #21816: Cannot drop db_discovery type

Posted by GitBox <gi...@apache.org>.
Pace2Car commented on issue #21816:
URL: https://github.com/apache/shardingsphere/issues/21816#issuecomment-1301767579

   It's seems a parse error, I will fix it.


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


[GitHub] [shardingsphere] Pace2Car commented on issue #21816: Cannot drop db_discovery type

Posted by GitBox <gi...@apache.org>.
Pace2Car commented on issue #21816:
URL: https://github.com/apache/shardingsphere/issues/21816#issuecomment-1301780434

   We need to add `` around your parameters when they have special characters, like "." in your DB_DISCOVERY TYPE name `group_0_MySQL.MGR`


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


[GitHub] [shardingsphere] RaigorJiang commented on issue #21816: Cannot drop db_discovery type

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #21816:
URL: https://github.com/apache/shardingsphere/issues/21816#issuecomment-1294425223

   @Qianyi951015 
   Thanks for your feedback!


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


[GitHub] [shardingsphere] Qianyi951015 commented on issue #21816: Cannot drop db_discovery type

Posted by GitBox <gi...@apache.org>.
Qianyi951015 commented on issue #21816:
URL: https://github.com/apache/shardingsphere/issues/21816#issuecomment-1301793522

   > We need to add `` around your parameters when they have special characters, like "." in your DB_DISCOVERY TYPE name `group_0_MySQL.MGR`
   
   Actually, the name of DB_DISCOVER TYPE is automatically generated when creating the DB_DISCOVERY RULE. Can we make some optimizations to remove the "." symbol when generating the DB_DISCOVERY TYPE name? @RaigorJiang @Pace2Car  


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


[GitHub] [shardingsphere] RaigorJiang commented on issue #21816: Cannot drop db_discovery type

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #21816:
URL: https://github.com/apache/shardingsphere/issues/21816#issuecomment-1302882760

   Maybe this makes it easier to manage:
   1. Unified to lowercase
   2. Replace `.` with `_`.


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


[GitHub] [shardingsphere] RaigorJiang commented on issue #21816: Cannot drop db_discovery type

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #21816:
URL: https://github.com/apache/shardingsphere/issues/21816#issuecomment-1294424229

   Related to #21697,
   Hi @Pace2Car, can you investigate it?


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


[GitHub] [shardingsphere] RaigorJiang closed issue #21816: Cannot drop db_discovery type

Posted by GitBox <gi...@apache.org>.
RaigorJiang closed issue #21816: Cannot drop db_discovery type
URL: https://github.com/apache/shardingsphere/issues/21816


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