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

Prevent Clients from being Buffered in zebra-network #1697

Closed
2 tasks
teor2345 opened this issue Feb 5, 2021 · 1 comment
Closed
2 tasks

Prevent Clients from being Buffered in zebra-network #1697

teor2345 opened this issue Feb 5, 2021 · 1 comment
Labels
A-docs Area: Documentation A-rust Area: Updates to Rust code C-bug Category: This is a bug
Milestone

Comments

@teor2345
Copy link
Contributor

teor2345 commented Feb 5, 2021

Is your feature request related to a problem? Please describe.

PeerSet calls poll_ready multiple times on its (possibly wrapped) Client services. This polling is part of its design.

However, if these services are ever Buffered, these polls would fill up their Buffer reservations, causing hangs.

Describe the solution you'd like

In peer::peer_set::set::PeerSet::<impl Service>

  • document the constraints on the PeerSet's D::Service type
  • prevent Buffering of Clients at compile-time or runtime, if possible:
    • assert!(!format!("{:?}", service).contains("Buffer")) in PeerSet::poll_ready?

Describe alternatives you've considered

Do nothing: future changes could cause hangs.

Additional context

See #1593 for background.

@teor2345 teor2345 added C-bug Category: This is a bug A-docs Area: Documentation A-rust Area: Updates to Rust code S-needs-triage Status: A bug report needs triage P-High labels Feb 5, 2021
@teor2345
Copy link
Contributor Author

The tower crate was fixed a while ago (tower-rs/tower#476 and tower-rs/tower#480). Both these fixes are before Zebra's pinned git hash of tower.

But we didn't know these bugs were fixed until yesterday, because the tower::Buffer comments were outdated, and the tower::Buffer tests were incomplete.

Since tower is already fixed, this ticket is obsolete.

@mpguerra mpguerra removed the S-needs-triage Status: A bug report needs triage label Feb 18, 2021
@mpguerra mpguerra added this to the 2021 Sprint 3 milestone Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation A-rust Area: Updates to Rust code C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants