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

Use the correct bound for the semaphore in tower-batch #1670

Closed
teor2345 opened this issue Feb 3, 2021 · 0 comments · Fixed by #1691
Closed

Use the correct bound for the semaphore in tower-batch #1670

teor2345 opened this issue Feb 3, 2021 · 0 comments · Fixed by #1691
Assignees
Labels
A-rust Area: Updates to Rust code C-bug Category: This is a bug
Milestone

Comments

@teor2345
Copy link
Contributor

teor2345 commented Feb 3, 2021

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

tower-batch uses a semaphore bound of 1, but tower::Buffer uses the supplied bound:
https://github.com/ZcashFoundation/zebra/blob/main/tower-batch/src/service.rs#L60
https://docs.rs/tower/0.4.4/src/tower/buffer/service.rs.html#86

Describe the solution you'd like

We should use the supplied bound for the semaphore, so tower-batch can handle the expected number of concurrent callers.

Describe alternatives you've considered

Do nothing: the code might hang or otherwise be slow.

Additional context

This issue was discovered during the review in #1593. It could be a cause of the hangs in #1435, so it's a high priority.

@teor2345 teor2345 added C-bug Category: This is a bug E-easy A-rust Area: Updates to Rust code S-needs-triage Status: A bug report needs triage labels Feb 3, 2021
@teor2345 teor2345 added this to the 2021 Sprint 2 milestone Feb 3, 2021
@teor2345 teor2345 removed the E-easy label Feb 4, 2021
@mpguerra mpguerra removed the S-needs-triage Status: A bug report needs triage label Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

3 participants