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
Describe the bug
The default exponential backoff algorithm defined in RetryConfigFromDeliverySpec() is incorrect and does not implement the advertised calculation from DeliverySpec.BackoffDelay. Instead of implementing backoffDelay*2^<numberOfRetries> as advertised, it is coded as (backoffDelay*2)^<numberOfRetries>.
Not only does this not operate as expected, but results in negative Durations due to the fact that time.Duration is stored in nanoseconds, and raising such large numbers to exponential powers quickly exceeds the int64 size of time.Duration, causing a roll-over to negative values.
Expected behavior
The algorithm should be implemented as documented and not roll-over to negative time.Duration values.
To Reproduce
Create a Subscription which specifies the following spec.delivery...
Describe the bug
The default exponential backoff algorithm defined in
RetryConfigFromDeliverySpec()
is incorrect and does not implement the advertised calculation fromDeliverySpec.BackoffDelay
. Instead of implementingbackoffDelay*2^<numberOfRetries>
as advertised, it is coded as(backoffDelay*2)^<numberOfRetries>
.Not only does this not operate as expected, but results in negative Durations due to the fact that time.Duration is stored in nanoseconds, and raising such large numbers to exponential powers quickly exceeds the int64 size of time.Duration, causing a roll-over to negative values.
Expected behavior
The algorithm should be implemented as documented and not roll-over to negative time.Duration values.
To Reproduce
Create a Subscription which specifies the following
spec.delivery
......and attempt to send events to a channel which utilizes
RetryConfigFromDeliverySpec()
andDispatchMessageWithRetries()
.Knative release version
v0.17.4
The text was updated successfully, but these errors were encountered: