From 0f8060bedeeb4b9f05a2e0c480c82ad16c4633cc Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Mon, 5 Dec 2016 12:42:11 -0800 Subject: [PATCH] grpcproxy: handle 'IgnoreValue' field in PutRequest --- proxy/grpcproxy/kv.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proxy/grpcproxy/kv.go b/proxy/grpcproxy/kv.go index 1d6cf452a..3d0f9947e 100644 --- a/proxy/grpcproxy/kv.go +++ b/proxy/grpcproxy/kv.go @@ -187,7 +187,9 @@ func RangeRequestToOp(r *pb.RangeRequest) clientv3.Op { func PutRequestToOp(r *pb.PutRequest) clientv3.Op { opts := []clientv3.OpOption{} opts = append(opts, clientv3.WithLease(clientv3.LeaseID(r.Lease))) - + if r.IgnoreValue { + opts = append(opts, clientv3.WithIgnoreValue()) + } return clientv3.OpPut(string(r.Key), string(r.Value), opts...) }