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

log file for rejected blocks #7605

Merged
merged 2 commits into from
Jan 22, 2021
Merged

log file for rejected blocks #7605

merged 2 commits into from
Jan 22, 2021

Conversation

deepthiskumar
Copy link
Member

@deepthiskumar deepthiskumar commented Jan 22, 2021

A separate log file mina-rejected-blocks.log for rejected blocks. This is to understand the impact of blocks being missed/not broadcasted fast enough
(tracked here #7338)

@deepthiskumar deepthiskumar requested a review from a team as a code owner January 22, 2021 00:34
@deepthiskumar deepthiskumar added the ci-build-me Add this label to trigger a circle+buildkite build for this branch label Jan 22, 2021
@lk86
Copy link
Contributor

lk86 commented Jan 22, 2021

Will the new file also show up in coda client export-logs and -export-local-logs ?

@deepthiskumar
Copy link
Member Author

deepthiskumar commented Jan 22, 2021

Will the new file also show up in coda client export-logs and -export-local-logs ?

Yup, any file with substring .log in its name will be included

~processor:(Logger.Processor.raw ())
~transport:
(Logger.Transport.File_system.dumb_logrotate ~directory:conf_dir
~log_filename:"mina-best-tip.log" ~max_size:best_tip_diff_log_size
~num_rotate:1) ;
let rejected_blocks_log_size = 1024 * 1024 * 5 in
Copy link
Member

Choose a reason for hiding this comment

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

It might be more elegant (and easier to use again in future etc.) to add the concept of Logger_id.t extensions to Logger.Consumer_registry, so that this logger could accept messages and write them to its file but also pass them to the standard logger automatically too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed, is it ok if I follow it up in another PR?

Copy link
Member

Choose a reason for hiding this comment

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

Good idea, yea

Copy link
Member

@mrmr1993 mrmr1993 left a comment

Choose a reason for hiding this comment

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

Changes look alright, but I don't love the duplicated logging logic.

@lk86 lk86 merged commit fbe3495 into compatible Jan 22, 2021
@lk86 lk86 deleted the fix/rejected-block-log branch January 22, 2021 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-build-me Add this label to trigger a circle+buildkite build for this branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants