Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Keep track of the pending response for each peer individually #13941

Merged
merged 5 commits into from
Apr 20, 2023

Conversation

altonen
Copy link
Contributor

@altonen altonen commented Apr 18, 2023

When peer disconnects or the syncing is restarted, remove the pending response so syncing won't start sending duplicate requests/receive stale responses from disconnected peers.

Before this commit pending responses where stored in FuturesUnordered which made it hard to keep track of pending responses for each individual peer.

@altonen altonen added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit T0-node This PR/Issue is related to the topic “node”. labels Apr 18, 2023
@altonen altonen requested a review from a team April 18, 2023 10:27
When peer disconnects or the syncing is restarted, remove the pending
response so syncing won't start sending duplicate requests/receive stale
responses from disconnected peers.

Before this commit pending responses where stored in `FuturesUnordered`
which made it hard to keep track of pending responses for each individual
peer.
client/network/sync/src/lib.rs Outdated Show resolved Hide resolved
Co-authored-by: Bastian Köcher <git@kchr.de>
@altonen
Copy link
Contributor Author

altonen commented Apr 19, 2023

bot fmt

@command-bot
Copy link

command-bot bot commented Apr 19, 2023

@altonen https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2701477 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/fmt/fmt.sh". Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 38-bb16fa0a-f370-444c-9f61-cc162b2801be to cancel this command or bot cancel to cancel all commands in this pull request.

@command-bot
Copy link

command-bot bot commented Apr 19, 2023

@altonen Command "$PIPELINE_SCRIPTS_DIR/commands/fmt/fmt.sh" has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2701477 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2701477/artifacts/download.

client/network/sync/src/lib.rs Outdated Show resolved Hide resolved
client/network/sync/src/lib.rs Outdated Show resolved Hide resolved
client/network/sync/src/lib.rs Outdated Show resolved Hide resolved
client/network/sync/src/lib.rs Show resolved Hide resolved
altonen and others added 2 commits April 20, 2023 15:47
Co-authored-by: Dmitry Markin <dmitry@markin.tech>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
@altonen
Copy link
Contributor Author

altonen commented Apr 20, 2023

bot merge

@paritytech-processbot paritytech-processbot bot merged commit 9f0d54a into master Apr 20, 2023
@paritytech-processbot paritytech-processbot bot deleted the sync-rework-response-storage branch April 20, 2023 13:27
breathx pushed a commit to gear-tech/substrate that referenced this pull request Apr 21, 2023
…tech#13941)

* Keep track of the pending response for each peer individually

When peer disconnects or the syncing is restarted, remove the pending
response so syncing won't start sending duplicate requests/receive stale
responses from disconnected peers.

Before this commit pending responses where stored in `FuturesUnordered`
which made it hard to keep track of pending responses for each individual
peer.

* Update client/network/sync/src/lib.rs

Co-authored-by: Bastian Köcher <git@kchr.de>

* ".git/.scripts/commands/fmt/fmt.sh"

* Apply suggestions from code review

Co-authored-by: Dmitry Markin <dmitry@markin.tech>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>

* Update client/network/sync/src/lib.rs

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: command-bot <>
Co-authored-by: Dmitry Markin <dmitry@markin.tech>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
ukint-vs pushed a commit to gear-tech/substrate that referenced this pull request Apr 23, 2023
…tech#13941)

* Keep track of the pending response for each peer individually

When peer disconnects or the syncing is restarted, remove the pending
response so syncing won't start sending duplicate requests/receive stale
responses from disconnected peers.

Before this commit pending responses where stored in `FuturesUnordered`
which made it hard to keep track of pending responses for each individual
peer.

* Update client/network/sync/src/lib.rs

Co-authored-by: Bastian Köcher <git@kchr.de>

* ".git/.scripts/commands/fmt/fmt.sh"

* Apply suggestions from code review

Co-authored-by: Dmitry Markin <dmitry@markin.tech>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>

* Update client/network/sync/src/lib.rs

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: command-bot <>
Co-authored-by: Dmitry Markin <dmitry@markin.tech>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
jasl added a commit to Phala-Network/khala-parachain that referenced this pull request Apr 24, 2023
jasl added a commit to Phala-Network/khala-parachain that referenced this pull request Apr 24, 2023
Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

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

❤️

nathanwhit pushed a commit to nathanwhit/substrate that referenced this pull request Jul 19, 2023
…tech#13941)

* Keep track of the pending response for each peer individually

When peer disconnects or the syncing is restarted, remove the pending
response so syncing won't start sending duplicate requests/receive stale
responses from disconnected peers.

Before this commit pending responses where stored in `FuturesUnordered`
which made it hard to keep track of pending responses for each individual
peer.

* Update client/network/sync/src/lib.rs

Co-authored-by: Bastian Köcher <git@kchr.de>

* ".git/.scripts/commands/fmt/fmt.sh"

* Apply suggestions from code review

Co-authored-by: Dmitry Markin <dmitry@markin.tech>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>

* Update client/network/sync/src/lib.rs

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: command-bot <>
Co-authored-by: Dmitry Markin <dmitry@markin.tech>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit T0-node This PR/Issue is related to the topic “node”.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants