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/04/12 01:32:53 UTC

[GitHub] [shardingsphere] newchendb commented on issue #16750: Will shardingjdbc programs run on machines with sharding-proxy deployed be affected

newchendb commented on issue #16750:
URL: https://github.com/apache/shardingsphere/issues/16750#issuecomment-1095783900

   This is the configuration of shardingjdbc 
   `
   spring.shardingsphere.mode.type=Standalone
   spring.shardingsphere.mode.repository.type=File
   spring.shardingsphere.mode.overwrite=true
   
   spring.shardingsphere.props.sql-show=true
   
   spring.shardingsphere.schema.name=saas_charge_order
   
   spring.shardingsphere.datasource.names=write-ds-0,write-ds-1,write-ds-0-read-0,write-ds-1-read-0
   
   spring.shardingsphere.datasource.write-ds-0.jdbc-url=jdbc:mysql://10.0.0.15:3306/saas_charge_order?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
   spring.shardingsphere.datasource.write-ds-0.type=com.zaxxer.hikari.HikariDataSource
   spring.shardingsphere.datasource.write-ds-0.driver-class-name=com.mysql.jdbc.Driver
   spring.shardingsphere.datasource.write-ds-0.username=ydzsaasdb
   spring.shardingsphere.datasource.write-ds-0.password=123456
   spring.shardingsphere.datasource.write-ds-0.max-active=100
   
   spring.shardingsphere.datasource.write-ds-0-read-0.jdbc-url=jdbc:mysql://10.0.0.8:3306/saas_charge_order?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
   spring.shardingsphere.datasource.write-ds-0-read-0.type=com.zaxxer.hikari.HikariDataSource
   spring.shardingsphere.datasource.write-ds-0-read-0.driver-class-name=com.mysql.jdbc.Driver
   spring.shardingsphere.datasource.write-ds-0-read-0.username=ydzsaasdb
   spring.shardingsphere.datasource.write-ds-0-read-0.password=123456
   spring.shardingsphere.datasource.write-ds-0-read-0.max-active=100
   
   spring.shardingsphere.datasource.write-ds-1.jdbc-url=jdbc:mysql://10.0.0.8:3307/saas_charge_order?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
   spring.shardingsphere.datasource.write-ds-1.type=com.zaxxer.hikari.HikariDataSource
   spring.shardingsphere.datasource.write-ds-1.driver-class-name=com.mysql.jdbc.Driver
   spring.shardingsphere.datasource.write-ds-1.username=ydzsaasdb
   spring.shardingsphere.datasource.write-ds-1.password=123456
   spring.shardingsphere.datasource.write-ds-1.max-active=100
   
   spring.shardingsphere.datasource.write-ds-1-read-0.jdbc-url=jdbc:mysql://10.0.0.15:3307/saas_charge_order?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
   spring.shardingsphere.datasource.write-ds-1-read-0.type=com.zaxxer.hikari.HikariDataSource
   spring.shardingsphere.datasource.write-ds-1-read-0.driver-class-name=com.mysql.jdbc.Driver
   spring.shardingsphere.datasource.write-ds-1-read-0.username=ydzsaasdb
   spring.shardingsphere.datasource.write-ds-1-read-0.password=123456
   spring.shardingsphere.datasource.write-ds-1-read-0.max-active=100
   
   
   spring.shardingsphere.rules.sharding.tables.t_charge_unpaid.actual-data-nodes=ds-$->{0..1}.t_charge_unpaid
   spring.shardingsphere.rules.sharding.tables.t_charge_info_unpaid.actual-data-nodes=ds-$->{0..1}.t_charge_info_unpaid
   spring.shardingsphere.rules.sharding.tables.undo_log.actual-data-nodes=ds-$->{0..1}.undo_log
   
   spring.shardingsphere.rules.sharding.tables.t_charge.actual-data-nodes=ds-$->{0..1}.t_charge_$->{2022..2025}0$->{1..9},ds-$->{0..1}.t_charge_$->{2022..2025}1$->{0..2}
   spring.shardingsphere.rules.sharding.tables.t_charge.table-strategy.standard.sharding-column=upload_time
   spring.shardingsphere.rules.sharding.tables.t_charge.table-strategy.standard.sharding-algorithm-name=s-month-inline
   
   spring.shardingsphere.rules.sharding.tables.t_charge_info.actual-data-nodes=ds-$->{0..1}.t_charge_info_$->{2022..2025}0$->{1..9},ds-$->{0..1}.t_charge_info_$->{2022..2025}1$->{0..2}
   spring.shardingsphere.rules.sharding.tables.t_charge_info.table-strategy.standard.sharding-column=upload_time
   spring.shardingsphere.rules.sharding.tables.t_charge_info.table-strategy.standard.sharding-algorithm-name=s-month-inline
   
   spring.shardingsphere.rules.sharding.tables.t_stats_skgroup_daily.actual-data-nodes=ds-$->{0..1}.t_stats_skgroup_daily_$->{2022..2025}0$->{1..9},ds-$->{0..1}.t_stats_skgroup_daily_$->{2022..2025}1$->{0..2}
   spring.shardingsphere.rules.sharding.tables.t_stats_skgroup_daily.table-strategy.standard.sharding-column=stats_date
   spring.shardingsphere.rules.sharding.tables.t_stats_skgroup_daily.table-strategy.standard.sharding-algorithm-name=s-month-inline
   
   spring.shardingsphere.rules.sharding.tables.t_charge_process.actual-data-nodes=ds-$->{0..1}.t_charge_process_$->{2022..2025}0$->{1..9},ds-$->{0..1}.t_charge_process_$->{2022..2025}1$->{0..2}
   spring.shardingsphere.rules.sharding.tables.t_charge_process.table-strategy.standard.sharding-column=upload_time
   spring.shardingsphere.rules.sharding.tables.t_charge_process.table-strategy.standard.sharding-algorithm-name=s-month-inline
   
   spring.shardingsphere.rules.sharding.tables.t_evcipa_notify_order.actual-data-nodes=ds-$->{0..1}.t_evcipa_notify_order_$->{2022..2025}0$->{1..9},ds-$->{0..1}.t_evcipa_notify_order_$->{2022..2025}1$->{0..2}
   spring.shardingsphere.rules.sharding.tables.t_evcipa_notify_order.table-strategy.standard.sharding-column=order_upload_time
   spring.shardingsphere.rules.sharding.tables.t_evcipa_notify_order.table-strategy.standard.sharding-algorithm-name=s-month-inline
   
   spring.shardingsphere.rules.sharding.tables.t_evcipa_notify_order_detail.actual-data-nodes=ds-$->{0..1}.t_evcipa_notify_order_detail_$->{2022..2025}0$->{1..9},ds-$->{0..1}.t_evcipa_notify_order_detail_$->{2022..2025}1$->{0..2}
   spring.shardingsphere.rules.sharding.tables.t_evcipa_notify_order_detail.table-strategy.standard.sharding-column=occur_time
   spring.shardingsphere.rules.sharding.tables.t_evcipa_notify_order_detail.table-strategy.standard.sharding-algorithm-name=s-month-inline
   
   spring.shardingsphere.rules.sharding.tables.t_evcipa_notify_checkorder.actual-data-nodes=ds-$->{0..1}.t_evcipa_notify_checkorder_$->{2022..2025}
   spring.shardingsphere.rules.sharding.tables.t_evcipa_notify_checkorder.table-strategy.standard.sharding-column=start_time
   spring.shardingsphere.rules.sharding.tables.t_evcipa_notify_checkorder.table-strategy.standard.sharding-algorithm-name=s-year-inline
   
   spring.shardingsphere.rules.sharding.binding-tables[0]=t_charge,t_charge_info,t_evcipa_notify_order,t_evcipa_notify_order_detail
   spring.shardingsphere.rules.sharding.binding-tables[1]=t_charge_unpaid,t_charge_info_unpaid
   spring.shardingsphere.rules.sharding.binding-tables[2]=t_charge_process
   spring.shardingsphere.rules.sharding.binding-tables[3]=t_evcipa_notify_checkorder
   spring.shardingsphere.rules.sharding.broadcast-tables=undo_log
   
   spring.shardingsphere.rules.sharding.default-database-strategy.standard.sharding-column=saas_id
   spring.shardingsphere.rules.sharding.default-database-strategy.standard.sharding-algorithm-name=database-inline
   
   spring.shardingsphere.rules.sharding.sharding-algorithms.database-inline.type=INLINE
   spring.shardingsphere.rules.sharding.sharding-algorithms.database-inline.props.algorithm-expression=ds-$->{saas_id % 2}
   spring.shardingsphere.rules.sharding.sharding-algorithms.s-year-inline.type=INTERVAL
   spring.shardingsphere.rules.sharding.sharding-algorithms.s-year-inline.props.datetime-interval-unit=YEARS
   spring.shardingsphere.rules.sharding.sharding-algorithms.s-year-inline.props.datetime-interval-amount=1
   spring.shardingsphere.rules.sharding.sharding-algorithms.s-year-inline.props.sharding-suffix-pattern=yyyy
   spring.shardingsphere.rules.sharding.sharding-algorithms.s-year-inline.props.datetime-pattern=yyyy-MM-dd HH:mm:ss
   spring.shardingsphere.rules.sharding.sharding-algorithms.s-year-inline.props.datetime-lower=2022-01-01 00:00:00
   spring.shardingsphere.rules.sharding.sharding-algorithms.s-year-inline.props.datetime-upper=2025-12-31 23:59:59
   spring.shardingsphere.rules.sharding.sharding-algorithms.s-month-inline.type=INTERVAL
   spring.shardingsphere.rules.sharding.sharding-algorithms.s-month-inline.props.datetime-interval-unit=MONTHS
   spring.shardingsphere.rules.sharding.sharding-algorithms.s-month-inline.props.datetime-interval-amount=1
   spring.shardingsphere.rules.sharding.sharding-algorithms.s-month-inline.props.sharding-suffix-pattern=yyyyMM
   spring.shardingsphere.rules.sharding.sharding-algorithms.s-month-inline.props.datetime-pattern=yyyy-MM-dd HH:mm:ss
   spring.shardingsphere.rules.sharding.sharding-algorithms.s-month-inline.props.datetime-lower=2022-01-01 00:00:00
   spring.shardingsphere.rules.sharding.sharding-algorithms.s-month-inline.props.datetime-upper=2025-12-31 23:59:59
   
   spring.shardingsphere.rules.sharding.key-generators.snowflake.type=WINSKY
   spring.shardingsphere.rules.sharding.key-generators.snowflake.props.worker-id=123
   
   spring.shardingsphere.rules.readwrite-splitting.data-sources.ds-0.type=Static
   spring.shardingsphere.rules.readwrite-splitting.data-sources.ds-0.props.write-data-source-name=write-ds-0
   spring.shardingsphere.rules.readwrite-splitting.data-sources.ds-0.props.read-data-source-names=write-ds-0-read-0
   spring.shardingsphere.rules.readwrite-splitting.data-sources.ds-1.type=Static
   spring.shardingsphere.rules.readwrite-splitting.data-sources.ds-1.props.write-data-source-name=write-ds-1
   spring.shardingsphere.rules.readwrite-splitting.data-sources.ds-1.props.read-data-source-names=write-ds-1-read-0
   
   `
   
   This is the version information of shardingjdbc
   `
           <!-- seata -->
           <dependency>
               <groupId>io.seata</groupId>
               <artifactId>seata-spring-boot-starter</artifactId>
               <version>1.4.2</version>
           </dependency>
           <dependency>
               <groupId>com.alibaba.cloud</groupId>
               <artifactId>spring-cloud-starter-alibaba-seata</artifactId>
               <exclusions>
                   <exclusion>
                       <groupId>io.seata</groupId>
                       <artifactId>seata-spring-boot-starter</artifactId>
                   </exclusion>
               </exclusions>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-transaction-base-seata-at</artifactId>
               <version>5.1.0</version>
           </dependency>
           <!--database-->
           <dependency>
               <groupId>mysql</groupId>
               <artifactId>mysql-connector-java</artifactId>
               <version>5.1.49</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
               <version>5.1.0</version>
           </dependency>
   `


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