Set SystemRule's threshold to zero is allowed.
This commit is contained in:
parent
b1cf30fc24
commit
40514587ac
|
|
@ -226,24 +226,24 @@ public class SystemRuleManager {
|
||||||
boolean checkStatus = false;
|
boolean checkStatus = false;
|
||||||
// 首先判断是否有效
|
// 首先判断是否有效
|
||||||
|
|
||||||
if (rule.getHighestSystemLoad() > 0) {
|
if (rule.getHighestSystemLoad() >= 0) {
|
||||||
highestSystemLoad = Math.min(highestSystemLoad, rule.getHighestSystemLoad());
|
highestSystemLoad = Math.min(highestSystemLoad, rule.getHighestSystemLoad());
|
||||||
highestSystemLoadIsSet = true;
|
highestSystemLoadIsSet = true;
|
||||||
checkStatus = true;
|
checkStatus = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rule.getAvgRt() > 0) {
|
if (rule.getAvgRt() >= 0) {
|
||||||
maxRt = Math.min(maxRt, rule.getAvgRt());
|
maxRt = Math.min(maxRt, rule.getAvgRt());
|
||||||
maxRtIsSet = true;
|
maxRtIsSet = true;
|
||||||
checkStatus = true;
|
checkStatus = true;
|
||||||
}
|
}
|
||||||
if (rule.getMaxThread() > 0) {
|
if (rule.getMaxThread() >= 0) {
|
||||||
maxThread = Math.min(maxThread, rule.getMaxThread());
|
maxThread = Math.min(maxThread, rule.getMaxThread());
|
||||||
maxThreadIsSet = true;
|
maxThreadIsSet = true;
|
||||||
checkStatus = true;
|
checkStatus = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rule.getQps() > 0) {
|
if (rule.getQps() >= 0) {
|
||||||
qps = Math.min(qps, rule.getQps());
|
qps = Math.min(qps, rule.getQps());
|
||||||
qpsIsSet = true;
|
qpsIsSet = true;
|
||||||
checkStatus = true;
|
checkStatus = true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue