-
Notifications
You must be signed in to change notification settings - Fork 185
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
Khalil/1899 async rpc sent tracker #4553
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4553 +/- ##
==========================================
+ Coverage 54.44% 54.48% +0.03%
==========================================
Files 912 912
Lines 85165 85253 +88
==========================================
+ Hits 46372 46453 +81
- Misses 35216 35225 +9
+ Partials 3577 3575 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…w/flow-go into khalil/1899-async-rpc-sent-tracker
Co-authored-by: Yahya Hassanzadeh, Ph.D. <[email protected]>
Co-authored-by: Yahya Hassanzadeh, Ph.D. <[email protected]>
Co-authored-by: Yahya Hassanzadeh, Ph.D. <[email protected]>
…w/flow-go into khalil/1899-async-rpc-sent-tracker
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 great, except the two comments I made, the rest is good 🚀 .
if err != nil { | ||
return fmt.Errorf("failed to get track rpc work nonce: %w", err) | ||
} | ||
if ok := t.workerPool.Submit(trackableRPC{Nonce: n, rpc: rpc}); !ok { |
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.
Please add tests for the following scenarios:
- Duplicate RPCs with different nonce values; both should be processed.
- Distinct RPCs tracked concurrently; a worker should eventually pick each.
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.
// All worker functions will be run in parallel when the ComponentManager is started. | ||
// Note: AddWorker is not concurrency-safe, and should only be called on an individual builder | ||
// within a single goroutine. | ||
// within a single goroutine.// AddWorker adds a ComponentWorker closure to the ComponentManagerBuilder |
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.
the formatting here is messed up. Can you revert the changes to this file?
bors merge |
4553: Khalil/1899 async rpc sent tracker r=kc1116 a=kc1116 This PR adds a worker pool to the gossipsub mesh tracer rpc sent tracker worker pool. RPC control messages are processed synchronously, so it's imperative that any sub-process involved in the processing of RPC's must be non-blocking. This PR also updates the tracker to keep track of the `last highest iHaves size`, this will be used during iWant flooding detection to dynamically update the sample size of iWants expected based on the most recent largest iHaves sent. Further reading: https://github.com/dapperlabs/flow-go/issues/6472 Co-authored-by: Khalil Claybon <[email protected]>
Build failed: |
This PR adds a worker pool to the gossipsub mesh tracer rpc sent tracker worker pool. RPC control messages are processed synchronously, so it's imperative that any sub-process involved in the processing of RPC's must be non-blocking. This PR also updates the tracker to keep track of the
last highest iHaves size
, this will be used during iWant flooding detection to dynamically update the sample size of iWants expected based on the most recent largest iHaves sent.Further reading: https://github.com/dapperlabs/flow-go/issues/6472