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

remove redundant timeouts in Gossip #5118

Merged

Conversation

alexpyattaev
Copy link

@alexpyattaev alexpyattaev commented Mar 3, 2025

Problem

Unnecessary timeouts in Gossip Consume code. Similar timeouts were previously removed from turbine retransmit stage in #4335

Summary of Changes

  • Remove unneeded timeouts, save some CPU.
Partially addresses

#5034

Tested on MNB validator DmCowGH9DUHYCetfGaWzPzYCi455yDxewcycdyWuPLjx at 2025/03/03 14:50-16:00 UTC

Normal operation of gossip is not affected.
Restarts/shutdowns work ok.

@alexpyattaev alexpyattaev changed the title remove redundant timeouts remove redundant timeouts in Gossip Mar 3, 2025
@alexpyattaev alexpyattaev force-pushed the remove_timeouts_in_gossip_consume branch from dc83d6b to 8ed1aaf Compare March 4, 2025 19:24
@alexpyattaev alexpyattaev marked this pull request as ready for review March 4, 2025 19:38
Copy link

@gregcusack gregcusack left a comment

Choose a reason for hiding this comment

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

lgtm!

@@ -2127,7 +2126,7 @@ impl ClusterInfo {
let mut dropped_packets_counts = [0u64; 7];
let mut num_packets = 0;
for packet_batch in receiver
.recv_timeout(RECV_TIMEOUT)
.recv()

Choose a reason for hiding this comment

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

this just blocks forever until we receive a message right? think this should be ok since we don't need to do anything else except wait for messages here. plus we should constantly be getting messages

Copy link
Author

Choose a reason for hiding this comment

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

it blocks until message or disconnect from sender.

@alexpyattaev alexpyattaev merged commit 6faa007 into anza-xyz:master Mar 6, 2025
47 checks passed
@alexpyattaev alexpyattaev deleted the remove_timeouts_in_gossip_consume branch March 7, 2025 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants