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

[I] Storage units `[ds_0]` do not exist in database `database_name`. [shardingsphere]

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

                 I have same error. [44000][19001] Storage units `[ds_0]` do not exist in database `database_name`.
   
   version 5.7.21-log-ShardingSphere-Proxy 5.4.1.
   docker image apache/shardingsphere-proxy
   
   ```yml
   databaseName: database_name
   
   dataSources:
    ds_0:
      url: jdbc:mysql://127.0.0.1:3306/db?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&rewriteBatchedStatements=true&serverTimezone=Asia/Shanghai&useSSL=false&zeroDateTimeBehavior=convertToNull      
      username: root
      password: 123456
      connectionTimeoutMilliseconds: 30000
      idleTimeoutMilliseconds: 60000
      maxLifetimeMilliseconds: 1800000
      maxPoolSize: 50
      minPoolSize: 1
   
   rules:
   - !SINGLE
     tables:
       - ds_0.*
     defaultDataSource: ds_0
   - !SHARDING
    tables:
      lingxing_amz_order_list:
        actualDataNodes: ds_0.lingxing_amz_order_list_${0..2}
        tableStrategy:
          standard:
            shardingColumn: amazon_order_id
            shardingAlgorithmName: order_hash_mod
        keyGenerateStrategy:
           column: id
           keyGeneratorName: snowflake
        auditStrategy:
          auditorNames:
            - sharding_key_required_auditor
          allowHintDisable: true
      lingxing_amz_order_list_item:
        actualDataNodes: ds_0.lingxing_amz_order_list_item_${0..2}
        tableStrategy:
          standard:
            shardingColumn: amazon_order_id
            shardingAlgorithmName: order_hash_mod
        keyGenerateStrategy:
           column: id
           keyGeneratorName: snowflake
        auditStrategy:
          auditorNames:
            - sharding_key_required_auditor
          allowHintDisable: true
      lingxing_amz_order_detail_item:
        actualDataNodes: ds_0.lingxing_amz_order_detail_item_${0..2}
        tableStrategy:
          standard:
            shardingColumn: amazon_order_id
            shardingAlgorithmName: order_hash_mod
        keyGenerateStrategy:
           column: id
           keyGeneratorName: snowflake
        auditStrategy:
          auditorNames:
            - sharding_key_required_auditor
          allowHintDisable: true
    bindingTables:
      - lingxing_amz_order_list,lingxing_amz_order_list_item,lingxing_amz_order_detail_item
    shardingAlgorithms:
      order_hash_mod:
        type: HASH_MOD
        props:
          sharding-count: 128
    keyGenerators:
      snowflake:
        type: SNOWFLAKE
    auditors:
      sharding_key_required_auditor:
        type: DML_SHARDING_CONDITIONS
   ```
   
   _Originally posted by @wnose in https://github.com/apache/shardingsphere/issues/23576#issuecomment-1845196767_
               


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


Re: [I] Storage units `[ds_0]` do not exist in database `database_name`. [shardingsphere]

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

     The error you're encountering [44000][19001] Storage units [ds_0] do not exist in database database_name is a typical metadata synchronization issue.
   
   ##  Root Cause Analysis
   
     Core Issue: Asynchronous metadata refresh mechanism without strong consistency guarantees.
   
     Specifically:
     1. Asynchronous Metadata Refresh: In the open-source version of ShardingSphere, data source registration and metadata initialization happen asynchronously during configuration loading
     2. Lack of Strong Consistency: In distributed environments, real-time synchronization of metadata states across all nodes cannot be guaranteed
     3. Timing Race Condition: Rule validation may execute before metadata is completely registered, causing failure to find already configured data sources
   
     This is a design trade-off in the open-source version, sacrificing strong consistency for performance.
   
   ##  Enterprise Edition Solution
   
     To address this core problem, our enterprise edition product DBPlusEngine, developed based on ShardingSphere, has solved this fundamental issue:
   
     - Strong Consistency Metadata Management: Ensures real-time metadata synchronization in distributed environments
     - Synchronous Metadata Refresh: Guarantees atomicity and consistency during configuration changes
     - Enterprise-grade Stability: Provides higher reliability and failure recovery capabilities
   
   ##  Learn More
   
     If you have deeper requirements for this issue, you're welcome to explore more information:
   
     - Company Website: https://www.sphere-ex.com/
     - Open Source vs Enterprise Edition Comparison: https://www.sphere-ex.cn/comparison/
     - Contact: You can reach out to our technical team through the website for in-depth discussions
   
   ##  Temporary Solutions
   
     For the open-source version, you can try:
   
     1. Restart Proxy Service: Allow metadata to reinitialize
     2. Add Startup Delay: Ensure database is fully ready before starting Proxy
     3. Monitor Startup Logs: Confirm data source registration is successful before proceeding
     4. Configuration Optimization: Adjust connection pool parameters to improve connection stability
   
     Hope this information is helpful to you!
   


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


Re: [I] Storage units `[ds_0]` do not exist in database `database_name`. [shardingsphere]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #29323:
URL: https://github.com/apache/shardingsphere/issues/29323#issuecomment-1925899104

   There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.


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


Re: [I] Storage units `[ds_0]` do not exist in database `database_name`. [shardingsphere]

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

   Thanks for your feedback, this is an occasional problem of metadata refresh and will be dealt with centrally.


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


Re: [I] Storage units `[ds_0]` do not exist in database `database_name`. [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu closed issue #29323: Storage units `[ds_0]` do not exist in database `database_name`.
URL: https://github.com/apache/shardingsphere/issues/29323


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


Re: [I] Storage units `[ds_0]` do not exist in database `database_name`. [shardingsphere]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #29323:
URL: https://github.com/apache/shardingsphere/issues/29323#issuecomment-3577961904

   There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.


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


Re: [I] Storage units `[ds_0]` do not exist in database `database_name`. [shardingsphere]

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

   link to #29574


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


Re: [I] Storage units `[ds_0]` do not exist in database `database_name`. [shardingsphere]

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

   Thank you!


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