Issue 1:
The shardingsphere version is 5.0.0.beta,database is mysql.

shardingsphere does not report errors：

2021-11-03 10:45:38.836|biz-e3424a198605469bb31139f9767fe21b||SQLLogger.java|74|INFO||||||[XNIO-1 task-1] Logic SQL: insert into t_pipeline_info (PIPELINE_ID, PROJECT_ID, PIPELINE_NAME, PIPELINE_DESC) values (?, ?, ?, ?) on duplicate key update t_pipeline_info.PIPELINE_DESC = ?

2021-11-03 10:45:38.837|biz-e3424a198605469bb31139f9767fe21b||SQLLogger.java|74|INFO||||||[XNIO-1 task-1] SQLStatement: MySQLInsertStatement(setAssignment=Optional.empty, onDuplicateKeyColumns=Optional[org.apache.shardingsphere.sql.parser.sql.common.segment.dml.column.OnDuplicateKeyColumnsSegment@7b11b60e])

2021-11-03 10:45:38.838|biz-e3424a198605469bb31139f9767fe21b||SQLLogger.java|74|INFO||||||[XNIO-1 task-1] Actual SQL: ds_0 ::: insert into t_pipeline_info (PIPELINE_ID, PROJECT_ID, PIPELINE_NAME, PIPELINE_DESC) values (?, ?, ?, ?) on duplicate key update t_pipeline_info.PIPELINE_DESC = ? ::: [p-17bd8ac584be4d228c9ad2d15e9d169117bd8ac584be4d228c9ad2d15e9d169117bd8ac584be4d228c9ad2d15e9d1691, devops-test, bnmvvv1234, dfdf89089808, dfdf89089808]

Native SQL directly inserts an error

My configuration is as follows：

private fun dataSourceMap(config: DataSourceProperties): Map<String, DataSource> {
val dataSourceMap: MutableMap<String, DataSource> = mutableMapOf()
val dataSourceConfigs = config.dataSourceConfigs
dataSourceConfigs.forEachIndexed { index, dataSourceConfig ->
val dataSourceName = "$DATA_SOURCE_NAME_PREFIX$index"
dataSourceMap[dataSourceName] = createHikariDataSource(
datasourcePoolName = dataSourceName,
datasourceUrl = dataSourceConfig.url,
datasourceUsername = dataSourceConfig.username,
datasourcePassword = dataSourceConfig.password,
datasourceInitSql = dataSourceConfig.initSql,
datasouceLeakDetectionThreshold = dataSourceConfig.leakDetectionThreshold
)
}
return dataSourceMap
}

private fun createHikariDataSource(
datasourcePoolName: String,
datasourceUrl: String,
datasourceUsername: String,
datasourcePassword: String,
datasourceInitSql: String?,
datasouceLeakDetectionThreshold: Long
): HikariDataSource {
return HikariDataSource().apply {
poolName = datasourcePoolName
jdbcUrl = datasourceUrl
username = datasourceUsername
password = datasourcePassword
driverClassName = Driver::class.java.name
minimumIdle = 10
maximumPoolSize = 50
idleTimeout = 60000
connectionInitSql = datasourceInitSql
leakDetectionThreshold = datasouceLeakDetectionThreshold
}
}

@Bean
fun shardingDataSource(config: DataSourceProperties): DataSource {
val shardingRuleConfig = ShardingRuleConfiguration()
// 设置表的路由规则
val tableRuleConfigs = shardingRuleConfig.tables
val dataSourceSize = config.dataSourceConfigs.size
tableRuleConfigs.add(getTableRuleConfiguration("t_pipeline_info", dataSourceSize))
tableRuleConfigs.add(getTableRuleConfiguration("t_pipeline_user", dataSourceSize))
val dbShardingAlgorithmrProps = Properties()
dbShardingAlgorithmrProps.setProperty("strategy", "STANDARD")
dbShardingAlgorithmrProps.setProperty("algorithmClassName",
"com.xxx.devops.sharding.configuration.BkDatabaseShardingAlgorithm")
shardingRuleConfig.shardingAlgorithms["bkDatabaseShardingAlgorithm"] =
ShardingSphereAlgorithmConfiguration("CLASS_BASED", dbShardingAlgorithmrProps)

shardingRuleConfig.defaultTableShardingStrategy = NoneShardingStrategyConfiguration()
shardingRuleConfig.defaultDatabaseShardingStrategy =
StandardShardingStrategyConfiguration(PROJECT_ID_FIELD, "bkProcessDatabaseShardingAlgorithm")
val properties = Properties()
// 是否打印SQL解析和改写日志
properties.setProperty("sql-show", "true")
return ShardingSphereDataSourceFactory.createDataSource(
dataSourceMap(config),
listOf(shardingRuleConfig),
properties
)
}

fun getTableRuleConfiguration(
tableName: String,
dataSourceSize: Int,
specifyDataSourceName: String? = null
): ShardingTableRuleConfiguration? {
// 生成实际节点规则
val actualDataNodes = if (specifyDataSourceName != null) {
"$specifyDataSourceName.$tableName"
} else {
val lastIndex = dataSourceSize - 1
"$DATA_SOURCE_NAME_PREFIX\${0..$lastIndex}.$tableName"
}
val tableRuleConfig = ShardingTableRuleConfiguration(tableName, actualDataNodes)
tableRuleConfig.tableShardingStrategy = NoneShardingStrategyConfiguration()
tableRuleConfig.databaseShardingStrategy =
StandardShardingStrategyConfiguration(PROJECT_ID_FIELD, "bkDatabaseShardingAlgorithm")
return tableRuleConfig
}

My table structure is as follows：

CREATE TABLE t_pipeline_info (

PIPELINE_ID varchar(34) NOT NULL DEFAULT,

PROJECT_ID varchar(64) NOT NULL COMMENT,

PIPELINE_NAME varchar(255) NOT NULL,

PIPELINE_DESC varchar(255) DEFAULT NULL,

PRIMARY KEY (PIPELINE_ID),

UNIQUE KEY T_PIPELINE_INFO_NAME_uindex (PROJECT_ID,PIPELINE_NAME),

KEY PROJECT_ID (PROJECT_ID,PIPELINE_ID)

) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Issue 2:
Question

server.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.
#
######################################################################################################

#scaling:
# blockQueueSize: 10000
# workerThread: 40
# clusterAutoSwitchAlgorithm:
# type: IDLE
# props:
# incremental-task-idle-minute-threshold: 30
# dataConsistencyCheckAlgorithm:
# type: DEFAULT
#
#mode:
# type: Cluster
# 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
- sharding@%:sharding
provider:
type: ALL_PRIVILEGES_PERMITTED
- !TRANSACTION
defaultType: XA
providerType: Atomikos

#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-opentracing-enabled: false
# proxy-hint-enabled: false
# sql-show: false
# check-table-metadata-enabled: false
# show-process-list-enabled: false
# # Proxy backend query fetch size. A larger value may increase the memory usage of ShardingSphere Proxy.
# # The default value is -1, which means set the minimum value for different JDBC drivers.
# proxy-backend-query-fetch-size: -1
# check-duplicate-table-enabled: false
# sql-comment-parse-enabled: false
# proxy-frontend-executor-size: 0 # Proxy frontend executor size. The default value is 0, which means let Netty decide.
# # Available options of proxy backend executor suitable: OLAP(default), OLTP. The OLTP option may reduce time cost of writing packets to client, but it may increase the latency of SQL execution
# # if client connections are more than proxy-frontend-netty-executor-size, especially executing slow SQL.
# proxy-backend-executor-suitable: OLAP
# proxy-frontend-max-connections: 0 # Less than or equal to 0 means no limitation.
# sql-federation-enabled: false

config-ds.yaml

databaseName: sharding_db
#
dataSources:
ds_0:
url: jdbc:mysql://127.0.0.1:3306/_ds_0?serverTimezone=UTC&useSSL=false
username: root
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
ds_1:
url: jdbc:mysql://127.0.0.1:3306/ds_1?serverTimezone=UTC&useSSL=false
username: root
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
rules:
- !SHARDING
tables:
t_order:
actualDataNodes: ds_${0..1}.t_order_${0..63}
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..63}
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 % 64}
t_order_item_inline:
type: INLINE
props:
algorithm-expression: t_order_item_${order_id % 64}

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