Browse Source

Fix the bug of getting the wrong current flow QPS in ClusterFlowChecker (#972)

master
changxing.yu Eric Zhao 5 years ago
parent
commit
17365f3d5f
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      sentinel-cluster/sentinel-cluster-server-default/src/main/java/com/alibaba/csp/sentinel/cluster/flow/ClusterFlowChecker.java

+ 1
- 1
sentinel-cluster/sentinel-cluster-server-default/src/main/java/com/alibaba/csp/sentinel/cluster/flow/ClusterFlowChecker.java View File

@@ -64,7 +64,7 @@ final class ClusterFlowChecker {
return new TokenResult(TokenResultStatus.FAIL);
}

double latestQps = metric.getAvg(ClusterFlowEvent.PASS_REQUEST);
double latestQps = metric.getAvg(ClusterFlowEvent.PASS);
double globalThreshold = calcGlobalThreshold(rule) * ClusterServerConfigManager.getExceedCount();
double nextRemaining = globalThreshold - latestQps - acquireCount;



Loading…
Cancel
Save