-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Pass SST file checksum information through OnTableFileCreated #7108
Conversation
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.
@zhichao-cao has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@@ -128,7 +130,8 @@ Status BuildTable( | |||
if (!s.ok()) { | |||
EventHelpers::LogAndNotifyTableFileCreationFinished( | |||
event_logger, ioptions.listeners, dbname, column_family_name, fname, | |||
job_id, meta->fd, kInvalidBlobFileNumber, tp, reason, s); | |||
job_id, meta->fd, kInvalidBlobFileNumber, tp, reason, s, | |||
file_checksum, file_checksum_func_name); |
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.
Why not get rid of the two variables and use kUnknown here?
@@ -270,7 +275,8 @@ Status BuildTable( | |||
// Output to event logger and fire events. | |||
EventHelpers::LogAndNotifyTableFileCreationFinished( | |||
event_logger, ioptions.listeners, dbname, column_family_name, fname, | |||
job_id, meta->fd, meta->oldest_blob_file_number, tp, reason, s); | |||
job_id, meta->fd, meta->oldest_blob_file_number, tp, reason, s, |
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.
Get rid of the temporary vars and use meta->file_checksum here.
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 will deal with the case that (io_status->ok() && !empty) is not satisfied, meta->file_checksum/file_checksum_func_name will be empty. I'm thinking it would be better to pass Unknown in this case.
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.
LGTM, this looks potentially useful.
Thanks for the review! |
af9f608
to
8d98c6f
Compare
@zhichao-cao has updated the pull request. You must reimport the pull request before landing. |
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.
@zhichao-cao has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@zhichao-cao merged this pull request in d51f88c. |
…ok#7108) Summary: When SST file is created, application is able to know the file information through OnTableFileCreated callback in LogAndNotifyTableFileCreationFinished. Since file checksum information can be useful for application when the SST file is created, we add file_checksum and file_checksum_func_name information to TableFileCreationInfo, which will be passed through OnTableFileCreated. Pull Request resolved: facebook#7108 Test Plan: make check, listener_test. Reviewed By: ajkr Differential Revision: D22470240 Pulled By: zhichao-cao fbshipit-source-id: 92c20344d9b986eadfe3480f3769bf4add0dbaae
When SST file is created, application is able to know the file information through OnTableFileCreated callback in LogAndNotifyTableFileCreationFinished. Since file checksum information can be useful for application when the SST file is created, we add file_checksum and file_checksum_func_name information to TableFileCreationInfo, which will be passed through OnTableFileCreated.
Test plan: make check, listener_test.