方便更快捷的说明问题,可以按需填写(可删除)
使用环境:
ShardingSphere-proxy 5.1.2
场景、问题:
使用scaling自动模式,自定义分片算法。在修改表规则后无法触发Scaling完成迁移
已进行操作:
现有数据源
- 原数据 oms_0
- 分片数据 oms-2022-1,oms-2022-2,oms-2022-3,oms-2022-4
算法
表规则
预览分片规则
##配置文件
schemaName: sharding_db
dataSources:
oms_0:
url: jdbc:mysql://127.0.0.1:13306/db_oms1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
username: root
password: root
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
rules:
- !SHARDING
# 忽略的配置
scalingName: scaling_auto
scaling:
scaling_auto:
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