18835572909 opened a new issue, #37081: URL: https://github.com/apache/shardingsphere/issues/37081
<img width="2945" height="1973" alt="Image" src="https://github.com/user-attachments/assets/f885d995-63c9-4ecf-aa50-a21eb07a8c7a" /> ``` Version ``` Springboot 2.7.18 ShardingJdbc 5.3.2 ``` Resource step ``` PartialSQLRouteExecutor#route => step1: sharding rule => RouteUnit(dataSourceMap<db_1,db_1>, tableMap<order_tlb,order_tlb_1>); => step2: shadow rule => ShadowSQLRouter#decorateRouteContext =>AbstractShadowDMLStatementRouteEngine#route =>ShadowRouteEngine#decorateRouteContext ``` yml ``` props: sql-show: true dataSources: db_0: dataSourceClassName: com.zaxxer.hikari.HikariDataSource driverClassName: com.mysql.jdbc.Driver jdbcUrl: jdbc:mysql://ip1:3306/db_0?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true username: root password: *** db_1: dataSourceClassName: com.zaxxer.hikari.HikariDataSource driverClassName: com.mysql.jdbc.Driver jdbcUrl: jdbc:mysql://ip1:3306/db_1?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true username: root password: *** shadow_0: dataSourceClassName: com.zaxxer.hikari.HikariDataSource driverClassName: com.mysql.jdbc.Driver jdbcUrl: jdbc:mysql://ip1:3306/shadow_0?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true username: root password: *** shadow_1: dataSourceClassName: com.zaxxer.hikari.HikariDataSource driverClassName: com.mysql.jdbc.Driver jdbcUrl: jdbc:mysql://ip1:3306/shadow_1?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true username: root password: *** rules: - !SHARDING shardingAlgorithms: table_inline: type: INLINE props: algorithm-expression: order_tbl_$->{Math.abs(order_no.hashCode()) % 2} database_inline: type: INLINE props: algorithm-expression: db_$->{Math.abs(user_id.hashCode()) % 2} defaultDatabaseStrategy: standard: shardingColumn: user_id shardingAlgorithmName: database_inline defaultTableStrategy: standard: shardingColumn: order_no shardingAlgorithmName: table_inline tables: order_tbl: actualDataNodes: db_$->{0..1}.order_tbl_$->{0..1} - !SHADOW dataSources: shadowDataSource1: productionDataSourceName: db_1 shadowDataSourceName: shadow_1 tables: order_tbl: dataSourceNames: - shadowDataSource1 shadowAlgorithmNames: - user_id_value shadowAlgorithms: user_id_value: type: VALUE_MATCH props: operation: select column: user_id value: x3 -- 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]
