This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Forwarder: forward_packets w/o metrics#30925
Merged
Merged
Conversation
This was referenced Mar 28, 2023
Closed
Merged
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 |
apfitzge
commented
Apr 7, 2023
| /// 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>( |
Contributor
Author
There was a problem hiding this comment.
Put this fn higher since in the worker PR it will become pub(crate)
apfitzge
commented
Apr 7, 2023
| let conn = self.connection_cache.get_connection(addr); | ||
| conn.send_data_batch_async(packet_vec) | ||
| } | ||
| ForwardOption::NotForward => panic!("should not forward"), |
Contributor
Author
There was a problem hiding this comment.
only called within forward_packets which exits early on ForwardOption::NotForward due to get_leader_and_addr checks.
Contributor
Author
|
@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. |
Contributor
Author
|
Planning to follow-up on this PR with some actual tests of the forwarder. The ones that currently exist are ignored |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 #