huangdx0726 commented on PR #19949:
URL: https://github.com/apache/shardingsphere/pull/19949#issuecomment-1209171268

   My local proxy conf is used: `server.yaml`
   ```yaml
   #
   # Licensed to the Apache Software Foundation (ASF) under one or more
   # contributor license agreements.  See the NOTICE file distributed with
   # this work for additional information regarding copyright ownership.
   # The ASF licenses this file to You under the Apache License, Version 2.0
   # (the "License"); you may not use this file except in compliance with
   # the License.  You may obtain a copy of the License at
   #
   #     http://www.apache.org/licenses/LICENSE-2.0
   #
   # Unless required by applicable law or agreed to in writing, software
   # distributed under the License is distributed on an "AS IS" BASIS,
   # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   # See the License for the specific language governing permissions and
   # limitations under the License.
   #
   
   
######################################################################################################
   # 
   # If you want to configure governance, authorization and proxy properties, 
please refer to this file.
   # 
   
######################################################################################################
   
   mode:
     type: Standalone
   #  repository:
   #    type: ZooKeeper
   #    props:
   #      namespace: governance_ds
   #      server-lists: localhost:2181
   #      retryIntervalMilliseconds: 500
   #      timeToLiveSeconds: 60
   #      maxRetries: 3
   #      operationTimeoutMilliseconds: 500
   #  overwrite: false
   #
   rules:
     - !AUTHORITY
       users:
         - root@:Root@123
       provider:
         type: ALL_PERMITTED
   
   props:
     max-connections-size-per-query: 1
     kernel-executor-size: 16  # Infinite by default.
     proxy-frontend-flush-threshold: 128  # The default value is 128.
     proxy-hint-enabled: true
     sql-show: true
     sql-federation-enabled: true
     proxy-mysql-default-version: 5.7.22
     proxy-default-port: 3308 # Proxy default port.
   #  proxy-netty-backlog: 1024 # Proxy netty backlog.
   ```
   `config-sharding.yaml` 
   ```yaml
   #
   # Licensed to the Apache Software Foundation (ASF) under one or more
   # contributor license agreements.  See the NOTICE file distributed with
   # this work for additional information regarding copyright ownership.
   # The ASF licenses this file to You under the Apache License, Version 2.0
   # (the "License"); you may not use this file except in compliance with
   # the License.  You may obtain a copy of the License at
   #
   #     http://www.apache.org/licenses/LICENSE-2.0
   #
   # Unless required by applicable law or agreed to in writing, software
   # distributed under the License is distributed on an "AS IS" BASIS,
   # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   # See the License for the specific language governing permissions and
   # limitations under the License.
   #
   
   
######################################################################################################
   # 
   # Here you can configure the rules for the proxy.
   # This example is configuration of sharding rule.
   # 
   
######################################################################################################
   #
   databaseName: sharding_db
   #
   #dataSources:
   #  ds_0:
   #    url: jdbc:postgresql://127.0.0.1:5432/demo_ds_0
   #    username: postgres
   #    password: postgres
   #    connectionTimeoutMilliseconds: 30000
   #    idleTimeoutMilliseconds: 60000
   #    maxLifetimeMilliseconds: 1800000
   #    maxPoolSize: 50
   #    minPoolSize: 1
   #  ds_1:
   #    url: jdbc:postgresql://127.0.0.1:5432/demo_ds_1
   #    username: postgres
   #    password: postgres
   #    connectionTimeoutMilliseconds: 30000
   #    idleTimeoutMilliseconds: 60000
   #    maxLifetimeMilliseconds: 1800000
   #    maxPoolSize: 50
   #    minPoolSize: 1
   #
   #rules:
   #- !SHARDING
   #  tables:
   #    t_order:
   #      actualDataNodes: ds_${0..1}.t_order_${0..1}
   #      tableStrategy:
   #        standard:
   #          shardingColumn: order_id
   #          shardingAlgorithmName: t_order_inline
   #      keyGenerateStrategy:
   #        column: order_id
   #        keyGeneratorName: snowflake
   #      auditStrategy:
   #        auditorNames:
   #          - sharding_key_required_auditor
   #        allowHintDisable: true
   #    t_order_item:
   #      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
   #      tableStrategy:
   #        standard:
   #          shardingColumn: order_id
   #          shardingAlgorithmName: t_order_item_inline
   #      keyGenerateStrategy:
   #        column: order_item_id
   #        keyGeneratorName: snowflake
   #  bindingTables:
   #    - t_order,t_order_item
   #  defaultDatabaseStrategy:
   #    standard:
   #      shardingColumn: user_id
   #      shardingAlgorithmName: database_inline
   #  defaultTableStrategy:
   #    none:
   #  defaultAuditStrategy:
   #    auditorNames:
   #      - sharding_key_required_auditor
   #    allowHintDisable: true
   #
   #  shardingAlgorithms:
   #    database_inline:
   #      type: INLINE
   #      props:
   #        algorithm-expression: ds_${user_id % 2}
   #    t_order_inline:
   #      type: INLINE
   #      props:
   #        algorithm-expression: t_order_${order_id % 2}
   #    t_order_item_inline:
   #      type: INLINE
   #      props:
   #        algorithm-expression: t_order_item_${order_id % 2}
   #
   #  keyGenerators:
   #    snowflake:
   #      type: SNOWFLAKE
   #
   #  auditors:
   #    sharding_key_required_auditor:
   #      type: DML_SHARDING_CONDITIONS
   #
   #  scalingName: default_scaling
   #  scaling:
   #    default_scaling:
   #      input:
   #        workerThread: 40
   #        batchSize: 1000
   #      output:
   #        workerThread: 40
   #        batchSize: 1000
   #      streamChannel:
   #        type: MEMORY
   #        props:
   #          block-queue-size: 10000
   #      completionDetector:
   #        type: IDLE
   #        props:
   #          incremental-task-idle-seconds-threshold: 1800
   #      dataConsistencyChecker:
   #        type: DATA_MATCH
   #        props:
   #          chunk-size: 1000
   
   
######################################################################################################
   #
   # If you want to connect to MySQL, you should manually copy MySQL driver to 
lib directory.
   #
   
######################################################################################################
   
   #databaseName: sharding_db
   #
   dataSources:
     ds_0:
       url: 
jdbc:mysql://127.0.0.1:3307/demo_ds_0?serverTimezone=UTC&useSSL=false
       username: root
       password: root
   #    connectionTimeoutMilliseconds: 30000
   #    idleTimeoutMilliseconds: 60000
   #    maxLifetimeMilliseconds: 1800000
   #    maxPoolSize: 50
   #    minPoolSize: 1
     ds_1:
       url: 
jdbc:mysql://127.0.0.1:3307/demo_ds_1?serverTimezone=UTC&useSSL=false
       username: root
       password: root
   #    connectionTimeoutMilliseconds: 30000
   #    idleTimeoutMilliseconds: 60000
   #    maxLifetimeMilliseconds: 1800000
   #    maxPoolSize: 50
   #    minPoolSize: 1
   #
   rules:
   - !SHARDING
     tables:
       t_order:
         actualDataNodes: ds_${0..1}.t_order_${0..1}
         tableStrategy:
           standard:
             shardingColumn: order_id
             shardingAlgorithmName: t_order_inline
         keyGenerateStrategy:
           column: order_id
           keyGeneratorName: snowflake
         auditStrategy:
           auditorNames:
             - sharding_key_required_auditor
           allowHintDisable: true
       t_order_item:
         actualDataNodes: ds_${0..1}.t_order_item_${0..1}
         tableStrategy:
           standard:
             shardingColumn: order_id
             shardingAlgorithmName: t_order_item_inline
         keyGenerateStrategy:
           column: order_item_id
           keyGeneratorName: snowflake
     bindingTables:
       - t_order,t_order_item
     defaultDatabaseStrategy:
       standard:
         shardingColumn: user_id
         shardingAlgorithmName: database_inline
     defaultTableStrategy:
       none:
     defaultAuditStrategy:
       auditorNames:
         - sharding_key_required_auditor
       allowHintDisable: true
   
     shardingAlgorithms:
       database_inline:
         type: INLINE
         props:
           algorithm-expression: ds_${user_id % 2}
       t_order_inline:
         type: INLINE
         props:
           algorithm-expression: t_order_${order_id % 2}
       t_order_item_inline:
         type: INLINE
         props:
           algorithm-expression: t_order_item_${order_id % 2}
   
     keyGenerators:
       snowflake:
         type: SNOWFLAKE
   
     auditors:
       sharding_key_required_auditor:
         type: DML_SHARDING_CONDITIONS
   
     scalingName: default_scaling
     scaling:
       default_scaling:
         input:
           workerThread: 40
           batchSize: 1000
         output:
           workerThread: 40
           batchSize: 1000
         streamChannel:
           type: MEMORY
           props:
             block-queue-size: 10000
         completionDetector:
           type: IDLE
           props:
             incremental-task-idle-seconds-threshold: 1800
         dataConsistencyChecker:
           type: DATA_MATCH
           props:
             chunk-size: 1000
   
   ```


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