Sfoglia il codice sorgente

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

master
changxing.yu Eric Zhao 5 anni fa
parent
commit
17365f3d5f
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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 Vedi 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…
Annulla
Salva