Removing unnecessary checks in SystemRuleManager#checkSystem (#2869)
This commit is contained in:
parent
6c74a4cf70
commit
9ac8e89dc4
|
|
@ -302,18 +302,18 @@ public final class SystemRuleManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
// total qps
|
// total qps
|
||||||
double currentQps = Constants.ENTRY_NODE == null ? 0.0 : Constants.ENTRY_NODE.passQps();
|
double currentQps = Constants.ENTRY_NODE.passQps();
|
||||||
if (currentQps + count > qps) {
|
if (currentQps + count > qps) {
|
||||||
throw new SystemBlockException(resourceWrapper.getName(), "qps");
|
throw new SystemBlockException(resourceWrapper.getName(), "qps");
|
||||||
}
|
}
|
||||||
|
|
||||||
// total thread
|
// total thread
|
||||||
int currentThread = Constants.ENTRY_NODE == null ? 0 : Constants.ENTRY_NODE.curThreadNum();
|
int currentThread = Constants.ENTRY_NODE.curThreadNum();
|
||||||
if (currentThread > maxThread) {
|
if (currentThread > maxThread) {
|
||||||
throw new SystemBlockException(resourceWrapper.getName(), "thread");
|
throw new SystemBlockException(resourceWrapper.getName(), "thread");
|
||||||
}
|
}
|
||||||
|
|
||||||
double rt = Constants.ENTRY_NODE == null ? 0 : Constants.ENTRY_NODE.avgRt();
|
double rt = Constants.ENTRY_NODE.avgRt();
|
||||||
if (rt > maxRt) {
|
if (rt > maxRt) {
|
||||||
throw new SystemBlockException(resourceWrapper.getName(), "rt");
|
throw new SystemBlockException(resourceWrapper.getName(), "rt");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue