src/client: Make subscribe stream capacity explicit#36
Merged
mxinden merged 4 commits intotestground:masterfrom Aug 30, 2022
Merged
src/client: Make subscribe stream capacity explicit#36mxinden merged 4 commits intotestground:masterfrom
mxinden merged 4 commits intotestground:masterfrom
Conversation
Makes footgun on `Client::subscribe` explicit. > Note that once the capacity of the returned [`Stream`] is reached, the > background task blocks and thus all work related to the [`Client`] will > pause until elements from the [`Stream`] are consumed and thus capacity > is freed. Callers of [`Client::subscribe`] should either set a high > capacity, continuously read from the returned [`Stream`] or drop it.
Contributor
|
Nice, is this the reason why tests are hanging on failures? The Testground instance failed with: |
Member
Author
No. This should not be related to any CI failures. |
The latter seems to be too large for a channel to handle.
…subscribe-capacity
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Makes footgun on
Client::subscribeexplicit.This has probably cost me 1h to debug on libp2p/test-plans#26. What do folks think?