-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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 stderr log level for ldb backup commands #1939
Conversation
@ajkr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
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.
It's better to mention "ldb" in the commit message.
tools/ldb_cmd.cc
Outdated
backup_options.max_background_operations = thread_num_; | ||
BackupableDBOptions(backup_dir_, custom_env); | ||
if (stderr_log_level_ != InfoLogLevel::NUM_INFO_LOG_LEVELS) { | ||
backup_options.info_log = new StderrLogger(stderr_log_level_); |
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.
Is that a memory leak?
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.
yes, thanks!
BTW, does anyone know what's wrong with the sandcastle logs? I see "output truncated" in the logs and no obvious failure messages, despite being red.
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 have no idea.
@ajkr updated the pull request - view changes - changes since last import |
@ajkr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@ajkr updated the pull request - view changes - changes since last import |
@ajkr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@ajkr updated the pull request - view changes - changes since last import |
@ajkr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
1 similar comment
@ajkr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Also extracted the common logic into a base class, BackupableCommand.
Test Plan: run a bunch of ldb backup/restore commands, like
./ldb restore --db=./tmp-rst --backup_dir=./tmp-bk --stderr_log_level=1
./ldb backup --db=./tmp --backup_dir=./tmp-bk --stderr_log_level=1