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/06/01 09:56:02 UTC

[GitHub] [shardingsphere] strongduanmu opened a new issue #10605: DistSQL metadata rules lost when execute alter readwrite splitting rule statement

strongduanmu opened a new issue #10605:
URL: https://github.com/apache/shardingsphere/issues/10605


   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   
   master branch
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-Proxy & governance
   
   ### Expected behavior
   
   Alter readwrite splitting rule success and does not affect other rule configurations.
   
   ### Actual behavior
   
   Before execute `alter readwrite splitting rule` statement, the metadata is:
   
   ```yaml
   !!map
   - !SHARDING
     bindingTables:
     - t_order,t_order_item
     broadcastTables:
     - t_config
     defaultDatabaseStrategy:
       standard:
         shardingAlgorithmName: database_inline
         shardingColumn: user_id
     defaultTableStrategy:
       none: ''
     keyGenerators:
       snowflake:
         props:
           worker-id: 123
         type: SNOWFLAKE
     shardingAlgorithms:
       database_inline:
         props:
           algorithm-expression: ds_${user_id % 2}
         type: INLINE
       t_order_inline:
         props:
           algorithm-expression: t_order_${order_id % 2}
         type: INLINE
       t_order_new_inline:
         props:
           algorithm-expression: t_order_new_${order_id % 2}
         type: INLINE
       t_order_item_inline:
         props:
           algorithm-expression: t_order_item_${order_id % 2}
         type: INLINE
     tables:
       t_order:
         actualDataNodes: ds_${0..1}.t_order_${0..1}
         keyGenerateStrategy:
           column: order_id
           keyGeneratorName: snowflake
         logicTable: t_order
         tableStrategy:
           standard:
             shardingAlgorithmName: t_order_inline
             shardingColumn: order_id
       t_order_item:
         actualDataNodes: ds_${0..1}.t_order_item_${0..1}
         keyGenerateStrategy:
           column: order_item_id
           keyGeneratorName: snowflake
         logicTable: t_order_item
         tableStrategy:
           standard:
             shardingAlgorithmName: t_order_item_inline
             shardingColumn: order_id
       t_user:
         actualDataNodes: ds_0.t_user_0
         logicTable: t_user
       t_user_new:
         actualDataNodes: ds_0.t_user_new_0
         logicTable: t_user_new
   - !READWRITE_SPLITTING
     dataSources:
       ms_group_0:
         loadBalancerName: ms_group_0_random
         readDataSourceNames:
         - replica_ds_0
         - replica_ds_1
         writeDataSourceName: primary_ds
     loadBalancers:
       ms_group_0_random:
         type: random
   
   ```
   
   After execute `alter readwrite splitting rule` statement, the metadata is:
   
   ```yaml
   !!map
   - !READWRITE_SPLITTING
     dataSources:
       ms_group_0:
         loadBalancerName: ms_group_0_ROUND_ROBIN
         readDataSourceNames:
         - replica_ds_0
         - replica_ds_1
         - replica_ds_2
         writeDataSourceName: primary_ds
     loadBalancers:
       ms_group_0_ROUND_ROBIN:
         props:
           read_weight: '''2:0'''
         type: ROUND_ROBIN
   ```
   
   ### Reason analyze (If you can)
   
   Not post all rules after execute `alter readwrite splitting rule` statement.


-- 
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 removed a comment on issue #10605: DistSQL metadata rules lost when execute alter readwrite splitting rule statement

Posted by GitBox <gi...@apache.org>.
strongduanmu removed a comment on issue #10605:
URL: https://github.com/apache/shardingsphere/issues/10605#issuecomment-855746766


   `ALTER SHARDING BINDING TABLE RULES` statement has the save problem.
   
   Before alter sharding binding table rules:
   
   ![image](https://user-images.githubusercontent.com/10829171/120988884-8afe6a00-c7b1-11eb-88f1-c028510ad732.png)
   
   After alter sharding binding table rules:
   
   ![image](https://user-images.githubusercontent.com/10829171/120988953-9c477680-c7b1-11eb-9b0e-4154cb16168e.png)
   


-- 
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 #10605: DistSQL metadata rules lost when execute alter readwrite splitting rule statement

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


   `ALTER DB_DISCOVERY RULE` statement has the save problem.
   
   ```yml
   !!map
   - !DB_DISCOVERY
     dataSources:
       ha_group_0:
         dataSourceNames:
         - resource0
         - resource1
         discoveryTypeName: ha_group_0_mgr
       ha_group_1:
         dataSourceNames:
         - resource0
         - resource1
         discoveryTypeName: ha_group_1_mgr
     discoveryTypes:
       ha_group_1_mgr:
         props:
           keepAliveCron: ''
           groupName: 92504d5b-6dec
         type: mgr
       ha_group_0_mgr:
         props:
           keepAliveCron: ''
           groupName: 92504d5b-6dec
         type: 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.

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



[GitHub] [shardingsphere] strongduanmu commented on issue #10605: DistSQL metadata rules lost when execute alter readwrite splitting rule statement

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


   `ALTER SHARDING BINDING TABLE RULES` statement has the save problem.
   
   Before alter sharding binding table rules:
   
   ![image](https://user-images.githubusercontent.com/10829171/120988884-8afe6a00-c7b1-11eb-88f1-c028510ad732.png)
   
   After alter sharding binding table rules:
   
   ![image](https://user-images.githubusercontent.com/10829171/120988953-9c477680-c7b1-11eb-9b0e-4154cb16168e.png)
   


-- 
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 #10605: DistSQL metadata rules lost when execute alter readwrite splitting rule statement

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


   `DROP READWRITE_SPLITTING RULE` statement has the save problem.
   
   ```
   !!map []
   ```


-- 
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] menghaoranss closed issue #10605: DistSQL metadata rules lost when execute alter readwrite splitting rule statement

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


   


-- 
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 #10605: DistSQL metadata rules lost when execute alter readwrite splitting rule statement

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


   `DROP DB_DISCOVERY RULE` statement has the save problem.
   
   ```yaml
   !!map []
   ```
   
   


-- 
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] menghaoranss commented on issue #10605: DistSQL metadata rules lost when execute alter readwrite splitting rule statement

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


   fixed


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