mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
clientv3: Fix inconsistent naming convention in v3 client.
In order to have a consistent naming for variable/function names pertaining to ModifiedRevision, all occurrences have been renamed to ModRevision.
This commit is contained in:
@@ -31,7 +31,7 @@ var (
|
||||
|
||||
// deleteRevKey deletes a key by revision, returning false if key is missing
|
||||
func deleteRevKey(kv v3.KV, key string, rev int64) (bool, error) {
|
||||
cmp := v3.Compare(v3.ModifiedRevision(key), "=", rev)
|
||||
cmp := v3.Compare(v3.ModRevision(key), "=", rev)
|
||||
req := v3.OpDelete(key)
|
||||
txnresp, err := kv.Txn(context.TODO()).If(cmp).Then(req).Commit()
|
||||
if err != nil {
|
||||
|
||||
@@ -123,7 +123,7 @@ func newSequentialKV(kv v3.KV, prefix, val string, leaseID v3.LeaseID) (*RemoteK
|
||||
baseKey := "__" + prefix
|
||||
|
||||
// current revision might contain modification so +1
|
||||
cmp := v3.Compare(v3.ModifiedRevision(baseKey), "<", resp.Header.Revision+1)
|
||||
cmp := v3.Compare(v3.ModRevision(baseKey), "<", resp.Header.Revision+1)
|
||||
reqPrefix := v3.OpPut(baseKey, "", v3.WithLease(leaseID))
|
||||
reqNewKey := v3.OpPut(newKey, val, v3.WithLease(leaseID))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user