Bump reva to latest main

to get https://github.com/opencloud-eu/reva/pull/339
This commit is contained in:
Ralf Haferkamp
2025-09-09 15:10:28 +02:00
committed by Ralf Haferkamp
parent a5e0c1ec4b
commit 65228f3188
27 changed files with 388 additions and 148 deletions
+2 -9
View File
@@ -1,7 +1,7 @@
package backoff
import (
"math/rand"
"math/rand/v2"
"time"
)
@@ -28,13 +28,7 @@ multiplied by the exponential, that is, between 2 and 6 seconds.
Note: MaxInterval caps the RetryInterval and not the randomized interval.
If the time elapsed since an ExponentialBackOff instance is created goes past the
MaxElapsedTime, then the method NextBackOff() starts returning backoff.Stop.
The elapsed time can be reset by calling Reset().
Example: Given the following default arguments, for 10 tries the sequence will be,
and assuming we go over the MaxElapsedTime on the 10th try:
Example: Given the following default arguments, for 9 tries the sequence will be:
Request # RetryInterval (seconds) Randomized Interval (seconds)
@@ -47,7 +41,6 @@ and assuming we go over the MaxElapsedTime on the 10th try:
7 5.692 [2.846, 8.538]
8 8.538 [4.269, 12.807]
9 12.807 [6.403, 19.210]
10 19.210 backoff.Stop
Note: Implementation is not thread-safe.
*/
+2 -2
View File
@@ -47,7 +47,7 @@ func WithNotify(n Notify) RetryOption {
}
}
// WithMaxTries limits the number of retry attempts.
// WithMaxTries limits the number of all attempts.
func WithMaxTries(n uint) RetryOption {
return func(args *retryOptions) {
args.MaxTries = n
@@ -97,7 +97,7 @@ func Retry[T any](ctx context.Context, operation Operation[T], opts ...RetryOpti
// Handle permanent errors without retrying.
var permanent *PermanentError
if errors.As(err, &permanent) {
return res, err
return res, permanent.Unwrap()
}
// Stop retrying if context is cancelled.