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

fix(logs): Avoid grouping logs for separate tasks #6923

Merged
merged 3 commits into from
Jun 14, 2023
Merged

Conversation

arya2
Copy link
Contributor

@arya2 arya2 commented Jun 12, 2023

Motivation

We've seen some malformed logs from the peer_cache_updater task:

2023-06-11T22:18:21.656595Z INFO {net="Test"}:accept_inbound_connections{min_inbound_peer_connection_interval=1s listener_addr=Ok(0.0.0.0:18233)}:listen_accept{peer=In("v4redacted:41812")}:crawl: zebra_network::peer_set::candidate_set: timeout waiting for peer service readiness or peer responses
accept_inbound_connections{min_inbound_peer_connection_interval=1s listener_addr=Ok(0.0.0.0:18233)}:listen_accept{peer=In("v4redacted:47028")}: zebra_network::config: updated cached peer IP addresses cached_ip_count=11 peer_cache_file="/root/.cache/zebra/network/testnet.peers

Solution

  • Drop Entered guard in accept_inbound_connections() before yielding

Review

Anyone can review.

Reviewer Checklist

  • Will the PR name make sense to users?
    • Does it need extra CHANGELOG info? (new features, breaking changes, large changes)
  • Are the PR labels correct?
  • Does the code do what the ticket and PR says?
    • Does it change concurrent code, unsafe code, or consensus rules?
  • How do you know it works? Does it have tests?

@arya2 arya2 added P-Low ❄️ C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG labels Jun 12, 2023
@arya2 arya2 self-assigned this Jun 12, 2023
@arya2 arya2 requested a review from a team as a code owner June 12, 2023 20:31
@arya2 arya2 requested review from oxarbitrage and removed request for a team June 12, 2023 20:31
@github-actions github-actions bot added the C-bug Category: This is a bug label Jun 12, 2023
@arya2 arya2 added the do-not-merge Tells Mergify not to merge this PR label Jun 12, 2023
@arya2 arya2 marked this pull request as draft June 12, 2023 20:43
@arya2 arya2 force-pushed the fix-shared-span branch from bd3ac93 to d18f814 Compare June 12, 2023 20:46
@arya2 arya2 marked this pull request as ready for review June 12, 2023 20:55
@arya2 arya2 force-pushed the fix-shared-span branch from 8c642c4 to 5e0e03a Compare June 12, 2023 21:08
@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Merging #6923 (40e74dc) into main (b10df28) will decrease coverage by 0.03%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6923      +/-   ##
==========================================
- Coverage   77.60%   77.58%   -0.03%     
==========================================
  Files         310      310              
  Lines       41475    41475              
==========================================
- Hits        32188    32178      -10     
- Misses       9287     9297      +10     

Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

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

Thanks!

Looks like manual span handling is an anti-pattern, we should use the instrument macros on split-out functions instead.

@dconnolly dconnolly removed the do-not-merge Tells Mergify not to merge this PR label Jun 14, 2023
mergify bot added a commit that referenced this pull request Jun 14, 2023
@mergify mergify bot merged commit 9f0e182 into main Jun 14, 2023
@mergify mergify bot deleted the fix-shared-span branch June 14, 2023 19:05
@teor2345 teor2345 mentioned this pull request Jun 28, 2023
44 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants