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

Add stderr log level for ldb backup commands #1939

Closed
wants to merge 4 commits into from

Conversation

ajkr
Copy link
Contributor

@ajkr ajkr commented Feb 28, 2017

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

@facebook-github-bot
Copy link
Contributor

@ajkr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@siying siying left a 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_);
Copy link
Contributor

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?

Copy link
Contributor Author

@ajkr ajkr Mar 3, 2017

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.

Copy link
Contributor

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 ajkr changed the title Add stderr log level for backup commands Add stderr log level for ldb backup commands Mar 3, 2017
@facebook-github-bot
Copy link
Contributor

@ajkr updated the pull request - view changes - changes since last import

@facebook-github-bot
Copy link
Contributor

@ajkr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@ajkr updated the pull request - view changes - changes since last import

@facebook-github-bot
Copy link
Contributor

@ajkr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@ajkr updated the pull request - view changes - changes since last import

@facebook-github-bot
Copy link
Contributor

@ajkr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

1 similar comment
@facebook-github-bot
Copy link
Contributor

@ajkr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants