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
osd,mon: log leveldb and rocksdb to ceph log #6921
Conversation
// Write an entry to the log file with the specified format. | ||
void Logv(const char* format, va_list ap) { | ||
dout(1); | ||
char buf[1048576]; |
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.
Hmm, I would like to think 1M is a dangerous value to stack size? AFAR, some OS may only have several hundreds KB stack size.
Maybe we can declare a 1k buf, then try to iterate the whole line. If failed, turn to heap allocation? Or just truncate the log line.
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.
Signed-off-by: Sage Weil <sage@redhat.com>
This greatly eases debugging, and avoids the unbounded growth of the leveldb LOG file. Signed-off-by: Sage Weil <sage@redhat.com>
the build failure is not relevant and is being addressed by #6927. |
tested locally, the log printed by leveldb looks like:
lgtm |
osd,mon: log leveldb and rocksdb to ceph log Reviewed-by: Kefu Chai <kchai@redhat.com>
This is much more convenient, and also avoids the LOG file growth/rotation
issue.`