Explorar o código

grpcproxy: support CountOnly

TestKVRange from client integration tests was failing.
Anthony Romano %!s(int64=9) %!d(string=hai) anos
pai
achega
c22ba766d5
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      proxy/grpcproxy/kv.go

+ 3 - 0
proxy/grpcproxy/kv.go

@@ -190,6 +190,9 @@ func RangeRequestToOp(r *pb.RangeRequest) clientv3.Op {
 	opts = append(opts, clientv3.WithMinCreateRev(r.MinCreateRevision))
 	opts = append(opts, clientv3.WithMaxModRev(r.MaxModRevision))
 	opts = append(opts, clientv3.WithMinModRev(r.MinModRevision))
+	if r.CountOnly {
+		opts = append(opts, clientv3.WithCountOnly())
+	}
 
 	if r.Serializable {
 		opts = append(opts, clientv3.WithSerializable())