Skip to content

Commit

Permalink
Merge branch 'main' into feature/benchmark/add-benchmark-core-ngt
Browse files Browse the repository at this point in the history
  • Loading branch information
kpango authored Dec 4, 2023
2 parents 7592fa3 + a865801 commit d75690f
Show file tree
Hide file tree
Showing 102 changed files with 12,970 additions and 1,915 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ assignees: ""

<!--- Please change the versions below along with your environment -->

- Go Version: 1.21.3
- Go Version: 1.21.4
- Docker Version: 20.10.8
- Kubernetes Version: v1.28.2
- NGT Version: 2.1.3
- Kubernetes Version: v1.28.4
- NGT Version: 2.1.5
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/security_issue_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ assignees: ""

<!--- Please change the versions below along with your environment -->

- Go Version: 1.21.3
- Go Version: 1.21.4
- Docker Version: 20.10.8
- Kubernetes Version: v1.28.2
- NGT Version: 2.1.3
- Kubernetes Version: v1.28.4
- NGT Version: 2.1.5
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

<!--- Please change the versions below along with your environment -->

- Go Version: 1.21.3
- Go Version: 1.21.4
- Docker Version: 20.10.8
- Kubernetes Version: v1.28.2
- NGT Version: 2.1.3
- Kubernetes Version: v1.28.4
- NGT Version: 2.1.5

### Checklist:

Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ linters:
- errorlint
- execinquery
- exhaustive
- exhaustruct
- exportloopref
- forcetypeassert
- ginkgolinter
Expand Down Expand Up @@ -92,6 +91,7 @@ linters:
# Disabled by your configuration linters
# - cyclop
# - errcheck
# - exhaustruct
# - forbidigo
# - funlen
# - gci
Expand Down
4 changes: 2 additions & 2 deletions Makefile.d/functions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ define proto-code-gen
--plugin protoc-gen-go="$(GOBIN)/protoc-gen-go" \
--go-vtproto_out=$(GOPATH)/src \
--plugin protoc-gen-go-vtproto="$(GOBIN)/protoc-gen-go-vtproto" \
--go-vtproto_opt=features=grpc+marshal+unmarshal+size+equal+clone+pool \
--go-vtproto_opt=pool=$(ROOTDIR)/apis/proto/v1/payload.Object.Vector \
--go-vtproto_opt=features=grpc+marshal+unmarshal+size+equal+clone \
$1
endef
# --go-grpc_out=$(GOPATH)/src \
# --plugin protoc-gen-go-grpc="${GOBIN}/protoc-gen-go-grpc" \
# --go-vtproto_opt=pool=$(ROOTDIR)/apis/proto/v1/payload.Object.Vector \
# --go-vtproto_opt=pool=$(ROOTDIR)/apis/proto/v1/payload.Insert.MultiRequest \
# --go-vtproto_opt=pool=$(ROOTDIR)/apis/proto/v1/payload.Insert.Request \
# --go-vtproto_opt=pool=$(ROOTDIR)/apis/proto/v1/payload.Object.Vector \
Expand Down
2 changes: 2 additions & 0 deletions Makefile.d/k8s.mk
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ k8s/manifest/update: \
mv $(TEMP_DIR)/vald/templates/gateway/lb k8s/gateway/lb
mv $(TEMP_DIR)/vald/templates/manager/index k8s/manager/index
mv $(TEMP_DIR)/vald/templates/index/job/correction k8s/index/job/correction
mv $(TEMP_DIR)/vald/templates/index/job/creation k8s/index/job/creation
mv $(TEMP_DIR)/vald/templates/index/job/save k8s/index/job/save
rm -rf $(TEMP_DIR)

.PHONY: k8s/manifest/helm-operator/clean
Expand Down
2 changes: 0 additions & 2 deletions Makefile.d/proto.mk
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ $(PBGOS): \
find $(ROOTDIR)/apis/grpc/* -name '*.go' | xargs sed -i -E "s%google.golang.org/grpc/status%github.com/vdaas/vald/internal/net/grpc/status%g"
find $(ROOTDIR)/apis/grpc/* -name '*.go' | xargs sed -i -E "s%\"io\"%\"github.com/vdaas/vald/internal/io\"%g"
find $(ROOTDIR)/apis/grpc/* -name '*.go' | xargs sed -i -E "s%\"sync\"%\"github.com/vdaas/vald/internal/sync\"%g"
find $(ROOTDIR)/apis/grpc/* -name '*.go' | xargs sed -i -E "s/Vector = &Object_Vector\{\}/Vector = Object_VectorFromVTPool\(\)/g"
find $(ROOTDIR)/apis/grpc/* -name '*.go' | xargs sed -i -E "s/v := &Object_Vector\{\}/v := Object_VectorFromVTPool\(\)/g"

$(SWAGGERS): \
$(PROTOS) \
Expand Down
380 changes: 203 additions & 177 deletions apis/docs/v1/docs.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions apis/grpc/v1/agent/core/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ const (
SaveIndexRPCName = "SaveIndex"
CreateAndSaveIndexRPCName = "CreateAndSaveIndex"
IndexInfoRPCName = "IndexInfo"
GetTimestampRPCName = "GetTimestamp"
)
43 changes: 27 additions & 16 deletions 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.

38 changes: 38 additions & 0 deletions apis/grpc/v1/agent/core/agent_vtproto.pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ type AgentClient interface {
CreateAndSaveIndex(ctx context.Context, in *payload.Control_CreateIndexRequest, opts ...grpc.CallOption) (*payload.Empty, error)
// Represent the RPC to get the agent index information.
IndexInfo(ctx context.Context, in *payload.Empty, opts ...grpc.CallOption) (*payload.Info_Index_Count, error)
// Represent the RPC to get the vector metadata. This RPC is mainly used for index correction process
GetTimestamp(ctx context.Context, in *payload.Object_GetTimestampRequest, opts ...grpc.CallOption) (*payload.Object_Timestamp, error)
}

type agentClient struct {
Expand Down Expand Up @@ -96,6 +98,15 @@ func (c *agentClient) IndexInfo(ctx context.Context, in *payload.Empty, opts ...
return out, nil
}

func (c *agentClient) GetTimestamp(ctx context.Context, in *payload.Object_GetTimestampRequest, opts ...grpc.CallOption) (*payload.Object_Timestamp, error) {
out := new(payload.Object_Timestamp)
err := c.cc.Invoke(ctx, "/core.v1.Agent/GetTimestamp", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}

// AgentServer is the server API for Agent service.
// All implementations must embed UnimplementedAgentServer
// for forward compatibility
Expand All @@ -108,6 +119,8 @@ type AgentServer interface {
CreateAndSaveIndex(context.Context, *payload.Control_CreateIndexRequest) (*payload.Empty, error)
// Represent the RPC to get the agent index information.
IndexInfo(context.Context, *payload.Empty) (*payload.Info_Index_Count, error)
// Represent the RPC to get the vector metadata. This RPC is mainly used for index correction process
GetTimestamp(context.Context, *payload.Object_GetTimestampRequest) (*payload.Object_Timestamp, error)
mustEmbedUnimplementedAgentServer()
}

Expand All @@ -127,6 +140,9 @@ func (UnimplementedAgentServer) CreateAndSaveIndex(context.Context, *payload.Con
func (UnimplementedAgentServer) IndexInfo(context.Context, *payload.Empty) (*payload.Info_Index_Count, error) {
return nil, status.Errorf(codes.Unimplemented, "method IndexInfo not implemented")
}
func (UnimplementedAgentServer) GetTimestamp(context.Context, *payload.Object_GetTimestampRequest) (*payload.Object_Timestamp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetTimestamp not implemented")
}
func (UnimplementedAgentServer) mustEmbedUnimplementedAgentServer() {}

// UnsafeAgentServer may be embedded to opt out of forward compatibility for this service.
Expand Down Expand Up @@ -212,6 +228,24 @@ func _Agent_IndexInfo_Handler(srv interface{}, ctx context.Context, dec func(int
return interceptor(ctx, in, info, handler)
}

func _Agent_GetTimestamp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(payload.Object_GetTimestampRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AgentServer).GetTimestamp(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/core.v1.Agent/GetTimestamp",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AgentServer).GetTimestamp(ctx, req.(*payload.Object_GetTimestampRequest))
}
return interceptor(ctx, in, info, handler)
}

// Agent_ServiceDesc is the grpc.ServiceDesc for Agent service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
Expand All @@ -235,6 +269,10 @@ var Agent_ServiceDesc = grpc.ServiceDesc{
MethodName: "IndexInfo",
Handler: _Agent_IndexInfo_Handler,
},
{
MethodName: "GetTimestamp",
Handler: _Agent_GetTimestamp_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "apis/proto/v1/agent/core/agent.proto",
Expand Down
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.

4 changes: 2 additions & 2 deletions apis/grpc/v1/filter/egress/egress_filter_vtproto.pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (c *filterClient) FilterDistance(ctx context.Context, in *payload.Object_Di
}

func (c *filterClient) FilterVector(ctx context.Context, in *payload.Object_Vector, opts ...grpc.CallOption) (*payload.Object_Vector, error) {
out := payload.Object_VectorFromVTPool()
out := new(payload.Object_Vector)
err := c.cc.Invoke(ctx, "/filter.egress.v1.Filter/FilterVector", in, out, opts...)
if err != nil {
return nil, err
Expand Down Expand Up @@ -127,7 +127,7 @@ func _Filter_FilterDistance_Handler(srv interface{}, ctx context.Context, dec fu
}

func _Filter_FilterVector_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := payload.Object_VectorFromVTPool()
in := new(payload.Object_Vector)
if err := dec(in); err != nil {
return nil, err
}
Expand Down
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.

6 changes: 3 additions & 3 deletions apis/grpc/v1/filter/ingress/ingress_filter_vtproto.pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func NewFilterClient(cc grpc.ClientConnInterface) FilterClient {
}

func (c *filterClient) GenVector(ctx context.Context, in *payload.Object_Blob, opts ...grpc.CallOption) (*payload.Object_Vector, error) {
out := payload.Object_VectorFromVTPool()
out := new(payload.Object_Vector)
err := c.cc.Invoke(ctx, "/filter.ingress.v1.Filter/GenVector", in, out, opts...)
if err != nil {
return nil, err
Expand All @@ -66,7 +66,7 @@ func (c *filterClient) GenVector(ctx context.Context, in *payload.Object_Blob, o
}

func (c *filterClient) FilterVector(ctx context.Context, in *payload.Object_Vector, opts ...grpc.CallOption) (*payload.Object_Vector, error) {
out := payload.Object_VectorFromVTPool()
out := new(payload.Object_Vector)
err := c.cc.Invoke(ctx, "/filter.ingress.v1.Filter/FilterVector", in, out, opts...)
if err != nil {
return nil, err
Expand Down Expand Up @@ -127,7 +127,7 @@ func _Filter_GenVector_Handler(srv interface{}, ctx context.Context, dec func(in
}

func _Filter_FilterVector_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := payload.Object_VectorFromVTPool()
in := new(payload.Object_Vector)
if err := dec(in); err != nil {
return nil, err
}
Expand Down
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.

Loading

0 comments on commit d75690f

Please sign in to comment.