Skip to content

Commit

Permalink
Use the correct key while CAS and CAD.
Browse files Browse the repository at this point in the history
  • Loading branch information
adityadani committed Mar 17, 2018
1 parent a1fd2d0 commit b699888
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions etcd/v3/kv_etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ func (et *etcdKV) CompareAndSet(
} // retry is needed

// server timeout
kvPair, err := et.Get(kvp.Key)
kvPair, err := et.Get(key)
if err != nil {
return nil, txnErr
}
Expand Down Expand Up @@ -565,7 +565,7 @@ func (et *etcdKV) CompareAndDelete(
} // retry is needed

// server timeout
_, err := et.Get(kvp.Key)
_, err := et.Get(key)
if err == kvdb.ErrNotFound {
// Our command succeeded
return kvp, nil
Expand Down

0 comments on commit b699888

Please sign in to comment.