You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.bee/pkg/pushsync/pushsync.go
Line 52 in 92de285
Possible solution
Update the following line to ensure that at least one entry exists in the channel.
bee/pkg/pushsync/pushsync.go
Line 342 in 92de285
should read:
retryC := make(chan struct{}, max(1,parallelForwards))
The text was updated successfully, but these errors were encountered: