From 3073399b0f21b8d43f7aa6cb65394acd70c1dc7c Mon Sep 17 00:00:00 2001 From: Yu Ning <78631860+Chillax-0v0@users.noreply.github.com> Date: Wed, 20 Nov 2024 16:00:12 +0800 Subject: [PATCH] chore(backpressure): log it on back pressure (#2164) Signed-off-by: Ning Yu --- .../stream/s3/backpressure/DefaultBackPressureManager.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/s3stream/src/main/java/com/automq/stream/s3/backpressure/DefaultBackPressureManager.java b/s3stream/src/main/java/com/automq/stream/s3/backpressure/DefaultBackPressureManager.java index ad687d0497..a69a5735b4 100644 --- a/s3stream/src/main/java/com/automq/stream/s3/backpressure/DefaultBackPressureManager.java +++ b/s3stream/src/main/java/com/automq/stream/s3/backpressure/DefaultBackPressureManager.java @@ -121,6 +121,12 @@ private LoadLevel currentLoadLevel() { } private void regulate(LoadLevel loadLevel, long now) { + if (LoadLevel.NORMAL.equals(loadLevel) && LOGGER.isDebugEnabled()) { + LOGGER.debug("The system is in a normal state, checkers: {}", loadLevels); + } else { + LOGGER.info("The system is in a {} state, checkers: {}", loadLevel, loadLevels); + } + loadLevel.regulate(regulator); lastRegulateTime = now; }