Skip to content

Commit

Permalink
add canceled status for CreateIndex api
Browse files Browse the repository at this point in the history
Signed-off-by: kpango <[email protected]>
  • Loading branch information
kpango committed Dec 19, 2022
1 parent 512541b commit d9ef555
Show file tree
Hide file tree
Showing 30 changed files with 2,007 additions and 3,806 deletions.
2 changes: 1 addition & 1 deletion apis/grpc/v1/agent/core/agent.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/grpc/v1/agent/sidecar/sidecar.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/grpc/v1/discoverer/discoverer.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/grpc/v1/filter/egress/egress_filter.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/grpc/v1/filter/ingress/ingress_filter.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/grpc/v1/manager/index/index_manager.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/grpc/v1/payload/payload.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/grpc/v1/vald/filter.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/grpc/v1/vald/insert.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/grpc/v1/vald/object.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/grpc/v1/vald/remove.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/grpc/v1/vald/search.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/grpc/v1/vald/update.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/grpc/v1/vald/upsert.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions example/client/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ replace (
github.com/golang/protobuf => github.com/golang/protobuf v1.5.2
github.com/kpango/glg => github.com/kpango/glg v1.6.14
github.com/pkg/sftp => github.com/pkg/sftp v1.13.5
golang.org/x/crypto => golang.org/x/crypto v0.3.0
golang.org/x/net => golang.org/x/net v0.3.0
golang.org/x/crypto => golang.org/x/crypto v0.4.0
golang.org/x/net => golang.org/x/net v0.4.0
golang.org/x/text => golang.org/x/text v0.5.0
google.golang.org/genproto => google.golang.org/genproto v0.0.0-20221205194025-8222ab48f5fc
google.golang.org/genproto => google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37
google.golang.org/grpc => google.golang.org/grpc v1.51.0
google.golang.org/protobuf => google.golang.org/protobuf v1.28.1
gopkg.in/yaml.v2 => gopkg.in/yaml.v2 v2.4.0
Expand All @@ -23,7 +23,7 @@ require (
github.com/kpango/glg v1.6.14
github.com/vdaas/vald-client-go v1.6.3
gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946
google.golang.org/grpc v1.50.1
google.golang.org/grpc v1.51.0
)

require (
Expand Down
8 changes: 4 additions & 4 deletions example/client/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ github.com/vdaas/vald-client-go v1.6.3/go.mod h1:WiE3uVM1gjAEi4wbQi3S7lwfASR4BMi
go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY=
golang.org/x/net v0.3.0 h1:VWL6FNY2bEEmsGVKabSlHu5Irp34xmMRoqb/9lF9lxk=
golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU=
golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM=
Expand All @@ -28,8 +28,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk=
gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946 h1:vJpL69PeUullhJyKtTjHjENEmZU3BkO4e+fod7nKzgM=
gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946/go.mod h1:BQUWDHIAygjdt1HnUPQ0eWqLN2n5FwJycrpYUVUOx2I=
google.golang.org/genproto v0.0.0-20221205194025-8222ab48f5fc h1:nUKKji0AarrQKh6XpFEpG3p1TNztxhe7C8TcUvDgXqw=
google.golang.org/genproto v0.0.0-20221205194025-8222ab48f5fc/go.mod h1:1dOng4TWOomJrDGhpXjfCD35wQC6jnC7HpRmOFRqEV0=
google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37 h1:jmIfw8+gSvXcZSgaFAGyInDXeWzUhvYH57G/5GKMn70=
google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U=
google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,8 @@ replace (
go4.org/unsafe/assume-no-moving-gc => go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760
gocloud.dev => gocloud.dev v0.27.0
golang.org/x/crypto => golang.org/x/crypto v0.4.0
golang.org/x/exp => golang.org/x/exp v0.0.0-20221215174704-0915cd710c24
golang.org/x/exp/typeparams => golang.org/x/exp/typeparams v0.0.0-20221215174704-0915cd710c24
golang.org/x/exp => golang.org/x/exp v0.0.0-20221217163422-3c43f8badb15
golang.org/x/exp/typeparams => golang.org/x/exp/typeparams v0.0.0-20221217163422-3c43f8badb15
golang.org/x/image => golang.org/x/image v0.2.0
golang.org/x/lint => golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
golang.org/x/mobile => golang.org/x/mobile v0.0.0-20221110043201-43a038452099
Expand Down Expand Up @@ -563,6 +563,7 @@ require (
github.com/gocql/gocql v0.0.0-20200131111108-92af2e088537
github.com/gocraft/dbr/v2 v2.0.0-00010101000000-000000000000
github.com/google/go-cmp v0.5.9
github.com/google/uuid v1.3.0
github.com/gorilla/mux v0.0.0-00010101000000-000000000000
github.com/hashicorp/go-version v0.0.0-00010101000000-000000000000
github.com/klauspost/compress v1.15.1
Expand Down Expand Up @@ -647,7 +648,6 @@ require (
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/google/wire v0.5.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect
github.com/googleapis/gax-go/v2 v2.7.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -628,10 +628,10 @@ gocloud.dev v0.27.0 h1:j0WTUsnKTxCsWO7y8T+YCiBZUmLl9w/WIowqAY3yo0g=
gocloud.dev v0.27.0/go.mod h1:YlYKhYsY5/1JdHGWQDkAuqkezVKowu7qbe9aIeUF6p0=
golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8=
golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80=
golang.org/x/exp v0.0.0-20221215174704-0915cd710c24 h1:6w3iSY8IIkp5OQtbYj8NeuKG1jS9d+kYaubXqsoOiQ8=
golang.org/x/exp v0.0.0-20221215174704-0915cd710c24/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
golang.org/x/exp/typeparams v0.0.0-20221215174704-0915cd710c24 h1:+iZuikSm1jIhtO1dsw9jQcYCoGFEDDVXp236qRsnqK4=
golang.org/x/exp/typeparams v0.0.0-20221215174704-0915cd710c24/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
golang.org/x/exp v0.0.0-20221217163422-3c43f8badb15 h1:5oN1Pz/eDhCpbMbLstvIPa0b/BEQo6g6nwV3pLjfM6w=
golang.org/x/exp v0.0.0-20221217163422-3c43f8badb15/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
golang.org/x/exp/typeparams v0.0.0-20221217163422-3c43f8badb15 h1:WumQqbro49zP5y7xSPDDdBZBwiUrWNZ7ZbKUQst9RiA=
golang.org/x/exp/typeparams v0.0.0-20221217163422-3c43f8badb15/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
golang.org/x/image v0.2.0 h1:/DcQ0w3VHKCC5p0/P2B0JpAZ9Z++V2KOo2fyU89CXBQ=
golang.org/x/image v0.2.0/go.mod h1:la7oBXb9w3YFjBqaAwtynVioc1ZvOnNteUNrifGNmAI=
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug=
Expand Down
21 changes: 21 additions & 0 deletions internal/test/data/vector/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package vector
import (
"math"
"math/rand"
"time"

"github.com/vdaas/vald/internal/errors"
irand "github.com/vdaas/vald/internal/rand"
Expand All @@ -30,6 +31,7 @@ type (
const (
Gaussian Distribution = iota
Uniform
NegativeUniform

// NOTE: mean:128, sigma:128/3, all of 99.7% are in [0, 255].
gaussianMean float64 = 128
Expand All @@ -46,6 +48,8 @@ func Float32VectorGenerator(d Distribution) (Float32VectorGeneratorFunc, error)
return GaussianDistributedFloat32VectorGenerator, nil
case Uniform:
return UniformDistributedFloat32VectorGenerator, nil
case NegativeUniform:
return NegativeUniformDistributedFloat32VectorGenerator, nil
default:
return nil, ErrUnknownDistribution
}
Expand Down Expand Up @@ -82,6 +86,23 @@ func UniformDistributedFloat32VectorGenerator(n, dim int) [][]float32 {
return genF32Slice(n, dim, rand.Float32)
}

// NegativeUniformDistributedFloat32VectorGenerator returns n float32 vectors with dim dimension and their values under Uniform distribution
func NegativeUniformDistributedFloat32VectorGenerator(n, dim int) (vecs [][]float32) {
left, right := dim/2, dim-dim/2
lvs := genF32Slice(n, left, func() float32 {
return -rand.Float32()
})
rvs := UniformDistributedFloat32VectorGenerator(n, right)
vecs = make([][]float32, 0, n)
rand.Seed(time.Now().UnixNano())
for i := 0; i < n; i++ {
vs := append(lvs[i], rvs[i]...)
rand.Shuffle(len(vs), func(i, j int) { vs[i], vs[j] = vs[j], vs[i] })
vecs = append(vecs, vs)
}
return vecs
}

// GaussianDistributedFloat32VectorGenerator returns n float32 vectors with dim dimension and their values under Gaussian distribution
func GaussianDistributedFloat32VectorGenerator(n, dim int) [][]float32 {
return genF32Slice(n, dim, func() float32 {
Expand Down
Loading

0 comments on commit d9ef555

Please sign in to comment.