strongduanmu commented on issue #13285:
URL: 
https://github.com/apache/shardingsphere/issues/13285#issuecomment-951709928


   Since both `db-discovery` and `readwrite-splitting` are dataSource enhance 
rules, `SingleTableRule` will aggregate data sources in reverse order during 
initialization. When the `readwrite-splitting` rule is processed, data sources 
in `db-discovery` will be parsed out, which result in aggregated pipeline 
cannot be connected.
   
   
![image](https://user-images.githubusercontent.com/10829171/138837476-45fe320d-3fe1-4307-8b4a-0f6dd2e3ce11.png)
   
   According to rules of pipeline delivery, the result here should be logical 
data source of `db-discovery`, that is `pr_ds`. However, there are also 
problems with this logic. When routing, `readwrite-splitting` will route the 
`rd_rs` logical data source to `pr_ds`, and then pass it to `db-discovery` for 
routing, but `db-discovery `module does not have the capability of readwrite 
routing, so the result is still incorrect.
   
   Considering that `db-discovery` has no readwrite routing capabilities, I 
think it’s better not to aggregate data sources for it. The data sources 
configured in `db-discovery` rules are directly passed to `readwrite-splitting` 
for use, so that the logic can be correct during routing.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to