提交 949ccc69 编写于 作者: C Cary Xu

enh: add warn log for abnormal monitor value

上级 c02989f4
...@@ -15,13 +15,13 @@ ...@@ -15,13 +15,13 @@
#include "vnd.h" #include "vnd.h"
#define VNODE_GET_LOAD_RESET_VALS(pVar, oVal, vType, tags) \ #define VNODE_GET_LOAD_RESET_VALS(pVar, oVal, vType, tags) \
do { \ do { \
int##vType##_t newVal = atomic_sub_fetch_##vType(&(pVar), (oVal)); \ int##vType##_t newVal = atomic_sub_fetch_##vType(&(pVar), (oVal)); \
ASSERT(newVal >= 0); \ ASSERT(newVal >= 0); \
if (newVal < 0) { \ if (newVal < 0) { \
vWarn("vgId:%d %s, abnormal val:%" PRIi64 ", old val:%" PRIi64, TD_VID(pVnode), tags, pVar, oVal); \ vWarn("vgId:%d %s, abnormal val:%" PRIi64 ", old val:%" PRIi64, TD_VID(pVnode), tags, newVal, oVal); \
} \ } \
} while (0) } while (0)
int vnodeQueryOpen(SVnode *pVnode) { int vnodeQueryOpen(SVnode *pVnode) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册