question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Simplify configuration file

See original GitHub issue

Currently, shardingsphere configuration file need to repeat all tables’ config, event they are using same sharding rule. e.g.

spring.shardingsphere.sharding.tables.table1.actual-data-nodes=ds$->{0..1}.tab_user$->{0..1}
spring.shardingsphere.sharding.tables.table1.table-strategy.inline.sharding-column=id
spring.shardingsphere.sharding.tables.table1.table-strategy.inline.algorithm-expression=tab_user$->{id % 2}

spring.shardingsphere.sharding.tables.table2.actual-data-nodes=ds$->{0..1}.tab_user$->{0..1}
spring.shardingsphere.sharding.tables.table2.table-strategy.inline.sharding-column=id
spring.shardingsphere.sharding.tables.table2.table-strategy.inline.algorithm-expression=tab_user$->{id % 2}

in the example, table1 and table2 have exactly same sharding rule, I suggest to combine them into one group, like:

spring.shardingsphere.sharding.groups.group1.tables=table1,table2
spring.shardingsphere.sharding.groups.group1.actual-data-nodes=ds$->{0..1}.${tablename}$->{0..1}
spring.shardingsphere.sharding.groups.group1.table-strategy.inline.sharding-column=id
spring.shardingsphere.sharding.groups.group1.table-strategy.inline.algorithm-expression=${tablename}$->{id % 2}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:21 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
zhang7324199commented, Jun 21, 2022

rules:

  • !SHARDING shardingTables:
    • #Sample1: all tables Sharding by item_id should be under this group tables: t_order, t_order_item

When will this feature be released?

0reactions
johnny2002commented, Oct 12, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Simplifying configuration management with ... - Opcito
This blog extensively talks about Configuration as Code. It is explained based on its difference with IaC and also explains the pros and ......
Read more >
Firmware & Machine Settings - Simplify3D
Printer profiles in Simplify3D provide pre-configured settings for your 3D printer. This video shows you how to add new profiles, save changes to...
Read more >
Simplified Configuration - WCF - Microsoft Learn
Learn about simplified configuration for WCF services. .NET Framework 4.6.1 provides a way to reduce the size and complexity of service ...
Read more >
Simplify 3D Configuration Files for HyperCube/CoreXY by ...
Download files and build them with your 3D printer, laser cutter, or CNC. Thingiverse is a universe of things.
Read more >
Simplifying configuration file view - IBM
How do you simplify viewing of configuration files? ... Consider the following output of the /etc/ldap.conf file:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found