From 4518b4874e1d18cf68e86b517629c40c50ad75e4 Mon Sep 17 00:00:00 2001 From: Cristian Ferretti <37232625+jcferretti@users.noreply.github.com> Date: Fri, 14 Jun 2024 19:55:06 -0400 Subject: [PATCH] Undo change to Campaign; no need --- client/v3/concurrency/election.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/v3/concurrency/election.go b/client/v3/concurrency/election.go index 6ddab9208..6828fa008 100644 --- a/client/v3/concurrency/election.go +++ b/client/v3/concurrency/election.go @@ -73,7 +73,7 @@ func (e *Election) Campaign(ctx context.Context, val string) error { k := fmt.Sprintf("%s%x", e.keyPrefix, s.Lease()) txn := client.Txn(ctx).If(v3.Compare(v3.CreateRevision(k), "=", 0)) txn = txn.Then(v3.OpPut(k, val, v3.WithLease(s.Lease()))) - txn = txn.Else(v3.OpGet(k, v3.WithFirstCreate()...)) + txn = txn.Else(v3.OpGet(k)) resp, err := txn.Commit() if err != nil { return err