Pace2Car commented on code in PR #24934:
URL: https://github.com/apache/shardingsphere/pull/24934#discussion_r1169558321
##########
features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/algorithm/loadbalance/WeightReadQueryLoadBalanceAlgorithm.java:
##########
@@ -50,6 +51,17 @@ public final class WeightReadQueryLoadBalanceAlgorithm
implements ReadQueryLoadB
public void init(final Properties props) {
this.props = props;
dataSourceNames = props.stringPropertyNames();
+ ShardingSpherePreconditions.checkState(!dataSourceNames.isEmpty(), ()
-> new ReadQueryLoadBalanceAlgorithmInitializationExcpetion(getType(), "data
source shouldn't be empty!"));
Review Comment:
message `Read data source is required` could be better.
--
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]