diff options
| author | Stewart Miles <stewart@agentic.ai> | 2023-03-15 17:49:46 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-15 17:49:46 -0700 |
| commit | 57ab1f851656276f62124c3dc5e3fc0d15eed646 (patch) | |
| tree | e9dcc6fbf41c450a8e841a005105386a502876d2 /go.mod | |
| parent | dd71f54c6b8355a35cda134173d9ebb76a53b62c (diff) | |
| download | seaweedfs-57ab1f851656276f62124c3dc5e3fc0d15eed646.tar.xz seaweedfs-57ab1f851656276f62124c3dc5e3fc0d15eed646.zip | |
Use exponential backoff to query leader. (#4313)
`topology.Leader()` was using a backoff that typically
resulted in at least a 5s delay when initially starting
a master and raft server. This changes the backoff
algorithm to use exponential backoff starting with 100ms
and waiting up to 20s for leader selection.
Related to #4307
Diffstat (limited to 'go.mod')
| -rw-r--r-- | go.mod | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -10,6 +10,7 @@ require ( github.com/Azure/azure-storage-blob-go v0.15.0 github.com/Shopify/sarama v1.38.1 github.com/aws/aws-sdk-go v1.44.219 + github.com/cenkalti/backoff/v4 v4.2.0 github.com/beorn7/perks v1.0.1 // indirect github.com/bwmarrin/snowflake v0.3.0 github.com/cespare/xxhash/v2 v2.2.0 // indirect @@ -176,6 +177,7 @@ require ( github.com/aws/smithy-go v1.13.5 // indirect github.com/benbjohnson/clock v1.3.0 // indirect github.com/boltdb/bolt v1.3.1 // indirect + github.com/cenkalti/backoff/v4 v4.2.0 github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect github.com/d4l3k/messagediff v1.2.1 // indirect github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 // indirect |
