Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: set backoff initial interval to 5s (#10629)

p0ny806976541c62
diff --git a/backend/common/retry.go b/backend/common/retry.go
index 842d0d75ed..1e4b31dc19 100644
--- a/backend/common/retry.go
+++ b/backend/common/retry.go
@@ -9,13 +9,16 @@ import (
const (
// Just choose an empirical timeout value. The default 15 minutes seems too long.
- timeout = 5 * time.Minute
+ timeout = 5 * time.Minute
+ initialInterval = 5 * time.Second
)
// Retry uses exponential backoff with timeout.
func Retry(ctx context.Context, fn func() error) error {
b := backoff.NewExponentialBackOff()
b.MaxElapsedTime = timeout
+ b.InitialInterval = initialInterval
+ b.Reset()
bWithContext := backoff.WithContext(b, ctx)
return backoff.Retry(fn, bWithContext)
}