Skip to content

Commit

Permalink
perf($ShardingSphere): support table sharding strategy
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
johnnymillergh committed Apr 2, 2022
1 parent 9bb16d3 commit aef374b
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,25 @@ spring:
load-balancers:
readwrite-load-balancer:
type: ROUND_ROBIN
sharding:
key-generators:
snowflake:
type: SNOWFLAKE
sharding-algorithms:
user-sharding:
type: INLINE
props:
algorithm-expression: user_$->{id % 2}
tables:
user:
actual-data-nodes: readwrite-data-sources.user_$->{0..1}
table-strategy:
standard:
sharding-column: id
sharding-algorithm-name: user-sharding
keyGenerateStrategy:
column: id
keyGeneratorName: snowflake

logging:
config: classpath:logback-configuration/logback-${spring.profiles.active}.xml
Expand Down

0 comments on commit aef374b

Please sign in to comment.