-
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
Increase max_log_size in FlushJob to 1024 bytes #6258
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.
@maysamyabandeh 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.
Can you update the description with the symptoms? Its not clear if this is a bug or optimization.
logging/event_logger.h
Outdated
return EventLoggerStream(log_buffer); | ||
EventLoggerStream LogToBuffer( | ||
LogBuffer* log_buffer, | ||
const size_t max_log_size = LogBuffer::kDefaultMaxLogSize) { |
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.
Can we avoid default values for function parameters? Either explicitly specify the value at call sites or overload the function.
@@ -249,7 +249,7 @@ Status FlushJob::Run(LogsWithPrepTracker* prep_tracker, | |||
} | |||
RecordFlushIOStats(); | |||
|
|||
auto stream = event_logger_->LogToBuffer(log_buffer_); | |||
auto stream = event_logger_->LogToBuffer(log_buffer_, 1024); |
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.
Add a comment to explain the reason for 1024.
@maysamyabandeh has updated the pull request. Re-import the pull request |
@maysamyabandeh has updated the pull request. Re-import the pull request |
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.
@maysamyabandeh 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.
LGTM. Thanks for addressing the comments.
@maysamyabandeh merged this pull request in 28e5a9a. |
Summary: When measure_io_stats_ is enabled, the volume of logging is beyond the default limit of 512 size. The patch allows the EventLoggerStream to change the limit, and also sets it to 1024 for FlushJob. Pull Request resolved: facebook/rocksdb#6258 Differential Revision: D19279269 Pulled By: maysamyabandeh fbshipit-source-id: 3fb5d468dad488f289ac99d713378177eb7504d6 Signed-off-by: Changlong Chen <levisonchen@live.cn>
Summary: When measure_io_stats_ is enabled, the volume of logging is beyond the default limit of 512 size. The patch allows the EventLoggerStream to change the limit, and also sets it to 1024 for FlushJob. Pull Request resolved: facebook/rocksdb#6258 Differential Revision: D19279269 Pulled By: maysamyabandeh fbshipit-source-id: 3fb5d468dad488f289ac99d713378177eb7504d6 Signed-off-by: Changlong Chen <levisonchen@live.cn>
When measure_io_stats_ is enabled, the volume of logging is beyond the default limit of 512 size. The patch allows the EventLoggerStream to change the limit, and also sets it to 1024 for FlushJob.