You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "franklj123 (via GitHub)" <gi...@apache.org> on 2025/10/05 02:57:08 UTC
[I] autoTables yaml配置无效 [shardingsphere]
franklj123 opened a new issue, #36786:
URL: https://github.com/apache/shardingsphere/issues/36786
我使用的版本是5.5.2,配置的yaml如下
rules:
- !SHARDING
autoTables: # 自动分片表规则配置
course_auto: # 逻辑表名称
actualDataSources: db_${0..1} # 必须添加
shardingStrategy: # 切分策略
standard: # 用于单分片键的标准分片场景
shardingColumn: id
shardingAlgorithmName: course_mod
defaultTableStrategy: # 默认表分片策略
none:
defaultDatabaseStrategy: # 默认分库策略
standard:
shardingColumn: id
shardingAlgorithmName: database_inline
# 分片算法配置
shardingAlgorithms:
course_mod:
type: MOD
props:
sharding-count: 2
database_inline:
type: INLINE
props:
algorithm-expression: db_${id % 2}
报错Table or view 'course_auto' does not exist.
如果把course_auto表配置到tables节点,则会报错tables sharding configuration can not use auto sharding algorithm..
自动分片算法的使用是否还有其他限制条件呢
--
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] autoTables yaml配置无效 [shardingsphere]
Posted by "franklj123 (via GitHub)" <gi...@apache.org>.
franklj123 closed issue #36786: autoTables yaml配置无效
URL: https://github.com/apache/shardingsphere/issues/36786
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org