-
Notifications
You must be signed in to change notification settings - Fork 214
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
[Merged by Bors] - fetch/peers: make latency based selection biased towards last requests #5688
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5688 +/- ##
=========================================
- Coverage 79.8% 79.7% -0.2%
=========================================
Files 279 279
Lines 28426 28468 +42
=========================================
- Hits 22712 22704 -8
- Misses 4148 4199 +51
+ Partials 1566 1565 -1 ☔ View full report in Codecov by Sentry. |
bors try |
bors cancel |
bors try |
tryAlready running a review |
tryBuild failed: |
bors try |
tryBuild failed: |
go func() { | ||
data, err := f.sendBatch(peer, batch) |
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.
Not part of this PR, but this part of the code seems like it can be improved:
- the spawned go routine isn't tracked via an
errgroup.Group
orsync.Waitgroup
- there is no cancellation via a
context.Context
in place, the caller has no control over when sending a request shall be aborted (shutdown or timeout) handleHashError
locks a mutex for its whole lifetime, whilereceiveResponse
does not. So if something is wrong and a lot of errors happen everything might slow down 🤔
bors try |
tryBuild failed: |
bors merge |
#5688) in the flaky system test it took 4 minutes to stop sending requests to a node that was actively dropping requests. in this pr i switched peer latency estimator to be biased towards latency observed in last requests, i looked up if/how lotus node handles similar issues. beside that there will be an INFO log with top peers stats, and global average latency in nanoseconds and total number of peers. by default node will emit log every 30m and it can be tuned by adding log-peer-stats-interval in fetch section of the config. ```json "fetch": { "log-peer-stats-interval": "1m" } ```
Build failed: |
bors merge |
#5688) in the flaky system test it took 4 minutes to stop sending requests to a node that was actively dropping requests. in this pr i switched peer latency estimator to be biased towards latency observed in last requests, i looked up if/how lotus node handles similar issues. beside that there will be an INFO log with top peers stats, and global average latency in nanoseconds and total number of peers. by default node will emit log every 30m and it can be tuned by adding log-peer-stats-interval in fetch section of the config. ```json "fetch": { "log-peer-stats-interval": "1m" } ```
Build failed (retrying...): |
#5688) in the flaky system test it took 4 minutes to stop sending requests to a node that was actively dropping requests. in this pr i switched peer latency estimator to be biased towards latency observed in last requests, i looked up if/how lotus node handles similar issues. beside that there will be an INFO log with top peers stats, and global average latency in nanoseconds and total number of peers. by default node will emit log every 30m and it can be tuned by adding log-peer-stats-interval in fetch section of the config. ```json "fetch": { "log-peer-stats-interval": "1m" } ```
Pull request successfully merged into develop. Build succeeded:
|
in the flaky system test it took 4 minutes to stop sending requests to a node that was actively dropping requests.
in this pr i switched peer latency estimator to be biased towards latency observed in last requests, i looked up if/how lotus node handles similar issues.
beside that there will be an INFO log with top peers stats, and global average latency in nanoseconds and total number of peers. by default node will emit log every 30m and it can be tuned by adding log-peer-stats-interval in fetch section of the config.