瀏覽代碼

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

master
changxing.yu Eric Zhao 5 年之前
父節點
當前提交
17365f3d5f
共有 1 個檔案被更改,包括 1 行新增1 行删除
  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 查看文件

@@ -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…
取消
儲存