You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by ji...@apache.org on 2023/04/23 09:30:42 UTC
[shardingsphere] branch master updated: Remove duplicated check in WeightReadQueryLoadBalanceAlgorithm (#25290)
This is an automated email from the ASF dual-hosted git repository.
jianglongtao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 12edd2b5829 Remove duplicated check in WeightReadQueryLoadBalanceAlgorithm (#25290)
12edd2b5829 is described below
commit 12edd2b58292f494381de7cfc5f087f4d963d2dd
Author: ChenJiaHao <Pa...@163.com>
AuthorDate: Sun Apr 23 17:30:35 2023 +0800
Remove duplicated check in WeightReadQueryLoadBalanceAlgorithm (#25290)
---
.../algorithm/loadbalance/WeightReadQueryLoadBalanceAlgorithm.java | 2 --
1 file changed, 2 deletions(-)
diff --git a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/algorithm/loadbalance/WeightReadQueryLoadBalanceAlgorithm.java b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/algorithm/loadbalance/WeightReadQueryLoadBalanceAlgorithm.java
index fdac948277a..857044e4275 100644
--- a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/algorithm/loadbalance/WeightReadQueryLoadBalanceAlgorithm.java
+++ b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/algorithm/loadbalance/WeightReadQueryLoadBalanceAlgorithm.java
@@ -118,8 +118,6 @@ public final class WeightReadQueryLoadBalanceAlgorithm implements ReadQueryLoadB
private double getWeightValue(final String readDataSourceName) {
Object weightObject = props.get(readDataSourceName);
- ShardingSpherePreconditions.checkNotNull(weightObject,
- () -> new MissingRequiredReadDatabaseWeightException(getType(), String.format("Read database `%s` access weight is not configured.", readDataSourceName)));
double result = Double.parseDouble(weightObject.toString());
if (Double.isInfinite(result)) {
result = 10000.0D;