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

Reduce blob db noisy logging #2587

Closed
wants to merge 2 commits into from
Closed

Reduce blob db noisy logging #2587

wants to merge 2 commits into from

Conversation

yiwu-arbug
Copy link
Contributor

Summary:
Remove some of the per-key logging by blob db to reduce noise.

Test Plan:
Test with db_bench.

Summary:
Remove some of the per-key logging by blob db to reduce noise.

Test Plan:
Test with db_bench.
@facebook-github-bot
Copy link
Contributor

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

packet.dsn_, packet.file_number_, packet.blob_offset_,
packet.blob_size_, succ);
FindFileAndEvictABlob(packet.file_number_, packet.key_size_,
packet.blob_offset_, packet.blob_size_);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to add a comment here in the code on why you think it is ok to discard the return value and not handle the failure case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only unsuccessful case of FindFileAndEvictABlob is when corresponding file is deleted, which shouldn't consider an error case? I'm going to remove return value of FindFileAndEvictABlob instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me keep the return value but logging the total number of failures at the end.

Copy link
Contributor

@sagar0 sagar0 Jul 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at the code in FindFileAndEvictABlob just now to see in what cases it returns false, and as you said, it seems to be only in the case where the file is already deleted. So, the code as is, is fine with me.

if (s1.IsBusy()) {
ROCKS_LOG_INFO(db_options_.info_log,
"Optimistic transaction failed delete: %s bn: %" PRIu32,
bfptr->PathName().c_str(), gcstats->blob_count);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"transaction failed delete" ... this seems like an important log message, isn't it?
Since you have the best knowledge of the code, i'll leave the final decision to you.

All the messages can be removed in successful cases, but its the non-success messages which are always important to be logged, in my view.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The transaction will fail only when a newer version of the key is being insert, in which case we don't need to delete the key from LSM. So this is not an error case. Logging the info per key is just too noisy. I'm going to add a counter and report it through GCStats.

@facebook-github-bot
Copy link
Contributor

@yiwu-arbug updated the pull request - view changes - changes since last import

@facebook-github-bot
Copy link
Contributor

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

@yiwu-arbug yiwu-arbug deleted the blob_logging branch July 21, 2017 03:40
yiwu-arbug pushed a commit that referenced this pull request Jul 28, 2017
Summary:
Remove some of the per-key logging by blob db to reduce noise.
Closes #2587

Differential Revision: D5429115

Pulled By: yiwu-arbug

fbshipit-source-id: b89328282fb8b3c64923ce48738c16017ce7feaf
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