Hi all,
To better solve the primary key generation problem in distributed systems,we will to change sharding api to to support column-level auto-increment and global auto-increment.
Before:
rules:
- !SHARDING
tables:
t_order:
actualDataNodes: ds_${0..1}.t_order_${0..1}
tableStrategy:
standard:
shardingColumn: order_id
shardingAlgorithmName: t_order_inline
keyGenerateStrategy:
column: order_item_id
keyGeneratorName: snowflake
keyGenerators:
snowflake:
type: SNOWFLAKE
After:
rules:
- !SHARDING
tables:
t_order:
actualDataNodes: ds_${0..1}.t_order_${0..1}
tableStrategy:
standard:
shardingColumn: order_id
shardingAlgorithmName: t_order_inline
keyGenerateStrategies:
t_order:
keyGenerateType: column
keyGeneratorName: snowflake
logicTable: t_order
keyGenerateColumn: id
keyGenerators:
snowflake:
type: SNOWFLAKE