yunqian-c9 commented on issue #12759:
URL: 
https://github.com/apache/shardingsphere/issues/12759#issuecomment-938462550


   @strongduanmu  
   
   **config-sharding.yaml:**
   
   ```yaml
   schemaName: data_test
   
   dataSources:
    ds_0:
      url: jdbc:mysql://127.0.0.1:3336/data_test?serverTimezone=UTC&useSSL=false
      username: root
      password: root
      connectionTimeoutMilliseconds: 30000
      idleTimeoutMilliseconds: 60000
      maxLifetimeMilliseconds: 1800000
      maxPoolSize: 50
      minPoolSize: 1
      maintenanceIntervalMilliseconds: 30000
    ds_1:
      url: jdbc:mysql://127.0.0.1:3337/data_test?serverTimezone=UTC&useSSL=false
      username: root
      password: root
      connectionTimeoutMilliseconds: 30000
      idleTimeoutMilliseconds: 60000
      maxLifetimeMilliseconds: 1800000
      maxPoolSize: 50
      minPoolSize: 1
      maintenanceIntervalMilliseconds: 30000
   
   rules:
   - !SHARDING
    tables:
      white_slice:
        actualDataNodes: ds_${0..1}.white_slice_${0..3}
        tableStrategy:
          standard:
            shardingColumn: callee
            shardingAlgorithmName: white_inline
        keyGenerateStrategy:
          column: id
          keyGeneratorName: snowflake
    bindingTables:
      - white_slice
    defaultDatabaseStrategy:
      standard:
        shardingColumn: id
        shardingAlgorithmName: database_inline
    defaultTableStrategy:
      none:
    
    shardingAlgorithms:
      database_inline:
        type: INLINE
        props:
          algorithm-expression: ds_${id % 2}
      white_inline:
        type: HASH_MOD
        props:
          sharding-count: 4
    
    keyGenerators:
      snowflake:
        type: SNOWFLAKE
        props:
          worker-id: 123
   
   ```
   
   **server.yaml**
   
   ```yaml
   scaling:
     blockQueueSize: 10000
     workerThread: 40
     clusterAutoSwitchAlgorithm:
       type: IDLE
       props:
         incremental-task-idle-minute-threshold: 30
     dataConsistencyCheckAlgorithm:
       type: DEFAULT
   
   rules:
     - !AUTHORITY
       users:
         - root@%:root
         - sharding@:sharding
       provider:
         type: ALL_PRIVILEGES_PERMITTED
     - !TRANSACTION
       defaultType: XA
       providerType: Atomikos
   props:
     max-connections-size-per-query: 3
     kernel-executor-size: 16  # Infinite by default.
     proxy-frontend-flush-threshold: 128  # The default value is 128.
     proxy-opentracing-enabled: false
     proxy-hint-enabled: false
     sql-show: true
     check-table-metadata-enabled: false
     lock-wait-timeout-milliseconds: 50000 # The maximum time to wait for a lock
     show-process-list-enabled: false
       # Proxy backend query fetch size. A larger value may increase the memory 
usage of ShardingSphere Proxy.
       # The default value is -1, which means set the minimum value for 
different JDBC drivers.
     proxy-backend-query-fetch-size: -1
     check-duplicate-table-enabled: false
     sql-comment-parse-enabled: false
     proxy-frontend-executor-size: 0 # Proxy frontend executor size. The 
default value is 0, which means let Netty decide.
       # Available options of proxy backend executor suitable: OLAP(default), 
OLTP. The OLTP option may reduce time cost of writing packets to client, but it 
may increase the latency of SQL execution
       # if client connections are more than 
proxy-frontend-netty-executor-size, especially executing slow SQL.
     proxy-backend-executor-suitable: OLAP
   ```
   
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to