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/09/16 08:55:38 UTC

[GitHub] [shardingsphere] peilinqian commented on issue #21013: After executing the "create sharding binding table rules (t_ssdb_tb_view, t_ssdb_tb);" statement, an error will be reported when the next SQL statement is executed

peilinqian commented on issue #21013:
URL: https://github.com/apache/shardingsphere/issues/21013#issuecomment-1249104759

   server.yaml
   ```
   mode:
     type: Cluster
     repository:
       type: ZooKeeper
       props:
         namespace: governance_ds
         server-lists: localhost:2181
         retryIntervalMilliseconds: 5000000
         timeToLiveSeconds: 6000000
         maxRetries: 3
         operationTimeoutMilliseconds: 5000000
     overwrite: true
   
   rules:
     - !AUTHORITY
       users:
         - root@%:root
         - sharding@:sharding
       provider:
         type: ALL_PERMITTED
     - !TRANSACTION
       defaultType: XA
       #providerType: Atomikos
       providerType: Narayana
   #  - !SQL_PARSER
   #    sqlCommentParseEnabled: true
   #    sqlStatementCache:
   #      initialCapacity: 2000
   #      maximumSize: 65535
   #    parseTreeCache:
   #      initialCapacity: 128
   #      maximumSize: 1024
   ```
   
   
   
   ```
   schemaName: test_db
   dataSources:
     ds1_0:
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 260
       minPoolSize: 1
       password: Test@123
       url: jdbc:opengauss://90.90.44.171:14000/test_db?batchMode=on
       username: tpccuser
     ds1_1:
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 260
       minPoolSize: 1
       password: Test@123
       url: jdbc:opengauss://90.90.44.171:15000/test_db?batchMode=on
       username: tpccuser
   rules:
   - !SHARDING
     tables:
       t_single:
         actualDataNodes: ds1_0.t_single
       t_single_view:
         actualDataNodes: ds1_0.t_single_view
       t_single_view_new:
         actualDataNodes: ds1_0.t_single_view_new
       t_ssdb_tb:
         actualDataNodes: ds1_${0..1}.t_ssdb_tb_${0..1}
         databaseStrategy:
           standard:
             shardingAlgorithmName: ds1_database_inline
             shardingColumn: id
         tableStrategy:
           standard:
             shardingColumn: c_id
             shardingAlgorithmName: ts_t_ssdb_tb_inline
       t_ssdb_tb_view:
         actualDataNodes: ds1_${0..1}.t_ssdb_tb_view_${0..1}
         databaseStrategy:
           standard:
             shardingAlgorithmName: ds1_database_inline
             shardingColumn: id
         tableStrategy:
           standard:
             shardingColumn: c_id
             shardingAlgorithmName: ts_t_ssdb_tb_view_inline
       t_ssdb:
         actualDataNodes: ds1_${0..1}.t_ssdb
         databaseStrategy:
           standard:
             shardingAlgorithmName: ds1_database_inline
             shardingColumn: id
       t_ssdb_view:
         actualDataNodes: ds1_${0..1}.t_ssdb_view
         databaseStrategy:
           standard:
             shardingAlgorithmName: ds1_database_inline
             shardingColumn: id
       t_ssdb_tb1:
         actualDataNodes: ds1_${0..1}.t_ssdb_tb1_${0..1}
         databaseStrategy:
           standard:
             shardingAlgorithmName: ds1_database_inline
             shardingColumn: id
         tableStrategy:
           standard:
             shardingColumn: c_id
             shardingAlgorithmName: ts_t_ssdb_tb1_inline
       t_ssdb_tb2:
         actualDataNodes: ds1_${0..1}.t_ssdb_tb2_${0..1}
         databaseStrategy:
           standard:
             shardingAlgorithmName: ds_t_ssdb_tb2_inline
             shardingColumn: id
         tableStrategy:
           standard:
             shardingColumn: c_id
             shardingAlgorithmName: ts_t_ssdb_tb2_inline
     broadcastTables:
       - t_broadcast
       - t_broadcast_view
     bindingTables:
       - t_ssdb_tb, t_ssdb_tb_view, t_ssdb_tb1
     defaultTableStrategy:
       none:
     defaultDatabaseStrategy:
       none:
     shardingAlgorithms:
       ds1_database_inline:
         type: INLINE
         props:
           algorithm-expression: ds1_${id % 2}
           allow-range-query-with-inline-sharding: true
       ts_t_ssdb_tb_inline:
         type: INLINE
         props:
           algorithm-expression: t_ssdb_tb_${c_id % 2}
           allow-range-query-with-inline-sharding: true
       ts_t_ssdb_tb1_inline:
         type: INLINE
         props:
           algorithm-expression: t_ssdb_tb1_${c_id % 2}
           allow-range-query-with-inline-sharding: true
       ts_t_ssdb_tb_view_inline:
         type: INLINE
         props:
           algorithm-expression: t_ssdb_tb_view_${c_id % 2}
           allow-range-query-with-inline-sharding: true
       ds_t_ssdb_tb2_inline:
         type: INLINE
         props:
           algorithm-expression: ds1_${id % 2}
       ts_t_ssdb_tb2_inline:
         type: INLINE
         props:
           algorithm-expression: t_ssdb_tb2_${c_id % 2}
           allow-range-query-with-inline-sharding: true
   
   ```
   


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