duzhanfei opened a new issue #8913:
URL: https://github.com/apache/shardingsphere/issues/8913
### Which version of ShardingSphere did you use?
5.0.0-alpha
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
When I insert data with shardingproxy5.0.0-alpha, the null pointer is
prompted, but my sharding key is not empty. Everything works fine with
shardingproxy4.1.1
configļ¼
schemaName: sharding_db
dataSourceCommon:
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
maintenanceIntervalMilliseconds: 30000
dataSources:
ds_0:
url: jdbc:mysql://192.2.171.54:3306/db_0?serverTimezone=UTC&useSSL=false
username: crmuser
password: crm123
ds_1:
url: jdbc:mysql://192.2.171.55:3306/db_1?serverTimezone=UTC&useSSL=false
username: crmuser
password: crm123
ds_2:
url: jdbc:mysql://192.2.171.56:3306/db_2?serverTimezone=UTC&useSSL=false
username: crmuser
password: crm123
ds_3:
url: jdbc:mysql://192.2.171.57:3306/db_3?serverTimezone=UTC&useSSL=false
username: crmuser
password: crm123
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
----------------------------------------------------------------
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]