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 2021/04/07 13:01:57 UTC

[GitHub] [shardingsphere] sandynz opened a new issue #9976: Proxy with empty configuration "show sharding rule" return empty set after "create sharding rule" when governance enabled

sandynz opened a new issue #9976:
URL: https://github.com/apache/shardingsphere/issues/9976


   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   5.0.0-RC1-SNAPSHOT, commit: c7ea296
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   
   ### Expected behavior
   Show sharding rule
   
   ### Actual behavior
   ```
   mysql> show sharding rule;
   Empty set
   ```
   
   ### Reason analyze (If you can)
   `create sharding rule` persist `autoTables` only, `show sharding rule` inspect `tables`
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   1, Enable governance in server.yaml
   2, Clean configuration, include config-sharding.yaml and remote configuration in ZooKeeper governance_ds
   3, Client connect to proxy, run commands:
   ```
   CREATE DATABASE sharding_db;
   USE sharding_db;
   ADD RESOURCE (ds0 = localhost:3306:jepsen_ds_0:root:test);
   ADD RESOURCE (ds1 = localhost:3306:jepsen_ds_1:root:test);
   
   CREATE SHARDING RULE (
   t_order resource(ds0, ds1) order_id MOD("sharding-count"=2) generated_key order_id snowflake("worker-id"=123)
   );
   
   CREATE TABLE `t_order` (
     `order_id` int NOT NULL,
     `user_id` int NOT NULL,
     `status` varchar(45) DEFAULT NULL,
     PRIMARY KEY (`order_id`)
   ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
   
   SHOW SHARDING RULE;
   ```
   
   ### Example codes for reproduce this issue (such as a github link).
   


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

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



[GitHub] [shardingsphere] tristaZero closed issue #9976: Proxy with empty configuration "show sharding rule" return empty set after "create sharding rule" when governance enabled

Posted by GitBox <gi...@apache.org>.
tristaZero closed issue #9976:
URL: https://github.com/apache/shardingsphere/issues/9976


   


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

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



[GitHub] [shardingsphere] sandynz commented on issue #9976: Proxy with empty configuration "show sharding rule" return empty set after "create sharding rule" when governance enabled

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


   Value of `/governance_ds/metadata/sharding_db/rule` in ZK:
   ```
   rules:
   - !SHARDING
     autoTables:
       t_order:
         actualDataSources: ds0,ds1
         logicTable: t_order
         shardingStrategy:
           standard:
             shardingAlgorithmName: t_order_MOD
             shardingColumn: order_id
     shardingAlgorithms:
       t_order_MOD:
         props:
           sharding-count: '2'
         type: MOD
   ```
   


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

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



[GitHub] [shardingsphere] strongduanmu commented on issue #9976: Proxy with empty configuration "show sharding rule" return empty set after "create sharding rule" when governance enabled

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


   @sandynz Thank you very much for your feedback, I will look at this issue. 


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

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