-
Notifications
You must be signed in to change notification settings - Fork 4.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
Forwarder: forward_packets w/o metrics #30925
Conversation
ded6b09
to
2ed673c
Compare
Codecov Report
@@ Coverage Diff @@
## master #30925 +/- ##
========================================
Coverage 81.5% 81.5%
========================================
Files 727 728 +1
Lines 205166 205477 +311
========================================
+ Hits 167295 167557 +262
- Misses 37871 37920 +49 |
/// Forwards all valid, unprocessed packets in the iterator, up to a rate limit. | ||
/// Returns whether forwarding succeeded, the number of attempted forwarded packets | ||
/// if any, the time spent forwarding, and the leader pubkey if any. | ||
fn forward_packets<'a>( |
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.
Put this fn higher since in the worker PR it will become pub(crate)
let conn = self.connection_cache.get_connection(addr); | ||
conn.send_data_batch_async(packet_vec) | ||
} | ||
ForwardOption::NotForward => panic!("should not forward"), |
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.
only called within forward_packets
which exits early on ForwardOption::NotForward
due to get_leader_and_addr
checks.
@lijunwangs, I'm thinking maybe this PR (includes changes from #30923) is better as a standalone - makes it more clear why the change is happening. |
Planning to follow-up on this PR with some actual tests of the forwarder. The ones that currently exist are ignored |
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.
Looks good to me
Problem
Separate forwarding from metrics updates - banking stage workers will not use the same metrics structs.
Summary of Changes
This is a combination of and is blocked by #30920, #30921, #30922, #30923
Fixes #