Browse Source

grpcproxy: respect prev_kv flag

Anthony Romano 9 years ago
parent
commit
768ccb8c10
1 changed files with 3 additions and 1 deletions
  1. 3 1
      proxy/grpcproxy/kv.go

+ 3 - 1
proxy/grpcproxy/kv.go

@@ -151,6 +151,8 @@ func DelRequestToOp(r *pb.DeleteRangeRequest) clientv3.Op {
 	if len(r.RangeEnd) != 0 {
 		opts = append(opts, clientv3.WithRange(string(r.RangeEnd)))
 	}
-
+	if r.PrevKv {
+		opts = append(opts, clientv3.WithPrevKV())
+	}
 	return clientv3.OpDelete(string(r.Key), opts...)
 }