You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "Pace2Car (via GitHub)" <gi...@apache.org> on 2023/05/25 12:05:29 UTC

[GitHub] [shardingsphere] Pace2Car opened a new issue, #25894: ShardingRule does not verify the existence of the data source, at the startup stage

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

   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more details. 
   If no response anymore and we cannot reproduce it on current information, we will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   master b90e5a17
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   
   ### Expected behavior
   I use config like this
   ```yaml
   databaseName: sharding_db
   
   dataSources:
     ds_0:
       xxx
     ds_1:
       xxx
   
   rules:
   - !SHARDING
     defaultDatabaseStrategy:
       standard:
         shardingAlgorithmName: database_inline
         shardingColumn: user_id
     shardingAlgorithms:
       database_inline:
         props:
           algorithm-expression: readwrite_ds
         type: INLINE
       t_order_inline:
         props:
           algorithm-expression: t_order_$->{order_id % 2}
         type: INLINE
     tables:
       t_order:
         actualDataNodes: readwrite_ds.t_order_$->{0..1}
         logicTable: t_order
         tableStrategy:
           standard:
             shardingAlgorithmName: t_order_inline
             shardingColumn: order_id
   ```
   
   When initializing the ShardingRule, it should be checked that the database readwrite_ds does not exist.
   ### Actual behavior
   Proxy start successful
   
   ### Reason analyze (If you can)
   missing check
   


-- 
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] sandynz commented on issue #25894: ShardingRule does not verify the existence of the data source, at the startup stage

Posted by "sandynz (via GitHub)" <gi...@apache.org>.
sandynz commented on issue #25894:
URL: https://github.com/apache/shardingsphere/issues/25894#issuecomment-1563702461

   Hi @strongduanmu , could you help to verify it? Looks it's reasonable to do it, but maybe not in ShardingRule, readwrite_ds is initialized in other rules.


-- 
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] strongduanmu commented on issue #25894: ShardingRule does not verify the existence of the data source, at the startup stage

Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on issue #25894:
URL: https://github.com/apache/shardingsphere/issues/25894#issuecomment-1563809764

   Thank you for your remind, I will check the ShardingRule init logic.


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