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(mdns): move IO off main task #4623

Merged
merged 28 commits into from Oct 20, 2023
Merged

fix(mdns): move IO off main task #4623

merged 28 commits into from Oct 20, 2023

Conversation

thomaseizinger
Copy link
Contributor

@thomaseizinger thomaseizinger commented Oct 11, 2023

Description

Resolves: #2591.

Notes & open questions

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

We create and destroy the interface states as the come up. Waking the
interface states only _sends_ queries but does not influence what we
send in response. We always respond with the up-to-date listen addresses
 anyway.
@thomaseizinger thomaseizinger changed the title Seal Provider trait fix(mdns): move IO off main task Oct 11, 2023
@thomaseizinger thomaseizinger added this to the v0.53.0 milestone Oct 11, 2023
@thomaseizinger thomaseizinger marked this pull request as draft October 11, 2023 06:29
@thomaseizinger thomaseizinger removed this from the v0.53.0 milestone Oct 11, 2023
@thomaseizinger thomaseizinger marked this pull request as ready for review October 11, 2023 06:40
Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Looks good to me overall.

protocols/mdns/src/behaviour.rs Show resolved Hide resolved
protocols/mdns/src/behaviour.rs Show resolved Hide resolved
protocols/mdns/src/behaviour.rs Show resolved Hide resolved
protocols/mdns/src/behaviour/iface.rs Outdated Show resolved Hide resolved
@thomaseizinger thomaseizinger marked this pull request as draft October 14, 2023 22:20
@thomaseizinger
Copy link
Contributor Author

thomaseizinger commented Oct 14, 2023

This turned out to be a breaking change because channels are not unwind-safe (see rust-lang/futures-rs#2772 and https://github.com/libp2p/rust-libp2p/actions/runs/6508062283/job/17676692014?pr=4623). Because we now store channels within mdns::Behaviour, that type is also no longer unwind safe.

@thomaseizinger thomaseizinger added this to the v0.53.0 milestone Oct 14, 2023
@mergify

This comment was marked as resolved.

@thomaseizinger thomaseizinger marked this pull request as ready for review October 20, 2023 01:14
@mergify
Copy link

mergify bot commented Oct 20, 2023

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

@thomaseizinger
Copy link
Contributor Author

@mergify refresh

@mergify
Copy link

mergify bot commented Oct 20, 2023

refresh

✅ Pull request refreshed

@mergify mergify bot merged commit 0181e86 into master Oct 20, 2023
72 checks passed
@mergify mergify bot deleted the fix/mdns-main-loop branch October 20, 2023 07:07
@mxinden
Copy link
Member

mxinden commented Oct 21, 2023

Thanks Thomas. This has been a long standing issue!

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.

mdns: don't perform IO on main task
3 participants