duzhanfei opened a new issue #8621:
URL: https://github.com/apache/shardingsphere/issues/8621
I have config default route rule for table PSNL_POTN_CUST_CNTWY, but it
doesn‘t work.
config:
config-sharding.yaml
schemaName: sharding_db5
dataSourceCommon:
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
maintenanceIntervalMilliseconds: 30000
dataSources:
ds_0:
url:
jdbc:mysql://190.11.1.4:3306/test_db_0?serverTimezone=UTC&useSSL=false
username: root
password: root
ds_1:
url:
jdbc:mysql://190.11.1.5:3306/test_db_1?serverTimezone=UTC&useSSL=false
username: root
password: root
ds_2:
url:
jdbc:mysql://190.11.1.6:3306/test_db_2?serverTimezone=UTC&useSSL=false
username: root
password: root
ds_3:
url:
jdbc:mysql://190.11.1.7:3306/test_db_3?serverTimezone=UTC&useSSL=false
username: root
password: root
rules:
- !SHARDING
tables:
PBCST_QRY_INFO:
actualDataNodes: ds_${0..3}.PBCST_QRY_INFO_${0..15}
tableStrategy:
standard:
shardingColumn: ECIF_CUST_NO
shardingAlgorithmName: PBCST_QRY_INFO_inline
databaseStrategy:
standard:
shardingColumn: ECIF_CUST_NO
shardingAlgorithmName: database_inline
keyGenerateStrategy:
column: ECIF_CUST_NO
keyGeneratorName: snowflake
defaultDatabaseStrategy:
standard:
shardingColumn: ECIF_CUST_NO
shardingAlgorithmName: database_default
defaultTableStrategy:
none:
shardingAlgorithms:
database_default:
type: INLINE
props:
algorithm-expression: ds_0
database_inline:
type: INLINE
props:
algorithm-expression: ds_${Math.abs(ECIF_CUST_NO.hashCode() % 4)}
PBCST_QRY_INFO_inline:
type: INLINE
props:
algorithm-expression:
PBCST_QRY_INFO_${Math.abs(ECIF_CUST_NO.hashCode() % 16)}
keyGenerators:
snowflake:
type: SNOWFLAKE
props:
worker-id: 123
<img width="751" alt="图片1"
src="https://user-images.githubusercontent.com/46663706/102168661-968c6a80-3ecb-11eb-9d10-a94c72be04fe.png">
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]