Skip to content
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

fix(request-response): Report failure when streams are at capacity #5417

Merged
merged 10 commits into from
Jun 4, 2024

Conversation

oblique
Copy link
Contributor

@oblique oblique commented May 24, 2024

Description

Fixes potential hanging issue if use relies on response or failures to make progress

Notes & open questions

We are investigating a bug in our project (eigerco/lumina#256) and @zvolin found out that when an outbound request can not be scheduled it didn't produce any errors.

Inbound requests do not need to produce this kind of error because they only get reported to the user when they successfully been scheduled.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

@oblique oblique changed the title fix(request-response)!: Report outbound failure when max concurrent streams is reached fix(request-response)!: Report outbound failure when max concurrent streams reached May 24, 2024
@oblique oblique changed the title fix(request-response)!: Report outbound failure when max concurrent streams reached fix(request-response)!: Report outbound failure when streams are at capacity May 24, 2024
@oblique oblique changed the title fix(request-response)!: Report outbound failure when streams are at capacity fix(request-response)!: Report failure when streams are at capacity May 24, 2024
@oblique
Copy link
Contributor Author

oblique commented May 24, 2024

@jxs We will appreciate it if this can make it to 0.54.

@jxs jxs requested a review from thomaseizinger May 24, 2024 16:24
@oblique oblique changed the title fix(request-response)!: Report failure when streams are at capacity fix(request-response): Report failure when streams are at capacity May 29, 2024
@thomaseizinger thomaseizinger requested a review from jxs June 1, 2024 22:00
jxs
jxs previously approved these changes Jun 3, 2024
Copy link
Member

@jxs jxs left a comment

Choose a reason for hiding this comment

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

LGTM thanks Yianis!

protocols/request-response/tests/error_reporting.rs Outdated Show resolved Hide resolved
protocols/request-response/tests/error_reporting.rs Outdated Show resolved Hide resolved
protocols/request-response/tests/error_reporting.rs Outdated Show resolved Hide resolved
@jxs jxs added the send-it label Jun 4, 2024
Copy link
Contributor

mergify bot commented Jun 4, 2024

This pull request has merge conflicts. Could you please resolve them @oblique? 🙏

@mergify mergify bot dismissed jxs’s stale review June 4, 2024 10:05

Approvals have been dismissed because the PR was updated after the send-it label was applied.

@mergify mergify bot merged commit af42122 into libp2p:master Jun 4, 2024
72 checks passed
@oblique oblique deleted the fix/req-resp-max-streams-failure branch June 4, 2024 14:46
@nazar-pc
Copy link
Contributor

nazar-pc commented Jun 4, 2024

@jxs I was under impression that 0.26.3 is already released, but it is not on crates.io 🤔

@jxs
Copy link
Member

jxs commented Jun 4, 2024

no no, sorry @nazar-pc I meant the present, that I was going to release. It's now released, see here cc @oblique

TimTinkers pushed a commit to unattended-backpack/rust-libp2p that referenced this pull request Sep 14, 2024
Fixes potential hanging issue if use relies on response or failures to make progress

Pull-Request: libp2p#5417.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants