-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add LogMonitor to check log disk freeBytes and change log level when space is almost full #3576
Conversation
596b4be
to
190bd7b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job, generally LGTM, maybe you could move to common
directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done~~
Close #3423 |
0b06a59
to
48bfca5
Compare
void LogMonitor::checkAndChangeLogLevel() { | ||
getLogDiskFreeByte(); | ||
|
||
if (FLAGS_log_min_reserved_bytes_to_fatal > FLAGS_log_min_reserved_bytes_to_error || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think !(FLAGS_log_min_reserved_bytes_to_fatal > FLAGS_log_min_reserved_bytes_to_warn && FLAGS_log_min_reserved_bytes_to_error > FLAGS_log_min_reserved_bytes_to_fatal)
is more readable ?
…space is almost full (#3576) * add LogMonitor to check the log disk is full * fix comments * add comments for default flags Co-authored-by: yaphet <4414314+darionyaphet@users.noreply.github.com>
* add LogMonitor to check log disk freeBytes and change log level when space is almost full (#3576) * add LogMonitor to check the log disk is full * fix comments * add comments for default flags Co-authored-by: yaphet <4414314+darionyaphet@users.noreply.github.com> * Ldbc test cases. (#3537) * Add ldbc test/ * Add all cases. * Fix some test cases. * Fix ldbc cases. * Fix pytest. Co-authored-by: Yee <2520865+yixinglu@users.noreply.github.com> * fix issue 3675 (#3678) * Fix expression rewrite (#3614) * Do not transfer the filter expression if it contains 2 lableAttribute exprs * Fix expression overflow check * Fix rewriteRelExpr * Refactor rewriteRelExpr * Fix log usage * Check whether the minus expression contains string * Add tck cases * Address comments * Fix conflicts * Address comments * modify metrics in conf files * Address comments * fix divide zone should be failed if two zones use the same host (#3699) * Support more check about merge zone arguments (#3703) * fix match index (#3694) * check scheam * add test case * fix graph crash * address comment' ' * add test case * fix error * fix vid select error * fix unit test error * address comment * fix issue 3601 (#3666) Co-authored-by: Nivras <12605142+Nivras@users.noreply.github.com> Co-authored-by: yaphet <4414314+darionyaphet@users.noreply.github.com> Co-authored-by: cpw <13495049+CPWstatic@users.noreply.github.com> Co-authored-by: Yee <2520865+yixinglu@users.noreply.github.com> Co-authored-by: Yichen Wang <18348405+Aiee@users.noreply.github.com> Co-authored-by: jimingquan <mingquan.ji@vesoft.com> Co-authored-by: hs.zhang <22708345+cangfengzhs@users.noreply.github.com>
What type of PR is this?
What does this PR do?
add LogMonitor to check log disk freeBytes and change log level when space is almost full
in default config, if log disk free space is less than 256M, change log level to WARNING, and if space less than 64M, change log level to DEBUG, and less than 4M, change log level to FATAL.
If log disk space is bigger than those flag, and log level have changed before(maybe someone clean the log), LogMonitor will change the log level to the old value(which in config file).
Which issue(s)/PR(s) this PR relates to?
#3423
Special notes for your reviewer, ex. impact of this fix, etc:
Additional context/ Design document:
Checklist:
Release notes:
Please confirm whether to be reflected in release notes and how to describe: