Skip to content
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

Merged
merged 2 commits into from Dec 19, 2015
Merged

Conversation

liewegas
Copy link
Member

This is much more convenient, and also avoids the LOG file growth/rotation
issue.`

// Write an entry to the log file with the specified format.
void Logv(const char* format, va_list ap) {
dout(1);
char buf[1048576];
Copy link
Member

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.

Copy link
Member Author

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>
@tchaikov
Copy link
Contributor

the build failure is not relevant and is being addressed by #6927.

@tchaikov
Copy link
Contributor

tested locally, the log printed by leveldb looks like:

2015-12-17 07:00:09.468848 7f7e46daf440 -1 WARNING: the following dangerous and experimental features are enabled: *
2015-12-17 07:00:10.445334 7f7e46daf440  1 leveldb: Delete type=3 #1

2015-12-17 07:00:13.181377 7feaf4366440 -1 WARNING: the following dangerous and experimental features are enabled: *
2015-12-17 07:00:13.181417 7feaf4366440 -1 WARNING: the following dangerous and experimental features are enabled: *
2015-12-17 07:00:13.181571 7feaf4366440  0 ceph version Development (no_version), process ceph-mon, pid 9822
2015-12-17 07:00:13.182461 7feaf4366440 -1 WARNING: the following dangerous and experimental features are enabled: *
2015-12-17 07:00:13.190737 7feaf4366440 10 load: jerasure load: lrc load: isa
2015-12-17 07:00:13.191237 7feaf4366440  1 leveldb: Recovering log #3
2015-12-17 07:00:13.191300 7feaf4366440  1 leveldb: Level-0 table #5: started
2015-12-17 07:00:14.330584 7feaf4366440  1 leveldb: Level-0 table #5: 841 bytes OK
2015-12-17 07:00:14.545547 7feaf4366440  1 leveldb: Delete type=3 #2

2015-12-17 07:00:14.545645 7feaf4366440  1 leveldb: Delete type=0 #3

lgtm

@tchaikov tchaikov self-assigned this Dec 17, 2015
liewegas added a commit that referenced this pull request Dec 19, 2015
osd,mon: log leveldb and rocksdb to ceph log

Reviewed-by: Kefu Chai <kchai@redhat.com>
@liewegas liewegas merged commit 6bb34fe into ceph:master Dec 19, 2015
@liewegas liewegas deleted the wip-kv-log branch December 19, 2015 18:57
@ghost ghost changed the title kv: log leveldb and rocksdb to ceph log osd,mon: log leveldb and rocksdb to ceph log Feb 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants