From 89ccf10024588c1be57166ec4df4c7001293f886 Mon Sep 17 00:00:00 2001 From: Yu Ning <78631860+Chillax-0v0@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:43:59 +0800 Subject: [PATCH] fix(backpressure): fix metric value of back pressure state (#2209) fix: fix metric value of back pressure state Signed-off-by: Ning Yu --- .../kafka/automq/backpressure/DefaultBackPressureManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/kafka/automq/backpressure/DefaultBackPressureManager.java b/core/src/main/java/kafka/automq/backpressure/DefaultBackPressureManager.java index 1734b81225..3a95a98be3 100644 --- a/core/src/main/java/kafka/automq/backpressure/DefaultBackPressureManager.java +++ b/core/src/main/java/kafka/automq/backpressure/DefaultBackPressureManager.java @@ -144,7 +144,7 @@ private void regulate(LoadLevel loadLevel, long now) { private Map stateMetrics() { LoadLevel current = currentLoadLevel(); for (LoadLevel level : LoadLevel.values()) { - int value = level.equals(current) ? 1 : -1; + int value = level.equals(current) ? current.ordinal() : -1; stateMetrics.put(level.name(), value); } return stateMetrics;