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

Cannot disable pushsync multiplexer #4681

Closed
ldeffenb opened this issue May 17, 2024 · 0 comments · Fixed by #4682
Closed

Cannot disable pushsync multiplexer #4681

ldeffenb opened this issue May 17, 2024 · 0 comments · Fixed by #4682
Assignees
Labels
issue needs-triaging new issues that need triaging

Comments

@ldeffenb
Copy link
Collaborator

ldeffenb commented May 17, 2024

Context

2.1.0-rc2 (and earlier versions)

Summary

I tried disabling the pushsync multiplexer by setting maxMultiplexForwards to zero, but that completely disabled push syncing.

Expected behavior

maxMultiplexForwards should be able to be set to zero to disable the pushsync multiplexer.

Actual behavior

Setting the value to zero completely disables push syncing because the retryC channel has zero buffer space. Violates the "Principle of least astonishment" (https://en.wikipedia.org/wiki/Principle_of_least_astonishment).

Steps to reproduce

Set maxMultiplexForwards to zero and watch how push syncs never happen because the initial retry() invocation doesn't have any room to queue into retryC and therefore the pushsync retry loop never activates.

maxMultiplexForwards = 2 // number of extra peers to forward the request from the multiplex node

Possible solution

Update the following line to ensure that at least one entry exists in the channel.

retryC := make(chan struct{}, parallelForwards)

should read:
retryC := make(chan struct{}, max(1,parallelForwards))

@ldeffenb ldeffenb added the needs-triaging new issues that need triaging label May 17, 2024
@bee-runner bee-runner bot added the issue label May 17, 2024
@ldeffenb ldeffenb self-assigned this May 17, 2024
@istae istae linked a pull request May 27, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue needs-triaging new issues that need triaging
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant