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.

Maybe we can verify dataSource in ReadWrite-splitting rules,before create ReadWrite-splitting rules.

See original GitHub issue

Feature Request

For English only, other languages will not accept.

Please pay attention on issues you submitted, because we maybe need more details. If no response anymore and we cannot make decision by current information, we will close it.

Please answer these questions before submitting your issue. Thanks!

Is your feature request related to a problem?

NO

Describe the feature you would like.

First of all, we can use DistSQL create two READWRITE_SPLITTING RULE in one logic schema.

eg:

CREATE READWRITE_SPLITTING RULE ms_group_0 (
WRITE_RESOURCE=write_ds,
READ_RESOURCES(read_ds_0,read_ds_1),
TYPE(NAME=random)
);
CREATE READWRITE_SPLITTING RULE ms_group_1(
WRITE_RESOURCE=write_ds,
READ_RESOURCES(read_ds_0,read_ds_1),
TYPE(NAME=random)
);

image

But when we use select in this logic schema,we can’t figure out how to route,because of we have same table in two rules.

And it is not legal, because we cant’t have two same table in one schema.

So,can we verify dataSource in ReadWrite-splitting rules? Ensures that a logical schema does not exist the same table and cannot be routed.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
strongduanmucommented, Jul 22, 2022

@wsm12138 I found RuleConfigurationChecker a good place to add validation logic, but currently Proxy doesn’t use it. I will add a RuleConfigurationChecker call to the Proxy and migrate various rule checking logic to RuleConfigurationChecker.

0reactions
RaigorJiangcommented, Sep 27, 2022

Yes, by design, read resource and write resource may be the same.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Readwritesplit - MariaDB Knowledge Base
When a server that readwritesplit uses is put into maintenance mode, any ongoing requests are allowed to finish before the connection is closed....
Read more >
Configuration manual - Apache ShardingSphere
The Rule object is bound to the DataSource object through the Factory object. Sharding-JDBC operates Sharding and Read-write splitting on DataSource object.
Read more >
Kernel Optimizations & Upgrade Guide for ShardingSphere 5.0
Learn how to use 5.0 version in a practical scenario case integrating data sharding, read/write splitting, and data encryption & decryption.
Read more >
MySQL read/write split with ProxySQL
In this paragraph I will show an example on how to perform read/write split using regular expression. First of all, we should remove...
Read more >
"terraform test" and data source limitations - HashiCorp Discuss
For instance, if I want to validate the ingress rules of the security group were created, those rules aren't exported as outputs of...
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