-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support Cartesian Product for readWriteConfig, add check database for writedatasoucename #19808
Conversation
… write datasource
Codecov Report
@@ Coverage Diff @@
## master #19808 +/- ##
============================================
+ Coverage 60.07% 60.20% +0.13%
- Complexity 2399 2423 +24
============================================
Files 3856 3875 +19
Lines 54920 55026 +106
Branches 7681 7699 +18
============================================
+ Hits 32993 33130 +137
+ Misses 19098 19051 -47
- Partials 2829 2845 +16
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
Preconditions.checkArgument(writeInlineNames.size() == inlineNames.size(), "Inline expression write data source names size error"); | ||
readInlineNames.forEach(e -> Preconditions.checkArgument(e.size() == inlineNames.size(), "Inline expression read data source names size error")); | ||
for (int i = 0; i < inlineNames.size(); i++) { | ||
final int finalI = i; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable does not make sense, could you rename it?
.../src/main/java/org/apache/shardingsphere/readwritesplitting/rule/ReadwriteSplittingRule.java
Outdated
Show resolved
Hide resolved
List<String> inlineNames = new InlineExpressionParser(config.getName()).splitAndEvaluate(); | ||
if (null != config.getStaticStrategy()) { | ||
List<String> writeInlineNames = new InlineExpressionParser(config.getStaticStrategy().getWriteDataSourceName()).splitAndEvaluate(); | ||
List<List<String>> readInlineNames = config.getStaticStrategy().getReadDataSourceNames().stream().map(e -> new InlineExpressionParser(e).splitAndEvaluate()).collect(Collectors.toList()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about change readInlineNames
to readInlineDataSourceNames
?
Fixes #19693 .