sysSentry/fix-ai_block_io-root-cause-bug.patch
贺有志 b3ac391178 fix ai_block_io root cause bug
Signed-off-by: 贺有志 <1037617413@qq.com>

fix ai_block_io root cause bug

Signed-off-by: 贺有志 <1037617413@qq.com>
2024-10-16 12:42:01 +08:00

34 lines
1.5 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From ac9ce326dee20edde2451946e34ea9a13bd8c338 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B4=BA=E6=9C=89=E5=BF=97?= <1037617413@qq.com>
Date: Wed, 16 Oct 2024 11:50:46 +0800
Subject: [PATCH] fix ai_block_io root cause bug
---
src/python/sentryPlugins/ai_block_io/detector.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/python/sentryPlugins/ai_block_io/detector.py b/src/python/sentryPlugins/ai_block_io/detector.py
index 5b21714..ed8b64a 100644
--- a/src/python/sentryPlugins/ai_block_io/detector.py
+++ b/src/python/sentryPlugins/ai_block_io/detector.py
@@ -101,12 +101,12 @@ class DiskDetector:
if len(diagnosis_info["bio"]) == 0:
return False, None, None, None
elif len(diagnosis_info["rq_driver"]) != 0:
- root_cause = "[Root Causedisk slow]"
+ root_cause = "[Root Cause: disk slow]"
elif len(diagnosis_info["io_stage"]) != 0:
- stage = diagnosis_info["io_stage"][0][1].get_stage_name()
- root_cause = f"[Root Causeio stage slow, stage: {stage}]"
+ stage = diagnosis_info["io_stage"][0][1].stage_name
+ root_cause = f"[Root Cause: io stage slow, stage: {stage}]"
if root_cause is None:
- root_cause = "[Root Causehigh io pressure]"
+ root_cause = "[Root Cause: high io pressure]"
return True, diagnosis_info["bio"][0][0], diagnosis_info["bio"][0][1], root_cause
def __repr__(self):
--
2.23.0