diff --git a/pkg/usagestats/reporter.go b/pkg/usagestats/reporter.go index d66b8fb6c..3783a6a45 100644 --- a/pkg/usagestats/reporter.go +++ b/pkg/usagestats/reporter.go @@ -104,7 +104,8 @@ func (rep *Reporter) initLeader(ctx context.Context) ClusterSeed { return nil, false, nil } } - return &seed, true, nil + + return seed.Clone(), true, nil }); err != nil { level.Info(rep.logger).Log("msg", "failed to CAS cluster seed key", "err", err) continue diff --git a/pkg/usagestats/seed_test.go b/pkg/usagestats/seed_test.go index 5a6359c4a..c6156e0b3 100644 --- a/pkg/usagestats/seed_test.go +++ b/pkg/usagestats/seed_test.go @@ -59,7 +59,7 @@ func createMemberlist(t *testing.T, port, memberID int) *memberlist.KV { } func Test_Memberlist(t *testing.T) { - stabilityCheckInterval = time.Second + stabilityCheckInterval = 100 * time.Millisecond objectClient, err := client.NewBucket(context.Background(), client.Config{ StorageBackendConfig: client.StorageBackendConfig{