From 189ec533f31f3a7ef6ff4c2226e3a5c7e1d1559f Mon Sep 17 00:00:00 2001 From: kpango Date: Thu, 9 May 2024 01:54:52 +0900 Subject: [PATCH] refactor index manager service Signed-off-by: kpango --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .../ISSUE_TEMPLATE/security_issue_report.md | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .github/workflows/release.yml | 2 +- Makefile.d/dependencies.mk | 3 +- Makefile.d/functions.mk | 4 +- apis/docs/v1/docs.md | 30 +- .../grpc/v1/manager/index/index_manager.pb.go | 46 +- .../manager/index/index_manager_vtproto.pb.go | 38 ++ apis/grpc/v1/payload/payload.pb.go | 409 +++++++++++------- apis/grpc/v1/payload/payload.pb.json.go | 10 + apis/grpc/v1/payload/payload_vtproto.pb.go | 379 ++++++++++++++++ .../v1/manager/index/index_manager.proto | 4 + apis/proto/v1/payload/payload.proto | 9 + .../manager/index/index_manager.swagger.json | 44 ++ example/client/go.mod | 8 +- example/client/go.sum | 8 +- go.mod | 64 +-- go.sum | 87 ++-- internal/info/info.go | 54 ++- internal/net/grpc/errdetails/errdetails.go | 35 +- internal/observability/trace/status.go | 2 +- pkg/agent/core/faiss/handler/grpc/insert.go | 2 +- pkg/agent/core/faiss/handler/grpc/remove.go | 2 +- pkg/agent/core/faiss/handler/grpc/search.go | 2 +- pkg/agent/core/faiss/handler/grpc/update.go | 2 +- pkg/agent/core/ngt/handler/grpc/flush.go | 2 +- pkg/agent/core/ngt/handler/grpc/insert.go | 2 +- .../core/ngt/handler/grpc/linear_search.go | 2 +- pkg/agent/core/ngt/handler/grpc/remove.go | 2 +- pkg/agent/core/ngt/handler/grpc/search.go | 2 +- pkg/agent/core/ngt/handler/grpc/update.go | 2 +- pkg/agent/core/ngt/service/ngt_test.go | 29 +- pkg/manager/index/handler/grpc/handler.go | 10 + .../index/handler/grpc/handler_test.go | 110 +++++ pkg/manager/index/service/indexer.go | 249 ++++++----- pkg/manager/index/service/indexer_test.go | 145 +++++++ pkg/manager/index/service/option.go | 26 +- pkg/manager/index/usecase/indexer.go | 1 - rust/Cargo.lock | 12 +- rust/libs/proto/src/manager.index.v1.tonic.rs | 99 +++++ rust/libs/proto/src/payload.v1.rs | 14 + versions/GOLANGCILINT_VERSION | 2 +- versions/K3S_VERSION | 2 +- versions/NGT_VERSION | 2 +- versions/PROMETHEUS_STACK_VERSION | 2 +- versions/YQ_VERSION | 2 +- versions/actions/SOFTPROPS_ACTION_GH_RELEASE | 2 +- 48 files changed, 1502 insertions(+), 467 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index d3f1047a602..9a7cce81522 100755 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -26,4 +26,4 @@ assignees: "" - Rust Version: 1.77.2 - Docker Version: 20.10.8 - Kubernetes Version: v1.30.0 -- NGT Version: 2.2.1 +- NGT Version: 2.2.2 diff --git a/.github/ISSUE_TEMPLATE/security_issue_report.md b/.github/ISSUE_TEMPLATE/security_issue_report.md index d99285a63b0..30b98bf339a 100644 --- a/.github/ISSUE_TEMPLATE/security_issue_report.md +++ b/.github/ISSUE_TEMPLATE/security_issue_report.md @@ -20,4 +20,4 @@ assignees: "" - Rust Version: 1.77.2 - Docker Version: 20.10.8 - Kubernetes Version: v1.30.0 -- NGT Version: 2.2.1 +- NGT Version: 2.2.2 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 8de61826432..4165c98b20b 100755 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -20,7 +20,7 @@ - Rust Version: 1.77.2 - Docker Version: 20.10.8 - Kubernetes Version: v1.30.0 -- NGT Version: 2.2.1 +- NGT Version: 2.2.2 ### Checklist diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7a443ce3188..b6ef7ae6695 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,7 +61,7 @@ jobs: git push origin ${VERSION} echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT - name: Create release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 env: GITHUB_TOKEN: ${{ secrets.DISPATCH_TOKEN }} with: diff --git a/Makefile.d/dependencies.mk b/Makefile.d/dependencies.mk index 8dece00fcad..f97d76007ac 100644 --- a/Makefile.d/dependencies.mk +++ b/Makefile.d/dependencies.mk @@ -47,7 +47,8 @@ go/download: .PHONY: go/deps ## install Go package dependencies -go/deps: +go/deps: \ + update/go sed -i "3s/go [0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?/go $(GO_VERSION)/g" $(ROOTDIR)/hack/go.mod.default if $(GO_CLEAN_DEPS); then \ rm -rf $(ROOTDIR)/vendor \ diff --git a/Makefile.d/functions.mk b/Makefile.d/functions.mk index 9b1aa47f8b1..e1ec911292d 100644 --- a/Makefile.d/functions.mk +++ b/Makefile.d/functions.mk @@ -333,14 +333,12 @@ define gen-vald-crd endef define update-github-actions - @for ACTION_NAME in $1; do \ + @set -e; for ACTION_NAME in $1; do \ if [ -n "$$ACTION_NAME" ] && [ "$$ACTION_NAME" != "security-and-quality" ]; then \ FILE_NAME=`echo $$ACTION_NAME | tr '/' '_' | tr '-' '_' | tr '[:lower:]' '[:upper:]'`; \ if [ -n "$$FILE_NAME" ]; then \ if [ "$$ACTION_NAME" = "aquasecurity/trivy-action" ] || [ "$$ACTION_NAME" = "machine-learning-apps/actions-chatops" ]; then \ VERSION="master"; \ - elif [ "$$ACTION_NAME" = "softprops/action-gh-release" ]; then \ - VERSION="1.0.0"; \ else \ REPO_NAME=`echo $$ACTION_NAME | cut -d'/' -f1-2`; \ VERSION=`curl -fsSL https://api.github.com/repos/$$REPO_NAME/releases/latest | grep -Po '"tag_name": "\K.*?(?=")' | sed 's/v//g' | sed -E 's/[^0-9.]+//g'`;\ diff --git a/apis/docs/v1/docs.md b/apis/docs/v1/docs.md index 2a4a50ecb73..e19dfd35866 100644 --- a/apis/docs/v1/docs.md +++ b/apis/docs/v1/docs.md @@ -23,6 +23,8 @@ - [Info.IPs](#payload-v1-Info-IPs) - [Info.Index](#payload-v1-Info-Index) - [Info.Index.Count](#payload-v1-Info-Index-Count) + - [Info.Index.Detail](#payload-v1-Info-Index-Detail) + - [Info.Index.Detail.CountsEntry](#payload-v1-Info-Index-Detail-CountsEntry) - [Info.Index.UUID](#payload-v1-Info-Index-UUID) - [Info.Index.UUID.Committed](#payload-v1-Info-Index-UUID-Committed) - [Info.Index.UUID.Uncommitted](#payload-v1-Info-Index-UUID-Uncommitted) @@ -294,6 +296,27 @@ Represent the index count message. | indexing | [bool](#bool) | | The indexing index count. | | saving | [bool](#bool) | | The saving index count. | + + +### Info.Index.Detail + +Represent the index count for each Agents message. + +| Field | Type | Label | Description | +| ----------- | -------------------------------------------------------------------------- | -------- | ---------------------------------- | +| counts | [Info.Index.Detail.CountsEntry](#payload-v1-Info-Index-Detail-CountsEntry) | repeated | count infos for each agents | +| replica | [uint32](#uint32) | | index replica of vald cluster | +| live_agents | [uint32](#uint32) | | live agent replica of vald cluster | + + + +### Info.Index.Detail.CountsEntry + +| Field | Type | Label | Description | +| ----- | ------------------------------------------------ | ----- | ----------- | +| key | [string](#string) | | | +| value | [Info.Index.Count](#payload-v1-Info-Index-Count) | | | + ### Info.Index.UUID @@ -1156,9 +1179,10 @@ Represent the ingress filter service. Represent the index manager service. -| Method Name | Request Type | Response Type | Description | -| ----------- | -------------------------------------- | ------------------------------------------------------------ | ----------------------------------------------- | -| IndexInfo | [.payload.v1.Empty](#payload-v1-Empty) | [.payload.v1.Info.Index.Count](#payload-v1-Info-Index-Count) | Represent the RPC to get the index information. | +| Method Name | Request Type | Response Type | Description | +| ----------- | -------------------------------------- | -------------------------------------------------------------- | --------------------------------------------------------------- | +| IndexInfo | [.payload.v1.Empty](#payload-v1-Empty) | [.payload.v1.Info.Index.Count](#payload-v1-Info-Index-Count) | Represent the RPC to get the index information. | +| IndexDetail | [.payload.v1.Empty](#payload-v1-Empty) | [.payload.v1.Info.Index.Detail](#payload-v1-Info-Index-Detail) | Represent the RPC to get the index information for each agents. | diff --git a/apis/grpc/v1/manager/index/index_manager.pb.go b/apis/grpc/v1/manager/index/index_manager.pb.go index 483c3010cf3..4a8e5e18cc8 100644 --- a/apis/grpc/v1/manager/index/index_manager.pb.go +++ b/apis/grpc/v1/manager/index/index_manager.pb.go @@ -48,31 +48,39 @@ var file_v1_manager_index_index_manager_proto_rawDesc = []byte{ 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x32, 0x5a, 0x0a, 0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x51, 0x0a, 0x09, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x11, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, - 0x0b, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x42, 0x6b, 0x0a, 0x23, - 0x6f, 0x72, 0x67, 0x2e, 0x76, 0x64, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x61, 0x6c, 0x64, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x42, 0x10, 0x56, 0x61, 0x6c, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x64, 0x61, 0x61, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x64, 0x2f, 0x61, - 0x70, 0x69, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x32, 0xb2, 0x01, 0x0a, 0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x51, 0x0a, 0x09, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x11, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, + 0x12, 0x0b, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x56, 0x0a, + 0x0b, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x11, 0x2e, 0x70, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, + 0x1d, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, + 0x6f, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x22, 0x15, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2f, 0x64, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x42, 0x6b, 0x0a, 0x23, 0x6f, 0x72, 0x67, 0x2e, 0x76, 0x64, 0x61, + 0x61, 0x73, 0x2e, 0x76, 0x61, 0x6c, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x10, 0x56, 0x61, + 0x6c, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x50, 0x01, + 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x64, 0x61, + 0x61, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x67, 0x72, 0x70, + 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_v1_manager_index_index_manager_proto_goTypes = []interface{}{ - (*payload.Empty)(nil), // 0: payload.v1.Empty - (*payload.Info_Index_Count)(nil), // 1: payload.v1.Info.Index.Count + (*payload.Empty)(nil), // 0: payload.v1.Empty + (*payload.Info_Index_Count)(nil), // 1: payload.v1.Info.Index.Count + (*payload.Info_Index_Detail)(nil), // 2: payload.v1.Info.Index.Detail } var file_v1_manager_index_index_manager_proto_depIdxs = []int32{ 0, // 0: manager.index.v1.Index.IndexInfo:input_type -> payload.v1.Empty - 1, // 1: manager.index.v1.Index.IndexInfo:output_type -> payload.v1.Info.Index.Count - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type + 0, // 1: manager.index.v1.Index.IndexDetail:input_type -> payload.v1.Empty + 1, // 2: manager.index.v1.Index.IndexInfo:output_type -> payload.v1.Info.Index.Count + 2, // 3: manager.index.v1.Index.IndexDetail:output_type -> payload.v1.Info.Index.Detail + 2, // [2:4] is the sub-list for method output_type + 0, // [0:2] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name diff --git a/apis/grpc/v1/manager/index/index_manager_vtproto.pb.go b/apis/grpc/v1/manager/index/index_manager_vtproto.pb.go index b88016d3291..f7545564a55 100644 --- a/apis/grpc/v1/manager/index/index_manager_vtproto.pb.go +++ b/apis/grpc/v1/manager/index/index_manager_vtproto.pb.go @@ -44,6 +44,8 @@ const _ = grpc.SupportPackageIsVersion7 type IndexClient interface { // Represent the RPC to get the index information. IndexInfo(ctx context.Context, in *payload.Empty, opts ...grpc.CallOption) (*payload.Info_Index_Count, error) + // Represent the RPC to get the index information for each agents. + IndexDetail(ctx context.Context, in *payload.Empty, opts ...grpc.CallOption) (*payload.Info_Index_Detail, error) } type indexClient struct { @@ -63,12 +65,23 @@ func (c *indexClient) IndexInfo(ctx context.Context, in *payload.Empty, opts ... return out, nil } +func (c *indexClient) IndexDetail(ctx context.Context, in *payload.Empty, opts ...grpc.CallOption) (*payload.Info_Index_Detail, error) { + out := new(payload.Info_Index_Detail) + err := c.cc.Invoke(ctx, "/manager.index.v1.Index/IndexDetail", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // IndexServer is the server API for Index service. // All implementations must embed UnimplementedIndexServer // for forward compatibility type IndexServer interface { // Represent the RPC to get the index information. IndexInfo(context.Context, *payload.Empty) (*payload.Info_Index_Count, error) + // Represent the RPC to get the index information for each agents. + IndexDetail(context.Context, *payload.Empty) (*payload.Info_Index_Detail, error) mustEmbedUnimplementedIndexServer() } @@ -79,6 +92,9 @@ type UnimplementedIndexServer struct { func (UnimplementedIndexServer) IndexInfo(context.Context, *payload.Empty) (*payload.Info_Index_Count, error) { return nil, status.Errorf(codes.Unimplemented, "method IndexInfo not implemented") } +func (UnimplementedIndexServer) IndexDetail(context.Context, *payload.Empty) (*payload.Info_Index_Detail, error) { + return nil, status.Errorf(codes.Unimplemented, "method IndexDetail not implemented") +} func (UnimplementedIndexServer) mustEmbedUnimplementedIndexServer() {} // UnsafeIndexServer may be embedded to opt out of forward compatibility for this service. @@ -110,6 +126,24 @@ func _Index_IndexInfo_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } +func _Index_IndexDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(payload.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IndexServer).IndexDetail(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/manager.index.v1.Index/IndexDetail", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IndexServer).IndexDetail(ctx, req.(*payload.Empty)) + } + return interceptor(ctx, in, info, handler) +} + // Index_ServiceDesc is the grpc.ServiceDesc for Index service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -121,6 +155,10 @@ var Index_ServiceDesc = grpc.ServiceDesc{ MethodName: "IndexInfo", Handler: _Index_IndexInfo_Handler, }, + { + MethodName: "IndexDetail", + Handler: _Index_IndexDetail_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "v1/manager/index/index_manager.proto", diff --git a/apis/grpc/v1/payload/payload.pb.go b/apis/grpc/v1/payload/payload.pb.go index c68b9dd9e43..d9cf3353d52 100644 --- a/apis/grpc/v1/payload/payload.pb.go +++ b/apis/grpc/v1/payload/payload.pb.go @@ -4792,6 +4792,73 @@ func (x *Info_Index_Count) GetSaving() bool { return false } +// Represent the index count for each Agents message. +type Info_Index_Detail struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // count infos for each agents + Counts map[string]*Info_Index_Count `protobuf:"bytes,1,rep,name=counts,proto3" json:"counts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // index replica of vald cluster + Replica uint32 `protobuf:"varint,2,opt,name=replica,proto3" json:"replica,omitempty"` + // live agent replica of vald cluster + LiveAgents uint32 `protobuf:"varint,3,opt,name=live_agents,json=liveAgents,proto3" json:"live_agents,omitempty"` +} + +func (x *Info_Index_Detail) Reset() { + *x = Info_Index_Detail{} + if protoimpl.UnsafeEnabled { + mi := &file_v1_payload_payload_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Info_Index_Detail) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Info_Index_Detail) ProtoMessage() {} + +func (x *Info_Index_Detail) ProtoReflect() protoreflect.Message { + mi := &file_v1_payload_payload_proto_msgTypes[81] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Info_Index_Detail.ProtoReflect.Descriptor instead. +func (*Info_Index_Detail) Descriptor() ([]byte, []int) { + return file_v1_payload_payload_proto_rawDescGZIP(), []int{10, 0, 1} +} + +func (x *Info_Index_Detail) GetCounts() map[string]*Info_Index_Count { + if x != nil { + return x.Counts + } + return nil +} + +func (x *Info_Index_Detail) GetReplica() uint32 { + if x != nil { + return x.Replica + } + return 0 +} + +func (x *Info_Index_Detail) GetLiveAgents() uint32 { + if x != nil { + return x.LiveAgents + } + return 0 +} + // Represent the UUID message. type Info_Index_UUID struct { state protoimpl.MessageState @@ -4802,7 +4869,7 @@ type Info_Index_UUID struct { func (x *Info_Index_UUID) Reset() { *x = Info_Index_UUID{} if protoimpl.UnsafeEnabled { - mi := &file_v1_payload_payload_proto_msgTypes[81] + mi := &file_v1_payload_payload_proto_msgTypes[82] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4815,7 +4882,7 @@ func (x *Info_Index_UUID) String() string { func (*Info_Index_UUID) ProtoMessage() {} func (x *Info_Index_UUID) ProtoReflect() protoreflect.Message { - mi := &file_v1_payload_payload_proto_msgTypes[81] + mi := &file_v1_payload_payload_proto_msgTypes[82] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4828,7 +4895,7 @@ func (x *Info_Index_UUID) ProtoReflect() protoreflect.Message { // Deprecated: Use Info_Index_UUID.ProtoReflect.Descriptor instead. func (*Info_Index_UUID) Descriptor() ([]byte, []int) { - return file_v1_payload_payload_proto_rawDescGZIP(), []int{10, 0, 1} + return file_v1_payload_payload_proto_rawDescGZIP(), []int{10, 0, 2} } // The committed UUID. @@ -4843,7 +4910,7 @@ type Info_Index_UUID_Committed struct { func (x *Info_Index_UUID_Committed) Reset() { *x = Info_Index_UUID_Committed{} if protoimpl.UnsafeEnabled { - mi := &file_v1_payload_payload_proto_msgTypes[82] + mi := &file_v1_payload_payload_proto_msgTypes[84] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4856,7 +4923,7 @@ func (x *Info_Index_UUID_Committed) String() string { func (*Info_Index_UUID_Committed) ProtoMessage() {} func (x *Info_Index_UUID_Committed) ProtoReflect() protoreflect.Message { - mi := &file_v1_payload_payload_proto_msgTypes[82] + mi := &file_v1_payload_payload_proto_msgTypes[84] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4869,7 +4936,7 @@ func (x *Info_Index_UUID_Committed) ProtoReflect() protoreflect.Message { // Deprecated: Use Info_Index_UUID_Committed.ProtoReflect.Descriptor instead. func (*Info_Index_UUID_Committed) Descriptor() ([]byte, []int) { - return file_v1_payload_payload_proto_rawDescGZIP(), []int{10, 0, 1, 0} + return file_v1_payload_payload_proto_rawDescGZIP(), []int{10, 0, 2, 0} } func (x *Info_Index_UUID_Committed) GetUuid() string { @@ -4891,7 +4958,7 @@ type Info_Index_UUID_Uncommitted struct { func (x *Info_Index_UUID_Uncommitted) Reset() { *x = Info_Index_UUID_Uncommitted{} if protoimpl.UnsafeEnabled { - mi := &file_v1_payload_payload_proto_msgTypes[83] + mi := &file_v1_payload_payload_proto_msgTypes[85] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4904,7 +4971,7 @@ func (x *Info_Index_UUID_Uncommitted) String() string { func (*Info_Index_UUID_Uncommitted) ProtoMessage() {} func (x *Info_Index_UUID_Uncommitted) ProtoReflect() protoreflect.Message { - mi := &file_v1_payload_payload_proto_msgTypes[83] + mi := &file_v1_payload_payload_proto_msgTypes[85] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4917,7 +4984,7 @@ func (x *Info_Index_UUID_Uncommitted) ProtoReflect() protoreflect.Message { // Deprecated: Use Info_Index_UUID_Uncommitted.ProtoReflect.Descriptor instead. func (*Info_Index_UUID_Uncommitted) Descriptor() ([]byte, []int) { - return file_v1_payload_payload_proto_rawDescGZIP(), []int{10, 0, 1, 1} + return file_v1_payload_payload_proto_rawDescGZIP(), []int{10, 0, 2, 1} } func (x *Info_Index_UUID_Uncommitted) GetUuid() string { @@ -4942,7 +5009,7 @@ type Mirror_Target struct { func (x *Mirror_Target) Reset() { *x = Mirror_Target{} if protoimpl.UnsafeEnabled { - mi := &file_v1_payload_payload_proto_msgTypes[86] + mi := &file_v1_payload_payload_proto_msgTypes[88] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4955,7 +5022,7 @@ func (x *Mirror_Target) String() string { func (*Mirror_Target) ProtoMessage() {} func (x *Mirror_Target) ProtoReflect() protoreflect.Message { - mi := &file_v1_payload_payload_proto_msgTypes[86] + mi := &file_v1_payload_payload_proto_msgTypes[88] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4998,7 +5065,7 @@ type Mirror_Targets struct { func (x *Mirror_Targets) Reset() { *x = Mirror_Targets{} if protoimpl.UnsafeEnabled { - mi := &file_v1_payload_payload_proto_msgTypes[87] + mi := &file_v1_payload_payload_proto_msgTypes[89] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5011,7 +5078,7 @@ func (x *Mirror_Targets) String() string { func (*Mirror_Targets) ProtoMessage() {} func (x *Mirror_Targets) ProtoReflect() protoreflect.Message { - mi := &file_v1_payload_payload_proto_msgTypes[87] + mi := &file_v1_payload_payload_proto_msgTypes[89] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5402,7 +5469,7 @@ var file_v1_payload_payload_proto_rawDesc = []byte{ 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, - 0x22, 0x8c, 0x0d, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0xca, 0x01, 0x0a, 0x05, 0x49, 0x6e, + 0x22, 0xee, 0x0e, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0xac, 0x03, 0x0a, 0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x75, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, @@ -5410,119 +5477,133 @@ var file_v1_payload_payload_proto_rawDesc = []byte{ 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x61, 0x76, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x06, 0x73, 0x61, 0x76, 0x69, 0x6e, 0x67, 0x1a, 0x4a, 0x0a, 0x04, 0x55, 0x55, - 0x49, 0x44, 0x1a, 0x1f, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, - 0x75, 0x69, 0x64, 0x1a, 0x21, 0x0a, 0x0b, 0x55, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, - 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x1a, 0xef, 0x01, 0x0a, 0x03, 0x50, 0x6f, 0x64, 0x12, 0x19, - 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x02, 0x69, - 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x78, 0x01, - 0x52, 0x02, 0x69, 0x70, 0x12, 0x26, 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, - 0x6e, 0x66, 0x6f, 0x2e, 0x43, 0x50, 0x55, 0x52, 0x03, 0x63, 0x70, 0x75, 0x12, 0x2f, 0x0a, 0x06, - 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4d, - 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x29, 0x0a, - 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4e, 0x6f, - 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x1a, 0xe8, 0x01, 0x0a, 0x04, 0x4e, 0x6f, 0x64, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x12, - 0x26, 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x43, - 0x50, 0x55, 0x52, 0x03, 0x63, 0x70, 0x75, 0x12, 0x2f, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, - 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, - 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x29, 0x0a, 0x04, 0x50, 0x6f, 0x64, 0x73, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x50, 0x6f, 0x64, 0x73, 0x52, 0x04, 0x50, - 0x6f, 0x64, 0x73, 0x1a, 0x82, 0x02, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x49, 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x70, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x49, 0x70, 0x73, 0x12, 0x32, 0x0a, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, - 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, - 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3e, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x28, 0x08, 0x52, 0x06, 0x73, 0x61, 0x76, 0x69, 0x6e, 0x67, 0x1a, 0xdf, 0x01, 0x0a, 0x06, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x41, 0x0a, 0x06, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x06, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6c, 0x69, 0x76, 0x65, 0x41, 0x67, 0x65, + 0x6e, 0x74, 0x73, 0x1a, 0x57, 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4a, 0x0a, 0x04, + 0x55, 0x55, 0x49, 0x44, 0x1a, 0x1f, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x75, 0x75, 0x69, 0x64, 0x1a, 0x21, 0x0a, 0x0b, 0x55, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x74, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x1a, 0xef, 0x01, 0x0a, 0x03, 0x50, 0x6f, 0x64, + 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, + 0x02, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, + 0x78, 0x01, 0x52, 0x02, 0x69, 0x70, 0x12, 0x26, 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x43, 0x50, 0x55, 0x52, 0x03, 0x63, 0x70, 0x75, 0x12, 0x2f, + 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, + 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, + 0x29, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, - 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x35, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, - 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x1a, - 0x80, 0x01, 0x0a, 0x06, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3b, 0x0a, 0x06, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x1a, 0x9e, 0x01, 0x0a, 0x0b, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x4f, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x4b, 0x0a, 0x03, 0x43, 0x50, 0x55, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x01, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x73, - 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, - 0x1a, 0x4e, 0x0a, 0x06, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x01, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x73, - 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, - 0x1a, 0x3a, 0x0a, 0x04, 0x50, 0x6f, 0x64, 0x73, 0x12, 0x32, 0x0a, 0x04, 0x70, 0x6f, 0x64, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x50, 0x6f, 0x64, 0x42, 0x08, 0xba, 0x48, - 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04, 0x70, 0x6f, 0x64, 0x73, 0x1a, 0x3e, 0x0a, 0x05, - 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xba, 0x48, 0x05, - 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x1a, 0x4a, 0x0a, 0x08, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x1a, 0x15, 0x0a, 0x03, 0x49, 0x50, 0x73, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x22, - 0x7a, 0x0a, 0x06, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x30, 0x0a, 0x06, 0x54, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x3e, 0x0a, 0x07, 0x54, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x22, 0x07, 0x0a, 0x05, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x42, 0x64, 0x0a, 0x1d, 0x6f, 0x72, 0x67, 0x2e, 0x76, 0x64, 0x61, 0x61, - 0x73, 0x2e, 0x76, 0x61, 0x6c, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x70, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x0b, 0x56, 0x61, 0x6c, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x76, 0x64, 0x61, 0x61, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x73, - 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0xa2, 0x02, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x1a, 0xe8, 0x01, 0x0a, 0x04, 0x4e, + 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x12, 0x23, 0x0a, 0x0d, + 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, + 0x72, 0x12, 0x26, 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, + 0x2e, 0x43, 0x50, 0x55, 0x52, 0x03, 0x63, 0x70, 0x75, 0x12, 0x2f, 0x0a, 0x06, 0x6d, 0x65, 0x6d, + 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, + 0x72, 0x79, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x29, 0x0a, 0x04, 0x50, 0x6f, + 0x64, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x50, 0x6f, 0x64, 0x73, 0x52, + 0x04, 0x50, 0x6f, 0x64, 0x73, 0x1a, 0x82, 0x02, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x5f, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x49, 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, + 0x69, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x49, 0x70, 0x73, 0x12, 0x32, 0x0a, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, + 0x72, 0x74, 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x06, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3e, 0x0a, 0x0b, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, + 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x35, 0x0a, 0x0b, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, + 0x74, 0x1a, 0x80, 0x01, 0x0a, 0x06, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3b, 0x0a, 0x06, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x9e, 0x01, 0x0a, 0x0b, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4f, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4b, 0x0a, 0x03, 0x43, 0x50, 0x55, 0x12, 0x14, 0x0a, 0x05, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x75, 0x73, 0x61, + 0x67, 0x65, 0x1a, 0x4e, 0x0a, 0x06, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x75, 0x73, 0x61, + 0x67, 0x65, 0x1a, 0x3a, 0x0a, 0x04, 0x50, 0x6f, 0x64, 0x73, 0x12, 0x32, 0x0a, 0x04, 0x70, 0x6f, + 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x50, 0x6f, 0x64, 0x42, 0x08, + 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04, 0x70, 0x6f, 0x64, 0x73, 0x1a, 0x3e, + 0x0a, 0x05, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xba, + 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x1a, 0x4a, + 0x0a, 0x08, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x08, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, + 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x1a, 0x15, 0x0a, 0x03, 0x49, 0x50, + 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x70, 0x22, 0x7a, 0x0a, 0x06, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x30, 0x0a, 0x06, 0x54, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x3e, 0x0a, + 0x07, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x54, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x22, 0x07, 0x0a, + 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x64, 0x0a, 0x1d, 0x6f, 0x72, 0x67, 0x2e, 0x76, 0x64, + 0x61, 0x61, 0x73, 0x2e, 0x76, 0x61, 0x6c, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x0b, 0x56, 0x61, 0x6c, 0x64, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x76, 0x64, 0x61, 0x61, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x64, 0x2f, 0x61, 0x70, + 0x69, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0xa2, 0x02, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5538,7 +5619,7 @@ func file_v1_payload_payload_proto_rawDescGZIP() []byte { } var file_v1_payload_payload_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_v1_payload_payload_proto_msgTypes = make([]protoimpl.MessageInfo, 88) +var file_v1_payload_payload_proto_msgTypes = make([]protoimpl.MessageInfo, 90) var file_v1_payload_payload_proto_goTypes = []interface{}{ (Search_AggregationAlgorithm)(0), // 0: payload.v1.Search.AggregationAlgorithm (Remove_Timestamp_Operator)(0), // 1: payload.v1.Remove.Timestamp.Operator @@ -5623,15 +5704,17 @@ var file_v1_payload_payload_proto_goTypes = []interface{}{ (*Info_Services)(nil), // 80: payload.v1.Info.Services (*Info_IPs)(nil), // 81: payload.v1.Info.IPs (*Info_Index_Count)(nil), // 82: payload.v1.Info.Index.Count - (*Info_Index_UUID)(nil), // 83: payload.v1.Info.Index.UUID - (*Info_Index_UUID_Committed)(nil), // 84: payload.v1.Info.Index.UUID.Committed - (*Info_Index_UUID_Uncommitted)(nil), // 85: payload.v1.Info.Index.UUID.Uncommitted - nil, // 86: payload.v1.Info.Labels.LabelsEntry - nil, // 87: payload.v1.Info.Annotations.AnnotationsEntry - (*Mirror_Target)(nil), // 88: payload.v1.Mirror.Target - (*Mirror_Targets)(nil), // 89: payload.v1.Mirror.Targets - (*wrapperspb.FloatValue)(nil), // 90: google.protobuf.FloatValue - (*status.Status)(nil), // 91: google.rpc.Status + (*Info_Index_Detail)(nil), // 83: payload.v1.Info.Index.Detail + (*Info_Index_UUID)(nil), // 84: payload.v1.Info.Index.UUID + nil, // 85: payload.v1.Info.Index.Detail.CountsEntry + (*Info_Index_UUID_Committed)(nil), // 86: payload.v1.Info.Index.UUID.Committed + (*Info_Index_UUID_Uncommitted)(nil), // 87: payload.v1.Info.Index.UUID.Uncommitted + nil, // 88: payload.v1.Info.Labels.LabelsEntry + nil, // 89: payload.v1.Info.Annotations.AnnotationsEntry + (*Mirror_Target)(nil), // 90: payload.v1.Mirror.Target + (*Mirror_Targets)(nil), // 91: payload.v1.Mirror.Targets + (*wrapperspb.FloatValue)(nil), // 92: google.protobuf.FloatValue + (*status.Status)(nil), // 93: google.rpc.Status } var file_v1_payload_payload_proto_depIdxs = []int32{ 21, // 0: payload.v1.Search.Request.config:type_name -> payload.v1.Search.Config @@ -5644,11 +5727,11 @@ var file_v1_payload_payload_proto_depIdxs = []int32{ 26, // 7: payload.v1.Search.Config.ingress_filters:type_name -> payload.v1.Filter.Config 26, // 8: payload.v1.Search.Config.egress_filters:type_name -> payload.v1.Filter.Config 0, // 9: payload.v1.Search.Config.aggregation_algorithm:type_name -> payload.v1.Search.AggregationAlgorithm - 90, // 10: payload.v1.Search.Config.ratio:type_name -> google.protobuf.FloatValue + 92, // 10: payload.v1.Search.Config.ratio:type_name -> google.protobuf.FloatValue 49, // 11: payload.v1.Search.Response.results:type_name -> payload.v1.Object.Distance 22, // 12: payload.v1.Search.Responses.responses:type_name -> payload.v1.Search.Response 22, // 13: payload.v1.Search.StreamResponse.response:type_name -> payload.v1.Search.Response - 91, // 14: payload.v1.Search.StreamResponse.status:type_name -> google.rpc.Status + 93, // 14: payload.v1.Search.StreamResponse.status:type_name -> google.rpc.Status 25, // 15: payload.v1.Filter.Config.targets:type_name -> payload.v1.Filter.Target 53, // 16: payload.v1.Insert.Request.vector:type_name -> payload.v1.Object.Vector 31, // 17: payload.v1.Insert.Request.config:type_name -> payload.v1.Insert.Config @@ -5682,18 +5765,18 @@ var file_v1_payload_payload_proto_depIdxs = []int32{ 51, // 45: payload.v1.Object.VectorRequest.id:type_name -> payload.v1.Object.ID 26, // 46: payload.v1.Object.VectorRequest.filters:type_name -> payload.v1.Filter.Config 49, // 47: payload.v1.Object.StreamDistance.distance:type_name -> payload.v1.Object.Distance - 91, // 48: payload.v1.Object.StreamDistance.status:type_name -> google.rpc.Status + 93, // 48: payload.v1.Object.StreamDistance.status:type_name -> google.rpc.Status 51, // 49: payload.v1.Object.GetTimestampRequest.id:type_name -> payload.v1.Object.ID 53, // 50: payload.v1.Object.Vectors.vectors:type_name -> payload.v1.Object.Vector 53, // 51: payload.v1.Object.StreamVector.vector:type_name -> payload.v1.Object.Vector - 91, // 52: payload.v1.Object.StreamVector.status:type_name -> google.rpc.Status + 93, // 52: payload.v1.Object.StreamVector.status:type_name -> google.rpc.Status 59, // 53: payload.v1.Object.StreamBlob.blob:type_name -> payload.v1.Object.Blob - 91, // 54: payload.v1.Object.StreamBlob.status:type_name -> google.rpc.Status + 93, // 54: payload.v1.Object.StreamBlob.status:type_name -> google.rpc.Status 61, // 55: payload.v1.Object.StreamLocation.location:type_name -> payload.v1.Object.Location - 91, // 56: payload.v1.Object.StreamLocation.status:type_name -> google.rpc.Status + 93, // 56: payload.v1.Object.StreamLocation.status:type_name -> google.rpc.Status 61, // 57: payload.v1.Object.Locations.locations:type_name -> payload.v1.Object.Location 53, // 58: payload.v1.Object.List.Response.vector:type_name -> payload.v1.Object.Vector - 91, // 59: payload.v1.Object.List.Response.status:type_name -> google.rpc.Status + 93, // 59: payload.v1.Object.List.Response.status:type_name -> google.rpc.Status 76, // 60: payload.v1.Info.Pod.cpu:type_name -> payload.v1.Info.CPU 77, // 61: payload.v1.Info.Pod.memory:type_name -> payload.v1.Info.Memory 71, // 62: payload.v1.Info.Pod.node:type_name -> payload.v1.Info.Node @@ -5703,17 +5786,19 @@ var file_v1_payload_payload_proto_depIdxs = []int32{ 73, // 66: payload.v1.Info.Service.ports:type_name -> payload.v1.Info.ServicePort 74, // 67: payload.v1.Info.Service.labels:type_name -> payload.v1.Info.Labels 75, // 68: payload.v1.Info.Service.annotations:type_name -> payload.v1.Info.Annotations - 86, // 69: payload.v1.Info.Labels.labels:type_name -> payload.v1.Info.Labels.LabelsEntry - 87, // 70: payload.v1.Info.Annotations.annotations:type_name -> payload.v1.Info.Annotations.AnnotationsEntry + 88, // 69: payload.v1.Info.Labels.labels:type_name -> payload.v1.Info.Labels.LabelsEntry + 89, // 70: payload.v1.Info.Annotations.annotations:type_name -> payload.v1.Info.Annotations.AnnotationsEntry 70, // 71: payload.v1.Info.Pods.pods:type_name -> payload.v1.Info.Pod 71, // 72: payload.v1.Info.Nodes.nodes:type_name -> payload.v1.Info.Node 72, // 73: payload.v1.Info.Services.services:type_name -> payload.v1.Info.Service - 88, // 74: payload.v1.Mirror.Targets.targets:type_name -> payload.v1.Mirror.Target - 75, // [75:75] is the sub-list for method output_type - 75, // [75:75] is the sub-list for method input_type - 75, // [75:75] is the sub-list for extension type_name - 75, // [75:75] is the sub-list for extension extendee - 0, // [0:75] is the sub-list for field type_name + 85, // 74: payload.v1.Info.Index.Detail.counts:type_name -> payload.v1.Info.Index.Detail.CountsEntry + 82, // 75: payload.v1.Info.Index.Detail.CountsEntry.value:type_name -> payload.v1.Info.Index.Count + 90, // 76: payload.v1.Mirror.Targets.targets:type_name -> payload.v1.Mirror.Target + 77, // [77:77] is the sub-list for method output_type + 77, // [77:77] is the sub-list for method input_type + 77, // [77:77] is the sub-list for extension type_name + 77, // [77:77] is the sub-list for extension extendee + 0, // [0:77] is the sub-list for field type_name } func init() { file_v1_payload_payload_proto_init() } @@ -6695,7 +6780,7 @@ func file_v1_payload_payload_proto_init() { } } file_v1_payload_payload_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Info_Index_UUID); i { + switch v := v.(*Info_Index_Detail); i { case 0: return &v.state case 1: @@ -6707,6 +6792,18 @@ func file_v1_payload_payload_proto_init() { } } file_v1_payload_payload_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Info_Index_UUID); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_v1_payload_payload_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Info_Index_UUID_Committed); i { case 0: return &v.state @@ -6718,7 +6815,7 @@ func file_v1_payload_payload_proto_init() { return nil } } - file_v1_payload_payload_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} { + file_v1_payload_payload_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Info_Index_UUID_Uncommitted); i { case 0: return &v.state @@ -6730,7 +6827,7 @@ func file_v1_payload_payload_proto_init() { return nil } } - file_v1_payload_payload_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} { + file_v1_payload_payload_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Mirror_Target); i { case 0: return &v.state @@ -6742,7 +6839,7 @@ func file_v1_payload_payload_proto_init() { return nil } } - file_v1_payload_payload_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} { + file_v1_payload_payload_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Mirror_Targets); i { case 0: return &v.state @@ -6785,7 +6882,7 @@ func file_v1_payload_payload_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_v1_payload_payload_proto_rawDesc, NumEnums: 2, - NumMessages: 88, + NumMessages: 90, NumExtensions: 0, NumServices: 0, }, diff --git a/apis/grpc/v1/payload/payload.pb.json.go b/apis/grpc/v1/payload/payload.pb.json.go index cf5d15d4d59..92318fa401c 100644 --- a/apis/grpc/v1/payload/payload.pb.json.go +++ b/apis/grpc/v1/payload/payload.pb.json.go @@ -693,6 +693,16 @@ func (msg *Info_Index_Count) UnmarshalJSON(b []byte) error { return protojson.UnmarshalOptions{}.Unmarshal(b, msg) } +// MarshalJSON implements json.Marshaler +func (msg *Info_Index_Detail) MarshalJSON() ([]byte, error) { + return protojson.MarshalOptions{}.Marshal(msg) +} + +// UnmarshalJSON implements json.Unmarshaler +func (msg *Info_Index_Detail) UnmarshalJSON(b []byte) error { + return protojson.UnmarshalOptions{}.Unmarshal(b, msg) +} + // MarshalJSON implements json.Marshaler func (msg *Info_Index_UUID) MarshalJSON() ([]byte, error) { return protojson.MarshalOptions{}.Marshal(msg) diff --git a/apis/grpc/v1/payload/payload_vtproto.pb.go b/apis/grpc/v1/payload/payload_vtproto.pb.go index 53d8e69ecc6..e3b8fb7f8c9 100644 --- a/apis/grpc/v1/payload/payload_vtproto.pb.go +++ b/apis/grpc/v1/payload/payload_vtproto.pb.go @@ -1474,6 +1474,31 @@ func (m *Info_Index_Count) CloneMessageVT() proto.Message { return m.CloneVT() } +func (m *Info_Index_Detail) CloneVT() *Info_Index_Detail { + if m == nil { + return (*Info_Index_Detail)(nil) + } + r := new(Info_Index_Detail) + r.Replica = m.Replica + r.LiveAgents = m.LiveAgents + if rhs := m.Counts; rhs != nil { + tmpContainer := make(map[string]*Info_Index_Count, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Counts = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Info_Index_Detail) CloneMessageVT() proto.Message { + return m.CloneVT() +} + func (m *Info_Index_UUID_Committed) CloneVT() *Info_Index_UUID_Committed { if m == nil { return (*Info_Index_UUID_Committed)(nil) @@ -3873,6 +3898,48 @@ func (this *Info_Index_Count) EqualMessageVT(thatMsg proto.Message) bool { } return this.EqualVT(that) } +func (this *Info_Index_Detail) EqualVT(that *Info_Index_Detail) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if len(this.Counts) != len(that.Counts) { + return false + } + for i, vx := range this.Counts { + vy, ok := that.Counts[i] + if !ok { + return false + } + if p, q := vx, vy; p != q { + if p == nil { + p = &Info_Index_Count{} + } + if q == nil { + q = &Info_Index_Count{} + } + if !p.EqualVT(q) { + return false + } + } + } + if this.Replica != that.Replica { + return false + } + if this.LiveAgents != that.LiveAgents { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Info_Index_Detail) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Info_Index_Detail) + if !ok { + return false + } + return this.EqualVT(that) +} func (this *Info_Index_UUID_Committed) EqualVT(that *Info_Index_UUID_Committed) bool { if this == that { return true @@ -7770,6 +7837,71 @@ func (m *Info_Index_Count) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Info_Index_Detail) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Info_Index_Detail) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Info_Index_Detail) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.LiveAgents != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.LiveAgents)) + i-- + dAtA[i] = 0x18 + } + if m.Replica != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Replica)) + i-- + dAtA[i] = 0x10 + } + if len(m.Counts) > 0 { + for k := range m.Counts { + v := m.Counts[k] + baseI := i + size, err := v.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *Info_Index_UUID_Committed) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -10034,6 +10166,35 @@ func (m *Info_Index_Count) SizeVT() (n int) { return n } +func (m *Info_Index_Detail) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Counts) > 0 { + for k, v := range m.Counts { + _ = k + _ = v + l = 0 + if v != nil { + l = v.SizeVT() + } + l += 1 + protohelpers.SizeOfVarint(uint64(l)) + mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l + n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) + } + } + if m.Replica != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Replica)) + } + if m.LiveAgents != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.LiveAgents)) + } + n += len(m.unknownFields) + return n +} + func (m *Info_Index_UUID_Committed) SizeVT() (n int) { if m == nil { return 0 @@ -17232,6 +17393,224 @@ func (m *Info_Index_Count) UnmarshalVT(dAtA []byte) error { } return nil } +func (m *Info_Index_Detail) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Info_Index_Detail: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Info_Index_Detail: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Counts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Counts == nil { + m.Counts = make(map[string]*Info_Index_Count) + } + var mapkey string + var mapvalue *Info_Index_Count + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protohelpers.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protohelpers.ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return protohelpers.ErrInvalidLength + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Info_Index_Count{} + if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Counts[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Replica", wireType) + } + m.Replica = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Replica |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LiveAgents", wireType) + } + m.LiveAgents = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LiveAgents |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Info_Index_UUID_Committed) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/apis/proto/v1/manager/index/index_manager.proto b/apis/proto/v1/manager/index/index_manager.proto index a18f0c1bba1..edf6e571fb3 100644 --- a/apis/proto/v1/manager/index/index_manager.proto +++ b/apis/proto/v1/manager/index/index_manager.proto @@ -32,4 +32,8 @@ service Index { rpc IndexInfo(payload.v1.Empty) returns (payload.v1.Info.Index.Count) { option (google.api.http).get = "/index/info"; } + // Represent the RPC to get the index information for each agents. + rpc IndexDetail(payload.v1.Empty) returns (payload.v1.Info.Index.Detail) { + option (google.api.http).get = "/index/detail"; + } } diff --git a/apis/proto/v1/payload/payload.proto b/apis/proto/v1/payload/payload.proto index 5f9af665a0e..0ee61b3336f 100644 --- a/apis/proto/v1/payload/payload.proto +++ b/apis/proto/v1/payload/payload.proto @@ -523,6 +523,15 @@ message Info { // The saving index count. bool saving = 4; } + // Represent the index count for each Agents message. + message Detail { + // count infos for each agents + map counts = 1; + // index replica of vald cluster + uint32 replica = 2; + // live agent replica of vald cluster + uint32 live_agents = 3; + } // Represent the UUID message. message UUID { diff --git a/apis/swagger/v1/manager/index/index_manager.swagger.json b/apis/swagger/v1/manager/index/index_manager.swagger.json index 73a3c346cf3..6cc90c67d56 100644 --- a/apis/swagger/v1/manager/index/index_manager.swagger.json +++ b/apis/swagger/v1/manager/index/index_manager.swagger.json @@ -12,6 +12,27 @@ "consumes": ["application/json"], "produces": ["application/json"], "paths": { + "/index/detail": { + "get": { + "summary": "Represent the RPC to get the index information for each agents.", + "operationId": "Index_IndexDetail", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/IndexDetail" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": ["Index"] + } + }, "/index/info": { "get": { "summary": "Represent the RPC to get the index information.", @@ -59,6 +80,29 @@ }, "description": "Represent the index count message." }, + "IndexDetail": { + "type": "object", + "properties": { + "counts": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/IndexCount" + }, + "title": "count infos for each agents" + }, + "replica": { + "type": "integer", + "format": "int64", + "title": "index replica of vald cluster" + }, + "liveAgents": { + "type": "integer", + "format": "int64", + "title": "live agent replica of vald cluster" + } + }, + "description": "Represent the index count for each Agents message." + }, "protobufAny": { "type": "object", "properties": { diff --git a/example/client/go.mod b/example/client/go.mod index 2c9b6a8e7a4..6b1485f6294 100644 --- a/example/client/go.mod +++ b/example/client/go.mod @@ -11,9 +11,9 @@ replace ( golang.org/x/crypto => golang.org/x/crypto v0.23.0 golang.org/x/net => golang.org/x/net v0.25.0 golang.org/x/text => golang.org/x/text v0.15.0 - google.golang.org/genproto => google.golang.org/genproto v0.0.0-20240506185236-b8a5c65736ae - google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20240506185236-b8a5c65736ae - google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20240506185236-b8a5c65736ae + google.golang.org/genproto => google.golang.org/genproto v0.0.0-20240513163218-0867130af1f8 + google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20240513163218-0867130af1f8 + google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8 google.golang.org/grpc => google.golang.org/grpc v1.63.2 google.golang.org/protobuf => google.golang.org/protobuf v1.34.1 gopkg.in/yaml.v2 => gopkg.in/yaml.v2 v2.4.0 @@ -37,6 +37,6 @@ require ( golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.15.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240509183442-62759503f434 // indirect google.golang.org/protobuf v1.34.1 // indirect ) diff --git a/example/client/go.sum b/example/client/go.sum index c526bb0895a..17155e7e382 100644 --- a/example/client/go.sum +++ b/example/client/go.sum @@ -33,10 +33,10 @@ golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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/googleapis/api v0.0.0-20240506185236-b8a5c65736ae h1:AH34z6WAGVNkllnKs5raNq3yRq93VnjBG6rpfub/jYk= -google.golang.org/genproto/googleapis/api v0.0.0-20240506185236-b8a5c65736ae/go.mod h1:FfiGhwUm6CJviekPrc0oJ+7h29e+DmWU6UtjX0ZvI7Y= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240506185236-b8a5c65736ae h1:c55+MER4zkBS14uJhSZMGGmya0yJx5iHV4x/fpOSNRk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240506185236-b8a5c65736ae/go.mod h1:I7Y+G38R2bu5j1aLzfFmQfTcU/WnFuqDwLZAbvKTKpM= +google.golang.org/genproto/googleapis/api v0.0.0-20240513163218-0867130af1f8 h1:W5Xj/70xIA4x60O/IFyXivR5MGqblAb8R3w26pnD6No= +google.golang.org/genproto/googleapis/api v0.0.0-20240513163218-0867130af1f8/go.mod h1:vPrPUTsDCYxXWjP7clS81mZ6/803D8K4iM9Ma27VKas= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8 h1:mxSlqyb8ZAHsYDCfiXN1EDdNTdvjUJSLY+OnAUtYNYA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8/go.mod h1:I7Y+G38R2bu5j1aLzfFmQfTcU/WnFuqDwLZAbvKTKpM= google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= diff --git a/go.mod b/go.mod index 92a8a9826a2..857fb6ccba5 100644 --- a/go.mod +++ b/go.mod @@ -3,19 +3,19 @@ module github.com/vdaas/vald go 1.22.3 replace ( - cloud.google.com/go => cloud.google.com/go v0.112.2 + cloud.google.com/go => cloud.google.com/go v0.113.0 cloud.google.com/go/bigquery => cloud.google.com/go/bigquery v1.61.0 cloud.google.com/go/compute => cloud.google.com/go/compute v1.26.0 - cloud.google.com/go/datastore => cloud.google.com/go/datastore v1.16.0 + cloud.google.com/go/datastore => cloud.google.com/go/datastore v1.17.0 cloud.google.com/go/firestore => cloud.google.com/go/firestore v1.15.0 cloud.google.com/go/iam => cloud.google.com/go/iam v1.1.8 - cloud.google.com/go/kms => cloud.google.com/go/kms v1.15.9 + cloud.google.com/go/kms => cloud.google.com/go/kms v1.16.0 cloud.google.com/go/monitoring => cloud.google.com/go/monitoring v1.19.0 cloud.google.com/go/pubsub => cloud.google.com/go/pubsub v1.38.0 cloud.google.com/go/secretmanager => cloud.google.com/go/secretmanager v1.13.0 - cloud.google.com/go/storage => cloud.google.com/go/storage v1.40.0 + cloud.google.com/go/storage => cloud.google.com/go/storage v1.41.0 cloud.google.com/go/trace => cloud.google.com/go/trace v1.10.7 - code.cloudfoundry.org/bytefmt => code.cloudfoundry.org/bytefmt v0.0.0-20240507165102-251b29179075 + code.cloudfoundry.org/bytefmt => code.cloudfoundry.org/bytefmt v0.0.0-20240510175427-fd0528cc37f1 contrib.go.opencensus.io/exporter/aws => contrib.go.opencensus.io/exporter/aws v0.0.0-20230502192102-15967c811cec contrib.go.opencensus.io/exporter/prometheus => contrib.go.opencensus.io/exporter/prometheus v0.4.2 contrib.go.opencensus.io/integrations/ocsql => contrib.go.opencensus.io/integrations/ocsql v0.1.7 @@ -24,7 +24,7 @@ replace ( github.com/Azure/azure-sdk-for-go => github.com/Azure/azure-sdk-for-go v68.0.0+incompatible github.com/Azure/azure-sdk-for-go/sdk/azcore => github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 github.com/Azure/azure-sdk-for-go/sdk/azidentity => github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2 - github.com/Azure/azure-sdk-for-go/sdk/internal => github.com/Azure/azure-sdk-for-go/sdk/internal v1.7.0 + github.com/Azure/azure-sdk-for-go/sdk/internal => github.com/Azure/azure-sdk-for-go/sdk/internal v1.8.0 github.com/Azure/go-amqp => github.com/Azure/go-amqp v1.0.5 github.com/Azure/go-autorest => github.com/Azure/go-autorest v14.2.1-0.20240104002855-4c0e21ca2bbb+incompatible github.com/Azure/go-autorest/autorest => github.com/Azure/go-autorest/autorest v0.11.30-0.20240104002855-4c0e21ca2bbb @@ -44,13 +44,13 @@ replace ( github.com/akrylysov/pogreb => github.com/akrylysov/pogreb v0.10.2 github.com/antihax/optional => github.com/antihax/optional v1.0.0 github.com/armon/go-socks5 => github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 - github.com/aws/aws-sdk-go => github.com/aws/aws-sdk-go v1.52.4 + github.com/aws/aws-sdk-go => github.com/aws/aws-sdk-go v1.53.1 github.com/aws/aws-sdk-go-v2 => github.com/aws/aws-sdk-go-v2 v1.26.1 github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream => github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 - github.com/aws/aws-sdk-go-v2/config => github.com/aws/aws-sdk-go-v2/config v1.27.11 - github.com/aws/aws-sdk-go-v2/credentials => github.com/aws/aws-sdk-go-v2/credentials v1.17.11 + github.com/aws/aws-sdk-go-v2/config => github.com/aws/aws-sdk-go-v2/config v1.27.13 + github.com/aws/aws-sdk-go-v2/credentials => github.com/aws/aws-sdk-go-v2/credentials v1.17.13 github.com/aws/aws-sdk-go-v2/feature/ec2/imds => github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 - github.com/aws/aws-sdk-go-v2/feature/s3/manager => github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15 + github.com/aws/aws-sdk-go-v2/feature/s3/manager => github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.17 github.com/aws/aws-sdk-go-v2/internal/configsources => github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 github.com/aws/aws-sdk-go-v2/internal/ini => github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 @@ -58,14 +58,14 @@ replace ( github.com/aws/aws-sdk-go-v2/service/internal/checksum => github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.7 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url => github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 github.com/aws/aws-sdk-go-v2/service/internal/s3shared => github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5 - github.com/aws/aws-sdk-go-v2/service/kms => github.com/aws/aws-sdk-go-v2/service/kms v1.31.0 - github.com/aws/aws-sdk-go-v2/service/s3 => github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1 - github.com/aws/aws-sdk-go-v2/service/secretsmanager => github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.28.6 - github.com/aws/aws-sdk-go-v2/service/sns => github.com/aws/aws-sdk-go-v2/service/sns v1.29.4 - github.com/aws/aws-sdk-go-v2/service/sqs => github.com/aws/aws-sdk-go-v2/service/sqs v1.31.4 - github.com/aws/aws-sdk-go-v2/service/ssm => github.com/aws/aws-sdk-go-v2/service/ssm v1.50.0 - github.com/aws/aws-sdk-go-v2/service/sso => github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 - github.com/aws/aws-sdk-go-v2/service/sts => github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 + github.com/aws/aws-sdk-go-v2/service/kms => github.com/aws/aws-sdk-go-v2/service/kms v1.31.1 + github.com/aws/aws-sdk-go-v2/service/s3 => github.com/aws/aws-sdk-go-v2/service/s3 v1.53.2 + github.com/aws/aws-sdk-go-v2/service/secretsmanager => github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.28.7 + github.com/aws/aws-sdk-go-v2/service/sns => github.com/aws/aws-sdk-go-v2/service/sns v1.29.5 + github.com/aws/aws-sdk-go-v2/service/sqs => github.com/aws/aws-sdk-go-v2/service/sqs v1.32.0 + github.com/aws/aws-sdk-go-v2/service/ssm => github.com/aws/aws-sdk-go-v2/service/ssm v1.50.1 + github.com/aws/aws-sdk-go-v2/service/sso => github.com/aws/aws-sdk-go-v2/service/sso v1.20.6 + github.com/aws/aws-sdk-go-v2/service/sts => github.com/aws/aws-sdk-go-v2/service/sts v1.28.7 github.com/aws/smithy-go => github.com/aws/smithy-go v1.20.2 github.com/benbjohnson/clock => github.com/benbjohnson/clock v1.3.5 github.com/beorn7/perks => github.com/beorn7/perks v1.0.1 @@ -154,7 +154,7 @@ replace ( github.com/google/gofuzz => github.com/google/gofuzz v1.2.0 github.com/google/martian => github.com/google/martian v2.1.0+incompatible github.com/google/martian/v3 => github.com/google/martian/v3 v3.3.3 - github.com/google/pprof => github.com/google/pprof v0.0.0-20240507183855-6f11f98ebb1c + github.com/google/pprof => github.com/google/pprof v0.0.0-20240509144519-723abb6459b7 github.com/google/shlex => github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/google/subcommands => github.com/google/subcommands v1.2.0 github.com/google/uuid => github.com/google/uuid v1.6.0 @@ -236,7 +236,7 @@ replace ( github.com/pkg/sftp => github.com/pkg/sftp v1.13.6 github.com/pmezard/go-difflib => github.com/pmezard/go-difflib v1.0.0 github.com/prashantv/gostub => github.com/prashantv/gostub v1.1.0 - github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.19.0 + github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.19.1 github.com/prometheus/client_model => github.com/prometheus/client_model v0.6.1 github.com/prometheus/common => github.com/prometheus/common v0.53.0 github.com/prometheus/procfs => github.com/prometheus/procfs v0.14.0 @@ -286,7 +286,7 @@ replace ( go.opentelemetry.io/otel/sdk/metric => go.opentelemetry.io/otel/sdk/metric v1.26.0 go.opentelemetry.io/otel/trace => go.opentelemetry.io/otel/trace v1.26.0 go.opentelemetry.io/proto/otlp => go.opentelemetry.io/proto/otlp v1.2.0 - go.starlark.net => go.starlark.net v0.0.0-20240507195648-35fe9f26b4bc + go.starlark.net => go.starlark.net v0.0.0-20240510163022-f457c4c2b267 go.uber.org/atomic => go.uber.org/atomic v1.11.0 go.uber.org/automaxprocs => go.uber.org/automaxprocs v1.5.3 go.uber.org/goleak => go.uber.org/goleak v1.3.0 @@ -313,11 +313,11 @@ replace ( gonum.org/v1/gonum => gonum.org/v1/gonum v0.15.0 gonum.org/v1/hdf5 => gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946 gonum.org/v1/plot => gonum.org/v1/plot v0.14.0 - google.golang.org/api => google.golang.org/api v0.178.0 + google.golang.org/api => google.golang.org/api v0.180.0 google.golang.org/appengine => google.golang.org/appengine v1.6.8 - google.golang.org/genproto => google.golang.org/genproto v0.0.0-20240506185236-b8a5c65736ae - google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20240506185236-b8a5c65736ae - google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20240506185236-b8a5c65736ae + google.golang.org/genproto => google.golang.org/genproto v0.0.0-20240513163218-0867130af1f8 + google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20240513163218-0867130af1f8 + google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8 google.golang.org/grpc => google.golang.org/grpc v1.63.2 google.golang.org/grpc/cmd/protoc-gen-go-grpc => google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 google.golang.org/protobuf => google.golang.org/protobuf v1.34.1 @@ -348,7 +348,7 @@ replace ( ) require ( - buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.1-20240401165935-b983156c5e99.1 + buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.1-20240508200655-46a4cf4ba109.1 cloud.google.com/go/storage v1.40.0 code.cloudfoundry.org/bytefmt v0.0.0-20190710193110-1eb035ffe2b6 github.com/akrylysov/pogreb v0.0.0-00010101000000-000000000000 @@ -403,8 +403,8 @@ require ( golang.org/x/tools v0.21.0 gonum.org/v1/hdf5 v0.0.0-00010101000000-000000000000 gonum.org/v1/plot v0.14.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240429193739-8cf5692501f6 - google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6 + google.golang.org/genproto/googleapis/api v0.0.0-20240509183442-62759503f434 + google.golang.org/genproto/googleapis/rpc v0.0.0-20240509183442-62759503f434 google.golang.org/grpc v1.63.2 google.golang.org/protobuf v1.34.1 gopkg.in/yaml.v2 v2.4.0 @@ -419,8 +419,8 @@ require ( ) require ( - cloud.google.com/go v0.112.2 // indirect - cloud.google.com/go/auth v0.3.0 // indirect + cloud.google.com/go v0.113.0 // indirect + cloud.google.com/go/auth v0.4.1 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect cloud.google.com/go/compute/metadata v0.3.0 // indirect cloud.google.com/go/iam v1.1.8 // indirect @@ -459,7 +459,7 @@ require ( github.com/google/btree v1.0.1 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/pprof v0.0.0-20240430035430-e4905b036c4e // indirect + github.com/google/pprof v0.0.0-20240509144519-723abb6459b7 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/wire v0.6.0 // indirect @@ -511,7 +511,7 @@ require ( golang.org/x/term v0.20.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/api v0.177.0 // indirect + google.golang.org/api v0.178.0 // indirect google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 268541e1d4d..645a3dee16b 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,9 @@ -buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.1-20240401165935-b983156c5e99.1 h1:npqzxtoNbSdWs7XBDzqvqA1ANrQQGc8QpN0zFq9sVHA= -buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.1-20240401165935-b983156c5e99.1/go.mod h1:XF+P8+RmfdufmIYpGUC+6bF7S+IlmHDEnCrO3OXaUAQ= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.1-20240508200655-46a4cf4ba109.1 h1:LEXWFH/xZ5oOWrC3oOtHbUyBdzRWMCPpAQmKC9v05mA= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.1-20240508200655-46a4cf4ba109.1/go.mod h1:XF+P8+RmfdufmIYpGUC+6bF7S+IlmHDEnCrO3OXaUAQ= cel.dev/expr v0.15.0 h1:O1jzfJCQBfL5BFoYktaxwIhuttaQPsVWerH9/EEKx0w= cel.dev/expr v0.15.0/go.mod h1:TRSuuV7DlVCE/uwv5QbAiW/v8l5O8C4eEPHeu7gf7Sg= -cloud.google.com/go v0.112.2 h1:ZaGT6LiG7dBzi6zNOvVZwacaXlmf3lRqnC4DQzqyRQw= -cloud.google.com/go v0.112.2/go.mod h1:iEqjp//KquGIJV/m+Pk3xecgKNhV+ry+vVTsy4TbDms= +cloud.google.com/go v0.113.0 h1:g3C70mn3lWfckKBiCVsAshabrDg01pQ0pnX1MNtnMkA= +cloud.google.com/go v0.113.0/go.mod h1:glEqlogERKYeePz6ZdkcLJ28Q2I6aERgDDErBg9GzO8= cloud.google.com/go/accessapproval v1.7.7/go.mod h1:10ZDPYiTm8tgxuMPid8s2DL93BfCt6xBh/Vg0Xd8pU0= cloud.google.com/go/accesscontextmanager v1.8.6/go.mod h1:rMC0Z8pCe/JR6yQSksprDc6swNKjMEvkfCbaesh+OS0= cloud.google.com/go/accesscontextmanager v1.8.7/go.mod h1:jSvChL1NBQ+uLY9zUBdPy9VIlozPoHptdBnRYeWuQoM= @@ -19,8 +19,9 @@ cloud.google.com/go/asset v1.19.1/go.mod h1:kGOS8DiCXv6wU/JWmHWCgaErtSZ6uN5noCy0 cloud.google.com/go/assuredworkloads v1.11.7/go.mod h1:CqXcRH9N0KCDtHhFisv7kk+cl//lyV+pYXGi1h8rCEU= cloud.google.com/go/auth v0.2.1/go.mod h1:khQRBNrvNoHiHhV1iu2x8fSnlNbCaVHilznW5MAI5GY= cloud.google.com/go/auth v0.2.2/go.mod h1:2bDNJWtWziDT3Pu1URxHHbkHE/BbOCuyUiKIGcNvafo= -cloud.google.com/go/auth v0.3.0 h1:PRyzEpGfx/Z9e8+lHsbkoUVXD0gnu4MNmm7Gp8TQNIs= cloud.google.com/go/auth v0.3.0/go.mod h1:lBv6NKTWp8E3LPzmO1TbiiRKc4drLOfHsgmlH9ogv5w= +cloud.google.com/go/auth v0.4.1 h1:Z7YNIhlWRtrnKlZke7z3GMqzvuYzdc2z98F9D1NV5Hg= +cloud.google.com/go/auth v0.4.1/go.mod h1:QVBuVEKpCn4Zp58hzRGvL0tjRGU0YqdRTdCHM1IHnro= cloud.google.com/go/auth/oauth2adapt v0.2.1/go.mod h1:tOdK/k+D2e4GEwfBRA48dKNQiDsqIXxLh7VU319eV0g= cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4= cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q= @@ -50,14 +51,14 @@ cloud.google.com/go/dataflow v0.9.7/go.mod h1:3BjkOxANrm1G3+/EBnEsTEEgJu1f79mFqo cloud.google.com/go/dataform v0.9.4/go.mod h1:jjo4XY+56UrNE0wsEQsfAw4caUs4DLJVSyFBDelRDtQ= cloud.google.com/go/datafusion v1.7.7/go.mod h1:qGTtQcUs8l51lFA9ywuxmZJhS4ozxsBSus6ItqCUWMU= cloud.google.com/go/datalabeling v0.8.7/go.mod h1:/PPncW5gxrU15UzJEGQoOT3IobeudHGvoExrtZ8ZBwo= -cloud.google.com/go/dataplex v1.15.1/go.mod h1:+cUJLSCSIWfH53dIXOS5gLErCSz3MP0mZiswVVI8YTA= +cloud.google.com/go/dataplex v1.16.0/go.mod h1:OlBoytuQ56+7aUCC03D34CtoF/4TJ5SiIrLsBdDu87Q= cloud.google.com/go/dataproc/v2 v2.4.2/go.mod h1:smGSj1LZP3wtnsM9eyRuDYftNAroAl6gvKp/Wk64XDE= cloud.google.com/go/dataqna v0.8.7/go.mod h1:hvxGaSvINAVH5EJJsONIwT1y+B7OQogjHPjizOFoWOo= -cloud.google.com/go/datastore v1.16.0/go.mod h1:WIGbYyZE4GUJC+RLuVgpl6myNMKZGzlfbtN3Tch4R+8= +cloud.google.com/go/datastore v1.17.0/go.mod h1:RiRZU0G6VVlIVlv1HRo3vSAPFHULV0ddBNsXO+Sony4= cloud.google.com/go/datastream v1.10.6/go.mod h1:lPeXWNbQ1rfRPjBFBLUdi+5r7XrniabdIiEaCaAU55o= -cloud.google.com/go/deploy v1.18.0/go.mod h1:7Nv2yKPQG5Lv3sscLUuY58DlrEMqPlq6nedtpb1Prcg= +cloud.google.com/go/deploy v1.18.1/go.mod h1:uyUQPHkz695IbRyyCtmU+jypWZlbd69Le55hhAqEx4A= cloud.google.com/go/dialogflow v1.53.0/go.mod h1:LqAvxq7bXiiGC3/DWIz9XXCxth2z2qpSnBAAmlNOj6U= -cloud.google.com/go/dlp v1.12.2/go.mod h1:AkJim14g+g5JqE4tTr9IJYQp2HHKhBYw/r/G6KQLQi0= +cloud.google.com/go/dlp v1.13.0/go.mod h1:5T/dFtKOn2Q3QLnaKjjir7nEGA8K00WaqoKodLkbF/c= cloud.google.com/go/documentai v1.28.0/go.mod h1:ZTt9RkTRmqOn5GQgU4JxHJxbobemOoo6FSy0byEQHqY= cloud.google.com/go/domains v0.9.7/go.mod h1:u/yVf3BgfPJW3QDZl51qTJcDXo9PLqnEIxfGmGgbHEc= cloud.google.com/go/edgecontainer v1.2.1/go.mod h1:OE2D0lbkmGDVYLCvpj8Y0M4a4K076QB7E2JupqOR/qU= @@ -78,7 +79,7 @@ cloud.google.com/go/iam v1.1.8/go.mod h1:GvE6lyMmfxXauzNq8NbgJbeVQNspG+tcdL/W8QO cloud.google.com/go/iap v1.9.6/go.mod h1:YiK+tbhDszhaVifvzt2zTEF2ch9duHtp6xzxj9a0sQk= cloud.google.com/go/ids v1.4.7/go.mod h1:yUkDC71u73lJoTaoONy0dsA0T7foekvg6ZRg9IJL0AA= cloud.google.com/go/iot v1.7.7/go.mod h1:tr0bCOSPXtsg64TwwZ/1x+ReTWKlQRVXbM+DnrE54yM= -cloud.google.com/go/kms v1.15.9/go.mod h1:5v/R/RRuBUVO+eJioGcqENr3syh8ZqNn1y1Wc9DjM+4= +cloud.google.com/go/kms v1.16.0/go.mod h1:olQUXy2Xud+1GzYfiBO9N0RhjsJk5IJLU6n/ethLXVc= cloud.google.com/go/language v1.12.5/go.mod h1:w/6a7+Rhg6Bc2Uzw6thRdKKNjnOzfKTJuxzD0JZZ0nM= cloud.google.com/go/lifesciences v0.9.7/go.mod h1:FQ713PhjAOHqUVnuwsCe1KPi9oAdaTfh58h1xPiW13g= cloud.google.com/go/logging v1.9.0/go.mod h1:1Io0vnZv4onoUnsVUQY3HZ3Igb1nBchky0A0y7BBBhE= @@ -88,7 +89,7 @@ cloud.google.com/go/longrunning v0.5.5/go.mod h1:WV2LAxD8/rg5Z1cNW6FJ/ZpX4E4VnDn cloud.google.com/go/longrunning v0.5.6/go.mod h1:vUaDrWYOMKRuhiv6JBnn49YxCPz2Ayn9GqyjaBT8/mA= cloud.google.com/go/longrunning v0.5.7/go.mod h1:8GClkudohy1Fxm3owmBGid8W0pSgodEMwEAztp38Xng= cloud.google.com/go/managedidentities v1.6.7/go.mod h1:UzslJgHnc6luoyx2JV19cTCi2Fni/7UtlcLeSYRzTV8= -cloud.google.com/go/maps v1.7.3/go.mod h1:Jfe+h0i3YdG8Cc0wuNI+Q+WglTt7YnQ3PbKCqpBdTwc= +cloud.google.com/go/maps v1.8.0/go.mod h1:b/O9YYxiySNN0N/9swc9SHIM4b4phuoGORN2/H965Ek= cloud.google.com/go/mediatranslation v0.8.7/go.mod h1:6eJbPj1QJwiCP8R4K413qMx6ZHZJUi9QFpApqY88xWU= cloud.google.com/go/memcache v1.10.7/go.mod h1:SrU6+QBhvXJV0TA59+B3oCHtLkPx37eqdKmRUlmSE1k= cloud.google.com/go/metastore v1.13.6/go.mod h1:OBCVMCP7X9vA4KKD+5J4Q3d+tiyKxalQZnksQMq5MKY= @@ -125,8 +126,8 @@ cloud.google.com/go/servicedirectory v1.11.6/go.mod h1:peVGYNc1xArhcqSuhPP+NXp8k cloud.google.com/go/shell v1.7.7/go.mod h1:7OYaMm3TFMSZBh8+QYw6Qef+fdklp7CjjpxYAoJpZbQ= cloud.google.com/go/spanner v1.61.0/go.mod h1:+hdNE+zL7EWNfOWRetw01jxz8H5qsE/ayZvF/pfrAl8= cloud.google.com/go/speech v1.23.1/go.mod h1:UNgzNxhNBuo/OxpF1rMhA/U2rdai7ILL6PBXFs70wq0= -cloud.google.com/go/storage v1.40.0 h1:VEpDQV5CJxFmJ6ueWNsKxcr1QAYOXEgxDa+sBbJahPw= -cloud.google.com/go/storage v1.40.0/go.mod h1:Rrj7/hKlG87BLqDJYtwR0fbPld8uJPbQ2ucUMY7Ir0g= +cloud.google.com/go/storage v1.41.0 h1:RusiwatSu6lHeEXe3kglxakAmAbfV+rhtPqA6i8RBx0= +cloud.google.com/go/storage v1.41.0/go.mod h1:J1WCa/Z2FcgdEDuPUY8DxT5I+d9mFKsCepp5vR6Sq80= cloud.google.com/go/storagetransfer v1.10.6/go.mod h1:3sAgY1bx1TpIzfSzdvNGHrGYldeCTyGI/Rzk6Lc6A7w= cloud.google.com/go/talent v1.6.8/go.mod h1:kqPAJvhxmhoUTuqxjjk2KqA8zUEeTDmH+qKztVubGlQ= cloud.google.com/go/texttospeech v1.7.7/go.mod h1:XO4Wr2VzWHjzQpMe3gS58Oj68nmtXMyuuH+4t0wy9eA= @@ -142,8 +143,8 @@ cloud.google.com/go/vpcaccess v1.7.7/go.mod h1:EzfSlgkoAnFWEMznZW0dVNvdjFjEW97vF cloud.google.com/go/webrisk v1.9.7/go.mod h1:7FkQtqcKLeNwXCdhthdXHIQNcFWPF/OubrlyRcLHNuQ= cloud.google.com/go/websecurityscanner v1.6.7/go.mod h1:EpiW84G5KXxsjtFKK7fSMQNt8JcuLA8tQp7j0cyV458= cloud.google.com/go/workflows v1.12.6/go.mod h1:oDbEHKa4otYg4abwdw2Z094jB0TLLiFGAPA78EDAKag= -code.cloudfoundry.org/bytefmt v0.0.0-20240507165102-251b29179075 h1:/EIavdKMlm6qZfFDnXJfu2M2R2jFctue9C4BF742EtE= -code.cloudfoundry.org/bytefmt v0.0.0-20240507165102-251b29179075/go.mod h1:KghGLYo7qPX+I2O+IKHD3in3uE/bYcXmuL0jb6I0mRM= +code.cloudfoundry.org/bytefmt v0.0.0-20240510175427-fd0528cc37f1 h1:RKi6dyTxt5qvTJGMI7L59K9TwM0nNtQSuhF6TISayo4= +code.cloudfoundry.org/bytefmt v0.0.0-20240510175427-fd0528cc37f1/go.mod h1:2kFk7de6tXr+anU60NjVwGRDMv1ZolQCCm1DoV+KwDg= dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20221208032759-85de2813cf6b/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= eliasnaur.com/font v0.0.0-20230308162249-dd43949cb42d/go.mod h1:OYVuxibdk9OSLX8vAqydtRPP87PyTFcT9uH3MlEGBQA= @@ -194,20 +195,20 @@ github.com/apache/arrow/go/v15 v15.0.2/go.mod h1:DGXsR3ajT524njufqf95822i+KTh+ye github.com/apache/thrift v0.17.0/go.mod h1:OLxhMRJxomX+1I/KUw03qoV3mMz16BwaKI+d4fPBx7Q= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/aws/aws-sdk-go v1.52.4 h1:9VsBVJ2TKf8xPP3+yIPGSYcEBIEymXsJzQoFgQuyvA0= -github.com/aws/aws-sdk-go v1.52.4/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.53.1 h1:15/i0m9rE8r1q3P4ooHCfZTJtkxwG2Dwqp9JhPaVbs0= +github.com/aws/aws-sdk-go v1.53.1/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v1.26.1 h1:5554eUqIYVWpU0YmeeYZ0wU64H2VLBs8TlhRB2L+EkA= github.com/aws/aws-sdk-go-v2 v1.26.1/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 h1:x6xsQXGSmW6frevwDA+vi/wqhp1ct18mVXYN08/93to= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2/go.mod h1:lPprDr1e6cJdyYeGXnRaJoP4Md+cDBvi2eOj00BlGmg= -github.com/aws/aws-sdk-go-v2/config v1.27.11 h1:f47rANd2LQEYHda2ddSCKYId18/8BhSRM4BULGmfgNA= -github.com/aws/aws-sdk-go-v2/config v1.27.11/go.mod h1:SMsV78RIOYdve1vf36z8LmnszlRWkwMQtomCAI0/mIE= -github.com/aws/aws-sdk-go-v2/credentials v1.17.11 h1:YuIB1dJNf1Re822rriUOTxopaHHvIq0l/pX3fwO+Tzs= -github.com/aws/aws-sdk-go-v2/credentials v1.17.11/go.mod h1:AQtFPsDH9bI2O+71anW6EKL+NcD7LG3dpKGMV4SShgo= +github.com/aws/aws-sdk-go-v2/config v1.27.13 h1:WbKW8hOzrWoOA/+35S5okqO/2Ap8hkkFUzoW8Hzq24A= +github.com/aws/aws-sdk-go-v2/config v1.27.13/go.mod h1:XLiyiTMnguytjRER7u5RIkhIqS8Nyz41SwAWb4xEjxs= +github.com/aws/aws-sdk-go-v2/credentials v1.17.13 h1:XDCJDzk/u5cN7Aple7D/MiAhx1Rjo/0nueJ0La8mRuE= +github.com/aws/aws-sdk-go-v2/credentials v1.17.13/go.mod h1:FMNcjQrmuBYvOTZDtOLCIu0esmxjF7RuA/89iSXWzQI= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 h1:FVJ0r5XTHSmIHJV6KuDmdYhEpvlHpiSd38RQWhut5J4= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1/go.mod h1:zusuAeqezXzAB24LGuzuekqMAEgWkVYukBec3kr3jUg= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15 h1:7Zwtt/lP3KNRkeZre7soMELMGNoBrutx8nobg1jKWmo= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15/go.mod h1:436h2adoHb57yd+8W+gYPrrA9U/R/SuAuOO42Ushzhw= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.17 h1:9b1Os1s11mF5qTIKLgSsyPG810di2+ySSLIIt9bwe9I= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.17/go.mod h1:9Wp7tDOMhv0+sb/FTRAkbHNQ7abYDnoJRzm5AAtCnTc= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 h1:aw39xVGeRWlWx9EzGVnhOR4yOjQDHPQ6o6NmBlscyQg= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5/go.mod h1:FSaRudD0dXiMPK2UjknVwwTYyZMRsHv3TtkabsZih5I= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 h1:PG1F3OD1szkuQPzDw3CIQsRIrtTlUC3lP84taWzHlq0= @@ -224,14 +225,14 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 h1:ogRAwT1/g github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7/go.mod h1:YCsIZhXfRPLFFCl5xxY+1T9RKzOKjCut+28JSX2DnAk= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5 h1:f9RyWNtS8oH7cZlbn+/JNPpjUk5+5fLd5lM9M0i49Ys= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5/go.mod h1:h5CoMZV2VF297/VLhRhO1WF+XYWOzXo+4HsObA4HjBQ= -github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1 h1:6cnno47Me9bRykw9AEv9zkXE+5or7jz8TsskTTccbgc= -github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1/go.mod h1:qmdkIIAC+GCLASF7R2whgNrJADz0QZPX+Seiw/i4S3o= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 h1:vN8hEbpRnL7+Hopy9dzmRle1xmDc7o8tmY0klsr175w= -github.com/aws/aws-sdk-go-v2/service/sso v1.20.5/go.mod h1:qGzynb/msuZIE8I75DVRCUXw3o3ZyBmUvMwQ2t/BrGM= +github.com/aws/aws-sdk-go-v2/service/s3 v1.53.2 h1:rq2hglTQM3yHZvOPVMtNvLS5x6hijx7JvRDgKiTNDGQ= +github.com/aws/aws-sdk-go-v2/service/s3 v1.53.2/go.mod h1:qmdkIIAC+GCLASF7R2whgNrJADz0QZPX+Seiw/i4S3o= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.6 h1:o5cTaeunSpfXiLTIBx5xo2enQmiChtu1IBbzXnfU9Hs= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.6/go.mod h1:qGzynb/msuZIE8I75DVRCUXw3o3ZyBmUvMwQ2t/BrGM= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.2 h1:pi0Skl6mNl2w8qWZXcdOyg197Zsf4G97U7Sso9JXGZE= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.2/go.mod h1:JYzLoEVeLXk+L4tn1+rrkfhkxl6mLDEVaDSvGq9og90= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 h1:cwIxeBttqPN3qkaAjcEcsh8NYr8n2HZPkcKgPAi1phU= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.6/go.mod h1:FZf1/nKNEkHdGGJP/cI2MoIMquumuRK6ol3QQJNDxmw= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.7 h1:et3Ta53gotFR4ERLXXHIHl/Uuk1qYpP5uU7cvNql8ns= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.7/go.mod h1:FZf1/nKNEkHdGGJP/cI2MoIMquumuRK6ol3QQJNDxmw= github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= @@ -396,8 +397,8 @@ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc= github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0= -github.com/google/pprof v0.0.0-20240507183855-6f11f98ebb1c h1:GCixZ7sgey01Kjw8pxBzCD0uVrubxl8SRzRgI0jwP+A= -github.com/google/pprof v0.0.0-20240507183855-6f11f98ebb1c/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240509144519-723abb6459b7 h1:velgFPYr1X9TDwLIfkV7fWqsFlf7TeP11M/7kPd/dVI= +github.com/google/pprof v0.0.0-20240509144519-723abb6459b7/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/google/s2a-go v0.1.0/go.mod h1:OJpEgntRZo8ugHpF9hkoLJbS5dSI20XZeXJ9JVywLlM= github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= @@ -552,8 +553,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= -github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= @@ -647,8 +648,8 @@ go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2L go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= -go.starlark.net v0.0.0-20240507195648-35fe9f26b4bc h1:WMJEq47tB89BoJ5HUfoMZVtN+0u6f32LgIfQlu3mMF8= -go.starlark.net v0.0.0-20240507195648-35fe9f26b4bc/go.mod h1:YKMCv9b1WrfWmeqdV5MAuEHWsu5iC+fe6kYl2sQjdI8= +go.starlark.net v0.0.0-20240510163022-f457c4c2b267 h1:nHGP5vKtg2WaXA/AozoZWx/DI9wvwxCeikONJbdKdFo= +go.starlark.net v0.0.0-20240510163022-f457c4c2b267/go.mod h1:YKMCv9b1WrfWmeqdV5MAuEHWsu5iC+fe6kYl2sQjdI8= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= @@ -705,16 +706,16 @@ gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946 h1:vJpL69PeUullhJyKtTjHjENE gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946/go.mod h1:BQUWDHIAygjdt1HnUPQ0eWqLN2n5FwJycrpYUVUOx2I= gonum.org/v1/plot v0.14.0 h1:+LBDVFYwFe4LHhdP8coW6296MBEY4nQ+Y4vuUpJopcE= gonum.org/v1/plot v0.14.0/go.mod h1:MLdR9424SJed+5VqC6MsouEpig9pZX2VZ57H9ko2bXU= -google.golang.org/api v0.178.0 h1:yoW/QMI4bRVCHF+NWOTa4cL8MoWL3Jnuc7FlcFF91Ok= -google.golang.org/api v0.178.0/go.mod h1:84/k2v8DFpDRebpGcooklv/lais3MEfqpaBLA12gl2U= +google.golang.org/api v0.180.0 h1:M2D87Yo0rGBPWpo1orwfCLehUUL6E7/TYe5gvMQWDh4= +google.golang.org/api v0.180.0/go.mod h1:51AiyoEg1MJPSZ9zvklA8VnRILPXxn1iVen9v25XHAE= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto v0.0.0-20240506185236-b8a5c65736ae h1:HjgkYCl6cWQEKSHkpUp4Q8VB74swzyBwTz1wtTzahm0= -google.golang.org/genproto v0.0.0-20240506185236-b8a5c65736ae/go.mod h1:i4np6Wrjp8EujFAUn0CM0SH+iZhY1EbrfzEIJbFkHFM= -google.golang.org/genproto/googleapis/api v0.0.0-20240506185236-b8a5c65736ae h1:AH34z6WAGVNkllnKs5raNq3yRq93VnjBG6rpfub/jYk= -google.golang.org/genproto/googleapis/api v0.0.0-20240506185236-b8a5c65736ae/go.mod h1:FfiGhwUm6CJviekPrc0oJ+7h29e+DmWU6UtjX0ZvI7Y= +google.golang.org/genproto v0.0.0-20240513163218-0867130af1f8 h1:XpH03M6PDRKTo1oGfZBXu2SzwcbfxUokgobVinuUZoU= +google.golang.org/genproto v0.0.0-20240513163218-0867130af1f8/go.mod h1:OLh2Ylz+WlYAJaSBRpJIJLP8iQP+8da+fpxbwNEAV/o= +google.golang.org/genproto/googleapis/api v0.0.0-20240513163218-0867130af1f8 h1:W5Xj/70xIA4x60O/IFyXivR5MGqblAb8R3w26pnD6No= +google.golang.org/genproto/googleapis/api v0.0.0-20240513163218-0867130af1f8/go.mod h1:vPrPUTsDCYxXWjP7clS81mZ6/803D8K4iM9Ma27VKas= google.golang.org/genproto/googleapis/bytestream v0.0.0-20240429193739-8cf5692501f6/go.mod h1:ULqtoQMxDLNRfW+pJbKA68wtIy1OiYjdIsJs3PMpzh8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240506185236-b8a5c65736ae h1:c55+MER4zkBS14uJhSZMGGmya0yJx5iHV4x/fpOSNRk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240506185236-b8a5c65736ae/go.mod h1:I7Y+G38R2bu5j1aLzfFmQfTcU/WnFuqDwLZAbvKTKpM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8 h1:mxSlqyb8ZAHsYDCfiXN1EDdNTdvjUJSLY+OnAUtYNYA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8/go.mod h1:I7Y+G38R2bu5j1aLzfFmQfTcU/WnFuqDwLZAbvKTKpM= google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= diff --git a/internal/info/info.go b/internal/info/info.go index f8c820701d0..6f5f31e0f93 100644 --- a/internal/info/info.go +++ b/internal/info/info.go @@ -48,16 +48,20 @@ type info struct { // Detail represents environment information of system and stacktrace information. type Detail struct { - Version string `json:"vald_version,omitempty" yaml:"vald_version,omitempty"` - ServerName string `json:"server_name,omitempty" yaml:"server_name,omitempty"` - GitCommit string `json:"git_commit,omitempty" yaml:"git_commit,omitempty"` + AlgorithmInfo string `json:"algorithm_info,omitempty" yaml:"algorithm_info,omitempty"` BuildTime string `json:"build_time,omitempty" yaml:"build_time,omitempty"` - GoVersion string `json:"go_version,omitempty" yaml:"go_version,omitempty"` - GoOS string `json:"go_os,omitempty" yaml:"go_os,omitempty"` + CGOCall string `json:"cgo_call,omitempty" yaml:"cgo_call"` + CGOEnabled string `json:"cgo_enabled,omitempty" yaml:"cgo_enabled,omitempty"` + GitCommit string `json:"git_commit,omitempty" yaml:"git_commit,omitempty"` GoArch string `json:"go_arch,omitempty" yaml:"go_arch,omitempty"` + GoMaxProcs string `json:"go_max_procs,omitempty" yaml:"go_max_procs,omitempty"` + GoOS string `json:"go_os,omitempty" yaml:"go_os,omitempty"` GoRoot string `json:"go_root,omitempty" yaml:"go_root,omitempty"` - CGOEnabled string `json:"cgo_enabled,omitempty" yaml:"cgo_enabled,omitempty"` - AlgorithmInfo string `json:"algorithm_info,omitempty" yaml:"algorithm_info,omitempty"` + GoVersion string `json:"go_version,omitempty" yaml:"go_version,omitempty"` + GoroutineCount string `json:"goroutine_count,omitempty" yaml:"goroutine_count"` + RuntimeCPUCores string `json:"runtime_cpu_cores,omitempty" yaml:"runtime_cpu_cores,omitempty"` + ServerName string `json:"server_name,omitempty" yaml:"server_name,omitempty"` + Version string `json:"vald_version,omitempty" yaml:"vald_version,omitempty"` BuildCPUInfoFlags []string `json:"build_cpu_info_flags,omitempty" yaml:"build_cpu_info_flags,omitempty"` StackTrace []StackTrace `json:"stack_trace,omitempty" yaml:"stack_trace,omitempty"` } @@ -137,18 +141,19 @@ func Init(name string) { func New(opts ...Option) (Info, error) { i := &info{ detail: Detail{ - ServerName: "", - Version: Version, - GitCommit: GitCommit, + AlgorithmInfo: AlgorithmInfo, + BuildCPUInfoFlags: strings.Split(strings.TrimSpace(BuildCPUInfoFlags), " "), BuildTime: BuildTime, - GoVersion: GoVersion, - GoOS: GoOS, + CGOEnabled: CGOEnabled, + GitCommit: GitCommit, GoArch: GoArch, + GoOS: GoOS, GoRoot: GoRoot, - CGOEnabled: CGOEnabled, - AlgorithmInfo: AlgorithmInfo, - BuildCPUInfoFlags: strings.Split(strings.TrimSpace(BuildCPUInfoFlags), " "), + GoVersion: GoVersion, + RuntimeCPUCores: strconv.Itoa(runtime.NumCPU()), + ServerName: "", StackTrace: nil, + Version: Version, }, } @@ -177,7 +182,7 @@ func New(opts ...Option) (Info, error) { // String calls String method of global detail object. func String() string { if infoProvider == nil { - return "" + Init(log.Bold("WARNING: uninitialized info provider")) } return infoProvider.String() } @@ -185,7 +190,7 @@ func String() string { // Get calls Get method of global detail object. func Get() Detail { if infoProvider == nil { - return Detail{} + Init(log.Bold("WARNING: uninitialized info provider")) } return infoProvider.Get() } @@ -255,6 +260,12 @@ func (d Detail) String() string { if maxlen < l { maxlen = l } + switch tag { + case "cgo_call": + value = strconv.FormatInt(runtime.NumCgoCall(), 10) + case "goroutine_count": + value = strconv.Itoa(runtime.NumGoroutine()) + } info[tag] = value } @@ -370,6 +381,15 @@ func (i *info) prepare() { if i.baseURL == "" { i.baseURL = "https://" + valdRepo + "/tree/" + i.detail.GitCommit } + if len(i.detail.GoMaxProcs) == 0 { + i.detail.GoMaxProcs = strconv.Itoa(runtime.GOMAXPROCS(-1)) + } + if len(i.detail.CGOCall) == 0 { + i.detail.CGOCall = strconv.FormatInt(runtime.NumCgoCall(), 10) + } + if len(i.detail.GoroutineCount) == 0 { + i.detail.GoroutineCount = strconv.Itoa(runtime.NumGoroutine()) + } }) } diff --git a/internal/net/grpc/errdetails/errdetails.go b/internal/net/grpc/errdetails/errdetails.go index 1b24f34fc61..5e6ec1b8cf5 100644 --- a/internal/net/grpc/errdetails/errdetails.go +++ b/internal/net/grpc/errdetails/errdetails.go @@ -326,9 +326,23 @@ func AnyToErrorDetail(a *types.Any) proto.Message { return a.ProtoReflect().Interface() } -func DebugInfoFromInfoDetail(v *info.Detail) *DebugInfo { - debug := &DebugInfo{ - Detail: strings.Join(append(append([]string{ +func DebugInfoFromInfoDetail(v *info.Detail) (debug *DebugInfo) { + debug = new(DebugInfo) + if v.StackTrace != nil { + debug.StackEntries = make([]string, 0, len(v.StackTrace)) + for i, stack := range v.StackTrace { + debug.StackEntries = append(debug.GetStackEntries(), strings.Join([]string{ + "id:", + strconv.Itoa(i), + "stack_trace:", + stack.String(), + }, " ")) + } + v.StackTrace = nil + } + detail, err := json.Marshal(v) + if err != nil { + debug.Detail = strings.Join(append(append([]string{ "Version:", v.Version, ",", "Name:", v.ServerName, ",", "GitCommit:", v.GitCommit, ",", @@ -339,18 +353,9 @@ func DebugInfoFromInfoDetail(v *info.Detail) *DebugInfo { "GOOS:", v.GoOS, ",", "CGO_Enabled:", v.CGOEnabled, ",", "BuildCPUInfo: [", - }, v.BuildCPUInfoFlags...), "]"), " "), - } - if debug.GetStackEntries() == nil { - debug.StackEntries = make([]string, 0, len(v.StackTrace)) - } - for i, stack := range v.StackTrace { - debug.StackEntries = append(debug.GetStackEntries(), strings.Join([]string{ - "id:", - strconv.Itoa(i), - "stack_trace:", - stack.String(), - }, " ")) + }, v.BuildCPUInfoFlags...), "]"), " ") + } else { + debug.Detail = string(detail) } return debug } diff --git a/internal/observability/trace/status.go b/internal/observability/trace/status.go index 48a9adfd835..dc7390c61d4 100644 --- a/internal/observability/trace/status.go +++ b/internal/observability/trace/status.go @@ -19,7 +19,7 @@ package trace import ( "github.com/vdaas/vald/internal/net/grpc/codes" - "go.opentelemetry.io/otel/attribute" + "github.com/vdaas/vald/internal/observability/attribute" ocodes "go.opentelemetry.io/otel/codes" semconv "go.opentelemetry.io/otel/semconv/v1.24.0" ) diff --git a/pkg/agent/core/faiss/handler/grpc/insert.go b/pkg/agent/core/faiss/handler/grpc/insert.go index 356afc06326..68ff86801db 100644 --- a/pkg/agent/core/faiss/handler/grpc/insert.go +++ b/pkg/agent/core/faiss/handler/grpc/insert.go @@ -28,8 +28,8 @@ import ( "github.com/vdaas/vald/internal/net/grpc/codes" "github.com/vdaas/vald/internal/net/grpc/errdetails" "github.com/vdaas/vald/internal/net/grpc/status" + "github.com/vdaas/vald/internal/observability/attribute" "github.com/vdaas/vald/internal/observability/trace" - "go.opentelemetry.io/otel/attribute" ) func (s *server) Insert(ctx context.Context, req *payload.Insert_Request) (res *payload.Object_Location, err error) { diff --git a/pkg/agent/core/faiss/handler/grpc/remove.go b/pkg/agent/core/faiss/handler/grpc/remove.go index 9cbaea4496a..d2df6a2d8fc 100644 --- a/pkg/agent/core/faiss/handler/grpc/remove.go +++ b/pkg/agent/core/faiss/handler/grpc/remove.go @@ -27,8 +27,8 @@ import ( "github.com/vdaas/vald/internal/log" "github.com/vdaas/vald/internal/net/grpc/errdetails" "github.com/vdaas/vald/internal/net/grpc/status" + "github.com/vdaas/vald/internal/observability/attribute" "github.com/vdaas/vald/internal/observability/trace" - "go.opentelemetry.io/otel/attribute" ) func (s *server) Remove(ctx context.Context, req *payload.Remove_Request) (res *payload.Object_Location, err error) { diff --git a/pkg/agent/core/faiss/handler/grpc/search.go b/pkg/agent/core/faiss/handler/grpc/search.go index bbe5a45c4de..5494f41204a 100644 --- a/pkg/agent/core/faiss/handler/grpc/search.go +++ b/pkg/agent/core/faiss/handler/grpc/search.go @@ -27,8 +27,8 @@ import ( "github.com/vdaas/vald/internal/log" "github.com/vdaas/vald/internal/net/grpc/errdetails" "github.com/vdaas/vald/internal/net/grpc/status" + "github.com/vdaas/vald/internal/observability/attribute" "github.com/vdaas/vald/internal/observability/trace" - "go.opentelemetry.io/otel/attribute" ) func (s *server) Search(ctx context.Context, req *payload.Search_Request) (res *payload.Search_Response, err error) { diff --git a/pkg/agent/core/faiss/handler/grpc/update.go b/pkg/agent/core/faiss/handler/grpc/update.go index ca5b4f371db..3afaf708224 100644 --- a/pkg/agent/core/faiss/handler/grpc/update.go +++ b/pkg/agent/core/faiss/handler/grpc/update.go @@ -27,8 +27,8 @@ import ( "github.com/vdaas/vald/internal/log" "github.com/vdaas/vald/internal/net/grpc/errdetails" "github.com/vdaas/vald/internal/net/grpc/status" + "github.com/vdaas/vald/internal/observability/attribute" "github.com/vdaas/vald/internal/observability/trace" - "go.opentelemetry.io/otel/attribute" ) func (s *server) Update(ctx context.Context, req *payload.Update_Request) (res *payload.Object_Location, err error) { diff --git a/pkg/agent/core/ngt/handler/grpc/flush.go b/pkg/agent/core/ngt/handler/grpc/flush.go index cdba1128963..eebb8d3dec4 100644 --- a/pkg/agent/core/ngt/handler/grpc/flush.go +++ b/pkg/agent/core/ngt/handler/grpc/flush.go @@ -25,8 +25,8 @@ import ( "github.com/vdaas/vald/internal/log" "github.com/vdaas/vald/internal/net/grpc/errdetails" "github.com/vdaas/vald/internal/net/grpc/status" + "github.com/vdaas/vald/internal/observability/attribute" "github.com/vdaas/vald/internal/observability/trace" - "go.opentelemetry.io/otel/attribute" ) // Flush removes all vectors that are indexed and uncommitted in the `vald-agent`. diff --git a/pkg/agent/core/ngt/handler/grpc/insert.go b/pkg/agent/core/ngt/handler/grpc/insert.go index d4be3907c93..3a6c1fb3fb2 100644 --- a/pkg/agent/core/ngt/handler/grpc/insert.go +++ b/pkg/agent/core/ngt/handler/grpc/insert.go @@ -26,9 +26,9 @@ import ( "github.com/vdaas/vald/internal/net/grpc/codes" "github.com/vdaas/vald/internal/net/grpc/errdetails" "github.com/vdaas/vald/internal/net/grpc/status" + "github.com/vdaas/vald/internal/observability/attribute" "github.com/vdaas/vald/internal/observability/trace" "github.com/vdaas/vald/internal/strings" - "go.opentelemetry.io/otel/attribute" ) // Insert inserts a vector to the NGT. diff --git a/pkg/agent/core/ngt/handler/grpc/linear_search.go b/pkg/agent/core/ngt/handler/grpc/linear_search.go index abe0d374cdc..f3e84f04fb4 100644 --- a/pkg/agent/core/ngt/handler/grpc/linear_search.go +++ b/pkg/agent/core/ngt/handler/grpc/linear_search.go @@ -26,11 +26,11 @@ import ( "github.com/vdaas/vald/internal/net/grpc/codes" "github.com/vdaas/vald/internal/net/grpc/errdetails" "github.com/vdaas/vald/internal/net/grpc/status" + "github.com/vdaas/vald/internal/observability/attribute" "github.com/vdaas/vald/internal/observability/trace" "github.com/vdaas/vald/internal/safety" "github.com/vdaas/vald/internal/strings" "github.com/vdaas/vald/internal/sync" - "go.opentelemetry.io/otel/attribute" ) func (s *server) LinearSearch(ctx context.Context, req *payload.Search_Request) (res *payload.Search_Response, err error) { diff --git a/pkg/agent/core/ngt/handler/grpc/remove.go b/pkg/agent/core/ngt/handler/grpc/remove.go index f57685bbb14..55654038d01 100644 --- a/pkg/agent/core/ngt/handler/grpc/remove.go +++ b/pkg/agent/core/ngt/handler/grpc/remove.go @@ -26,10 +26,10 @@ import ( "github.com/vdaas/vald/internal/net/grpc/codes" "github.com/vdaas/vald/internal/net/grpc/errdetails" "github.com/vdaas/vald/internal/net/grpc/status" + "github.com/vdaas/vald/internal/observability/attribute" "github.com/vdaas/vald/internal/observability/trace" "github.com/vdaas/vald/internal/strings" "github.com/vdaas/vald/internal/sync" - "go.opentelemetry.io/otel/attribute" ) func (s *server) Remove(ctx context.Context, req *payload.Remove_Request) (res *payload.Object_Location, err error) { diff --git a/pkg/agent/core/ngt/handler/grpc/search.go b/pkg/agent/core/ngt/handler/grpc/search.go index 3c0e43dc847..69eed7b0ec0 100644 --- a/pkg/agent/core/ngt/handler/grpc/search.go +++ b/pkg/agent/core/ngt/handler/grpc/search.go @@ -26,11 +26,11 @@ import ( "github.com/vdaas/vald/internal/net/grpc/codes" "github.com/vdaas/vald/internal/net/grpc/errdetails" "github.com/vdaas/vald/internal/net/grpc/status" + "github.com/vdaas/vald/internal/observability/attribute" "github.com/vdaas/vald/internal/observability/trace" "github.com/vdaas/vald/internal/safety" "github.com/vdaas/vald/internal/strings" "github.com/vdaas/vald/internal/sync" - "go.opentelemetry.io/otel/attribute" ) func (s *server) Search(ctx context.Context, req *payload.Search_Request) (res *payload.Search_Response, err error) { diff --git a/pkg/agent/core/ngt/handler/grpc/update.go b/pkg/agent/core/ngt/handler/grpc/update.go index 0a76d7395f3..9f56f774a96 100644 --- a/pkg/agent/core/ngt/handler/grpc/update.go +++ b/pkg/agent/core/ngt/handler/grpc/update.go @@ -26,9 +26,9 @@ import ( "github.com/vdaas/vald/internal/net/grpc/codes" "github.com/vdaas/vald/internal/net/grpc/errdetails" "github.com/vdaas/vald/internal/net/grpc/status" + "github.com/vdaas/vald/internal/observability/attribute" "github.com/vdaas/vald/internal/observability/trace" "github.com/vdaas/vald/internal/strings" - "go.opentelemetry.io/otel/attribute" ) func (s *server) Update(ctx context.Context, req *payload.Update_Request) (res *payload.Object_Location, err error) { diff --git a/pkg/agent/core/ngt/service/ngt_test.go b/pkg/agent/core/ngt/service/ngt_test.go index 3adcf187266..6a3b983447b 100644 --- a/pkg/agent/core/ngt/service/ngt_test.go +++ b/pkg/agent/core/ngt/service/ngt_test.go @@ -38,6 +38,7 @@ import ( "github.com/vdaas/vald/internal/file" kvald "github.com/vdaas/vald/internal/k8s/vald" "github.com/vdaas/vald/internal/log" + "github.com/vdaas/vald/internal/net/grpc" "github.com/vdaas/vald/internal/safety" "github.com/vdaas/vald/internal/strings" "github.com/vdaas/vald/internal/sync" @@ -50,7 +51,6 @@ import ( "github.com/vdaas/vald/pkg/agent/internal/kvs" "github.com/vdaas/vald/pkg/agent/internal/metadata" "github.com/vdaas/vald/pkg/agent/internal/vqueue" - "google.golang.org/grpc" ) var defaultConfig = config.NGT{ @@ -1556,8 +1556,8 @@ func Test_ngt_E2E(t *testing.T) { type args struct { requests []*payload.Upsert_MultiRequest - addr string - dialOpts []grpc.DialOption + addr string + client grpc.Client } type want struct { err error @@ -1612,10 +1612,8 @@ func Test_ngt_E2E(t *testing.T) { createRandomData(500000, new(createRandomDataConfig)), 50, ), - addr: "127.0.0.1:8080", - dialOpts: []grpc.DialOption{ - grpc.WithInsecure(), - }, + addr: "127.0.0.1:8080", + client: grpc.New(grpc.WithInsecure(true)), }, }, } @@ -1637,20 +1635,15 @@ func Test_ngt_E2E(t *testing.T) { if test.checkFunc == nil { checkFunc = defaultCheckFunc } - conn, err := grpc.DialContext(ctx, test.args.addr, test.args.dialOpts...) - if err := checkFunc(test.want, err); err != nil { - t.Fatal(err) - } - defer func() { - if err := conn.Close(); err != nil { - t.Error(err) - } - }() - client := vald.NewValdClient(conn) + + defer test.args.client.Close(ctx) for i := 0; i < 2; i++ { for _, req := range test.args.requests { - _, err := client.MultiUpsert(ctx, req) + _, err := test.args.client.Do(ctx, test.args.addr, + func(ctx context.Context, conn *grpc.ClientConn, opts ...grpc.CallOption) (any, error) { + return vald.NewValdClient(conn).MultiInsert(ctx, req) + }) if err != nil { t.Error(err) } diff --git a/pkg/manager/index/handler/grpc/handler.go b/pkg/manager/index/handler/grpc/handler.go index baa60334b22..bdef144141e 100644 --- a/pkg/manager/index/handler/grpc/handler.go +++ b/pkg/manager/index/handler/grpc/handler.go @@ -53,3 +53,13 @@ func (s *server) IndexInfo(ctx context.Context, _ *payload.Empty) (res *payload. Indexing: s.indexer.IsIndexing(), }, nil } + +func (s *server) IndexDetail(ctx context.Context, _ *payload.Empty) (res *payload.Info_Index_Detail, err error) { + ctx, span := trace.StartSpan(ctx, "vald/manager-index.IndexDetail") + defer func() { + if span != nil { + span.End() + } + }() + return s.indexer.LoadIndexDetail(), nil +} diff --git a/pkg/manager/index/handler/grpc/handler_test.go b/pkg/manager/index/handler/grpc/handler_test.go index 7318ce15fbf..e937ff8a3af 100644 --- a/pkg/manager/index/handler/grpc/handler_test.go +++ b/pkg/manager/index/handler/grpc/handler_test.go @@ -214,3 +214,113 @@ package grpc // }) // } // } +// +// func Test_server_IndexDetail(t *testing.T) { +// type args struct { +// ctx context.Context +// in1 *payload.Empty +// } +// type fields struct { +// indexer service.Indexer +// UnimplementedIndexServer index.UnimplementedIndexServer +// } +// type want struct { +// wantRes *payload.Info_Index_Detail +// err error +// } +// type test struct { +// name string +// args args +// fields fields +// want want +// checkFunc func(want, *payload.Info_Index_Detail, error) error +// beforeFunc func(*testing.T, args) +// afterFunc func(*testing.T, args) +// } +// defaultCheckFunc := func(w want, gotRes *payload.Info_Index_Detail, err error) error { +// if !errors.Is(err, w.err) { +// return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) +// } +// if !reflect.DeepEqual(gotRes, w.wantRes) { +// return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", gotRes, w.wantRes) +// } +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// args: args { +// ctx:nil, +// in1:nil, +// }, +// fields: fields { +// indexer:nil, +// UnimplementedIndexServer:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// args: args { +// ctx:nil, +// in1:nil, +// }, +// fields: fields { +// indexer:nil, +// UnimplementedIndexServer:nil, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T, args args) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt, test.args) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt, test.args) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// s := &server{ +// indexer: test.fields.indexer, +// UnimplementedIndexServer: test.fields.UnimplementedIndexServer, +// } +// +// gotRes, err := s.IndexDetail(test.args.ctx, test.args.in1) +// if err := checkFunc(test.want, gotRes, err); err != nil { +// tt.Errorf("error = %v", err) +// } +// +// }) +// } +// } diff --git a/pkg/manager/index/service/indexer.go b/pkg/manager/index/service/indexer.go index 4d6b39729b3..6dcf930d36b 100644 --- a/pkg/manager/index/service/indexer.go +++ b/pkg/manager/index/service/indexer.go @@ -43,6 +43,8 @@ type Indexer interface { NumberOfUUIDs() uint32 NumberOfUncommittedUUIDs() uint32 IsIndexing() bool + IsSaving() bool + LoadIndexDetail() *payload.Info_Index_Detail } type index struct { @@ -51,18 +53,21 @@ type index struct { creationPoolSize uint32 indexDuration time.Duration indexDurationLimit time.Duration + saveIndexDuration time.Duration saveIndexDurationLimit time.Duration - saveIndexWaitDuration time.Duration - saveIndexTargetAddrCh chan string - schMap sync.Map[string, any] - concurrency int + shouldSaveList sync.Map[string, struct{}] + createIndexConcurrency int + saveIndexConcurrency int indexInfos sync.Map[string, *payload.Info_Index_Count] - indexing atomic.Value // bool + indexing atomic.Bool + saving atomic.Bool minUncommitted uint32 uuidsCount uint32 uncommittedUUIDsCount uint32 } +var empty = struct{}{} + func New(opts ...Option) (idx Indexer, err error) { i := new(index) for _, opt := range append(defaultOptions, opts...) { @@ -71,7 +76,8 @@ func New(opts ...Option) (idx Indexer, err error) { } } i.indexing.Store(false) - if i.indexDuration+i.indexDurationLimit+i.saveIndexDurationLimit == 0 { + i.saving.Store(false) + if i.indexDuration+i.indexDurationLimit+i.saveIndexDurationLimit <= 0 { return nil, errors.ErrInvalidConfig } return i, nil @@ -87,8 +93,6 @@ func (idx *index) Start(ctx context.Context) (<-chan error, error) { return nil, err } ech := make(chan error, 100) - sech := make(chan error, 10) - idx.saveIndexTargetAddrCh = make(chan string, len(idx.client.GetAddrs(ctx))*2) idx.eg.Go(safety.RecoverFunc(func() (err error) { defer close(ech) if idx.indexDuration <= 0 { @@ -97,56 +101,101 @@ func (idx *index) Start(ctx context.Context) (<-chan error, error) { if idx.indexDurationLimit <= 0 { idx.indexDurationLimit = math.MaxInt64 } + if idx.saveIndexDuration <= 0 { + idx.saveIndexDuration = math.MaxInt64 + } if idx.saveIndexDurationLimit <= 0 { idx.saveIndexDurationLimit = math.MaxInt64 } it := time.NewTicker(idx.indexDuration) itl := time.NewTicker(idx.indexDurationLimit) + st := time.NewTicker(idx.saveIndexDuration) stl := time.NewTicker(idx.saveIndexDurationLimit) defer it.Stop() defer itl.Stop() + defer st.Stop() defer stl.Stop() finalize := func() (err error) { err = ctx.Err() - if err != nil && err != context.Canceled { + if err != nil && + !errors.Is(err, context.Canceled) && + !errors.Is(err, context.DeadlineExceeded) { return err } return nil } + var mu sync.Mutex for { select { case <-ctx.Done(): return finalize() case err = <-dech: - ech <- err - case err = <-sech: - ech <- err - case <-it.C: - err = idx.execute(grpc.WithGRPCMethod(ctx, "core.v1.Agent/CreateIndex"), true, false) - if err != nil { - ech <- err - log.Error("an error occurred during indexing", err) - err = nil + case <-it.C: // index duration ticker + // execute CreateIndex. This execution ignores low index agent. + err = idx.createIndex(grpc.WithGRPCMethod(ctx, "core.v1.Agent/CreateIndex"), true) + if err != nil && + !errors.Is(err, context.Canceled) && + !errors.Is(err, context.DeadlineExceeded) { + err = errors.Wrap(err, "an error occurred during create indexing") } it.Reset(idx.indexDuration) - case <-itl.C: - err = idx.execute(grpc.WithGRPCMethod(ctx, "core.v1.Agent/CreateIndex"), false, false) - if err != nil { - ech <- err - log.Error("an error occurred during indexing", err) - err = nil + case <-itl.C: // index duration limit ticker + // execute CreateIndex. This execution always executes CreateIndex regardless of the state of the uncommitted index. + err = idx.createIndex(grpc.WithGRPCMethod(ctx, "core.v1.Agent/CreateIndex"), false) + if err != nil && + !errors.Is(err, context.Canceled) && + !errors.Is(err, context.DeadlineExceeded) { + err = errors.Wrap(err, "an error occurred during force create indexing") } itl.Reset(idx.indexDurationLimit) - case <-stl.C: - err = idx.execute(grpc.WithGRPCMethod(ctx, "core.v1.Agent/CreateAndSaveIndex"), false, true) - if err != nil { - ech <- err - log.Error("an error occurred during indexing and saving", err) - err = nil - } - stl.Reset(idx.saveIndexDurationLimit) + case <-st.C: // save index duration ticker + // execute SaveIndex in concurrent. + idx.eg.Go(safety.RecoverFunc(func() (err error) { + if !mu.TryLock() { + return + } + defer mu.Unlock() + defer st.Reset(idx.saveIndexDuration) + err = idx.saveIndex(grpc.WithGRPCMethod(ctx, "core.v1.Agent/SaveIndex"), false) + if err != nil && + !errors.Is(err, context.Canceled) && + !errors.Is(err, context.DeadlineExceeded) { + err = errors.Wrap(err, "an error occurred during save indexing") + log.Error(err) + select { + case <-ctx.Done(): + return nil + case ech <- err: + } + } + return nil + })) + case <-stl.C: // save index duration limit ticker + // execute SaveIndex in concurrent. + idx.eg.Go(safety.RecoverFunc(func() (err error) { + if !mu.TryLock() { + return + } + defer mu.Unlock() + defer stl.Reset(idx.saveIndexDurationLimit) + err = idx.saveIndex(grpc.WithGRPCMethod(ctx, "core.v1.Agent/SaveIndex"), true) + if err != nil && + !errors.Is(err, context.Canceled) && + !errors.Is(err, context.DeadlineExceeded) { + err = errors.Wrap(err, "an error occurred during force save indexing") + log.Error(err) + select { + case <-ctx.Done(): + return nil + case ech <- err: + } + } + return nil + })) } - if err != nil { + if err != nil && + !errors.Is(err, context.Canceled) && + !errors.Is(err, context.DeadlineExceeded) { log.Error(err) select { case <-ctx.Done(): @@ -156,35 +205,10 @@ func (idx *index) Start(ctx context.Context) (<-chan error, error) { } } })) - idx.eg.Go(safety.RecoverFunc(func() (err error) { - defer close(sech) - for { - select { - case <-ctx.Done(): - return - case addr := <-idx.saveIndexTargetAddrCh: - idx.schMap.Delete(addr) - _, err := idx.client.GetClient(). - Do(grpc.WithGRPCMethod(ctx, "core.v1.Agent/SaveIndex"), addr, func(ctx context.Context, conn *grpc.ClientConn, copts ...grpc.CallOption) (interface{}, error) { - return agent.NewAgentClient(conn).SaveIndex(ctx, &payload.Empty{}, copts...) - }) - if err != nil { - log.Warnf("an error occurred while calling SaveIndex of %s: %s", addr, err) - select { - case <-ctx.Done(): - return nil - case sech <- err: - } - } - } - - idx.waitForNextSaving(ctx) - } - })) return ech, nil } -func (idx *index) execute(ctx context.Context, enableLowIndexSkip, immediateSaving bool) (err error) { +func (idx *index) createIndex(ctx context.Context, enableLowIndexSkip bool) (err error) { ctx, span := trace.StartSpan(ctx, "vald/manager-index/service/Indexer.execute") defer func() { if span != nil { @@ -192,79 +216,75 @@ func (idx *index) execute(ctx context.Context, enableLowIndexSkip, immediateSavi } }() - if idx.indexing.Load().(bool) { + if idx.indexing.Load() { return nil } idx.indexing.Store(true) defer idx.indexing.Store(false) - addrs := idx.client.GetAddrs(ctx) - err = idx.client.GetClient().OrderedRangeConcurrent(ctx, addrs, - idx.concurrency, + return errors.Join(idx.client.GetClient().OrderedRangeConcurrent(ctx, idx.client.GetAddrs(ctx), + idx.createIndexConcurrency, func(ctx context.Context, addr string, conn *grpc.ClientConn, copts ...grpc.CallOption, ) (err error) { - select { - case <-ctx.Done(): - return nil - default: - } info, ok := idx.indexInfos.Load(addr) if ok && (info.GetUncommitted() == 0 || (enableLowIndexSkip && info.GetUncommitted() < idx.minUncommitted)) { return nil } - ac := agent.NewAgentClient(conn) - req := &payload.Control_CreateIndexRequest{ + _, err = agent.NewAgentClient(conn).CreateIndex(ctx, &payload.Control_CreateIndexRequest{ PoolSize: idx.creationPoolSize, - } - if !immediateSaving { - _, err = ac.CreateIndex(ctx, req, copts...) - if err != nil { - st, ok := status.FromError(err) - if ok && st != nil && st.Code() == codes.FailedPrecondition { - log.Debugf("CreateIndex of %s skipped, message: %s, err: %v", addr, st.Message(), errors.Join(st.Err(), err)) - return nil - } - log.Warnf("an error occurred while calling CreateIndex of %s: %s", addr, err) - return err - } - _, ok := idx.schMap.Load(addr) - if !ok { - select { - case <-ctx.Done(): - case idx.saveIndexTargetAddrCh <- addr: - idx.schMap.Store(addr, struct{}{}) - } - } - return nil - } - _, err = ac.CreateAndSaveIndex(ctx, req, copts...) + }, copts...) if err != nil { st, ok := status.FromError(err) if ok && st != nil && st.Code() == codes.FailedPrecondition { log.Debugf("CreateIndex of %s skipped, message: %s, err: %v", addr, st.Message(), errors.Join(st.Err(), err)) return nil } - log.Warnf("an error occurred while calling CreateAndSaveIndex of %s: %s", addr, err) + log.Warnf("an error occurred while calling CreateIndex of %s: %s", addr, err) return err } - idx.waitForNextSaving(ctx) + _, ok = idx.shouldSaveList.LoadOrStore(addr, empty) + if ok { + log.Debugf("addr %s already queued for saveIndex", addr) + return nil + } return nil - }) - if err != nil { - return err - } - return idx.loadInfos(ctx) + }), idx.loadInfos(ctx)) } -func (idx *index) waitForNextSaving(ctx context.Context) { - if idx.saveIndexWaitDuration > 0 { - timer := time.NewTimer(idx.saveIndexWaitDuration) - select { - case <-ctx.Done(): - case <-timer.C: +func (idx *index) saveIndex(ctx context.Context, force bool) (err error) { + ctx, span := trace.StartSpan(ctx, "vald/manager-index/service/Indexer.saveIndex") + defer func() { + if span != nil { + span.End() } - timer.Stop() + }() + + if idx.saving.Load() { + return nil } + idx.saving.Store(true) + defer idx.saving.Store(false) + return idx.client.GetClient().OrderedRangeConcurrent(ctx, idx.client.GetAddrs(ctx), + idx.saveIndexConcurrency, + func(ctx context.Context, + addr string, conn *grpc.ClientConn, copts ...grpc.CallOption, + ) (err error) { + _, ok := idx.shouldSaveList.LoadAndDelete(addr) + if !ok && !force { + return nil + } + _, err = agent.NewAgentClient(conn).SaveIndex(ctx, new(payload.Empty), copts...) + if err != nil { + st, ok := status.FromError(err) + if ok && st != nil && st.Code() == codes.FailedPrecondition { + log.Debugf("CreateIndex of %s skipped, message: %s, err: %v", addr, st.Message(), errors.Join(st.Err(), err)) + return nil + } + log.Warnf("an error occurred while calling CreateIndex of %s: %s", addr, err) + return err + } + return nil + }) } func (idx *index) loadInfos(ctx context.Context) (err error) { @@ -318,7 +338,11 @@ func (idx *index) loadInfos(ctx context.Context) (err error) { } func (idx *index) IsIndexing() bool { - return idx.indexing.Load().(bool) + return idx.indexing.Load() +} + +func (idx *index) IsSaving() bool { + return idx.saving.Load() } func (idx *index) NumberOfUUIDs() uint32 { @@ -328,3 +352,12 @@ func (idx *index) NumberOfUUIDs() uint32 { func (idx *index) NumberOfUncommittedUUIDs() uint32 { return atomic.LoadUint32(&idx.uncommittedUUIDsCount) } + +func (idx *index) LoadIndexDetail() (detail *payload.Info_Index_Detail) { + detail = new(payload.Info_Index_Detail) + idx.indexInfos.Range(func(addr string, info *payload.Info_Index_Count) bool { + detail.Counts[addr] = info + return true + }) + return detail +} diff --git a/pkg/manager/index/service/indexer_test.go b/pkg/manager/index/service/indexer_test.go index 40854f98d6e..f5cb8a5ce89 100644 --- a/pkg/manager/index/service/indexer_test.go +++ b/pkg/manager/index/service/indexer_test.go @@ -702,3 +702,148 @@ package service // }) // } // } +// +// func Test_index_LoadIndexDetail(t *testing.T) { +// type fields struct { +// client discoverer.Client +// eg errgroup.Group +// creationPoolSize uint32 +// indexDuration time.Duration +// indexDurationLimit time.Duration +// saveIndexDurationLimit time.Duration +// saveIndexWaitDuration time.Duration +// saveIndexTargetAddrCh chan string +// schMap sync.Map[string, any] +// concurrency int +// indexInfos sync.Map[string, *payload.Info_Index_Count] +// indexing atomic.Value +// minUncommitted uint32 +// uuidsCount uint32 +// uncommittedUUIDsCount uint32 +// } +// type want struct { +// wantDetail *payload.Info_Index_Detail +// } +// type test struct { +// name string +// fields fields +// want want +// checkFunc func(want, *payload.Info_Index_Detail) error +// beforeFunc func(*testing.T) +// afterFunc func(*testing.T) +// } +// defaultCheckFunc := func(w want, gotDetail *payload.Info_Index_Detail) error { +// if !reflect.DeepEqual(gotDetail, w.wantDetail) { +// return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", gotDetail, w.wantDetail) +// } +// return nil +// } +// tests := []test{ +// // TODO test cases +// /* +// { +// name: "test_case_1", +// fields: fields { +// client:nil, +// eg:nil, +// creationPoolSize:0, +// indexDuration:nil, +// indexDurationLimit:nil, +// saveIndexDurationLimit:nil, +// saveIndexWaitDuration:nil, +// saveIndexTargetAddrCh:nil, +// schMap:nil, +// concurrency:0, +// indexInfos:nil, +// indexing:nil, +// minUncommitted:0, +// uuidsCount:0, +// uncommittedUUIDsCount:0, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T,) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T,) { +// t.Helper() +// }, +// }, +// */ +// +// // TODO test cases +// /* +// func() test { +// return test { +// name: "test_case_2", +// fields: fields { +// client:nil, +// eg:nil, +// creationPoolSize:0, +// indexDuration:nil, +// indexDurationLimit:nil, +// saveIndexDurationLimit:nil, +// saveIndexWaitDuration:nil, +// saveIndexTargetAddrCh:nil, +// schMap:nil, +// concurrency:0, +// indexInfos:nil, +// indexing:nil, +// minUncommitted:0, +// uuidsCount:0, +// uncommittedUUIDsCount:0, +// }, +// want: want{}, +// checkFunc: defaultCheckFunc, +// beforeFunc: func(t *testing.T,) { +// t.Helper() +// }, +// afterFunc: func(t *testing.T,) { +// t.Helper() +// }, +// } +// }(), +// */ +// } +// +// for _, tc := range tests { +// test := tc +// t.Run(test.name, func(tt *testing.T) { +// tt.Parallel() +// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent()) +// if test.beforeFunc != nil { +// test.beforeFunc(tt) +// } +// if test.afterFunc != nil { +// defer test.afterFunc(tt) +// } +// checkFunc := test.checkFunc +// if test.checkFunc == nil { +// checkFunc = defaultCheckFunc +// } +// idx := &index{ +// client: test.fields.client, +// eg: test.fields.eg, +// creationPoolSize: test.fields.creationPoolSize, +// indexDuration: test.fields.indexDuration, +// indexDurationLimit: test.fields.indexDurationLimit, +// saveIndexDurationLimit: test.fields.saveIndexDurationLimit, +// saveIndexWaitDuration: test.fields.saveIndexWaitDuration, +// saveIndexTargetAddrCh: test.fields.saveIndexTargetAddrCh, +// schMap: test.fields.schMap, +// concurrency: test.fields.concurrency, +// indexInfos: test.fields.indexInfos, +// indexing: test.fields.indexing, +// minUncommitted: test.fields.minUncommitted, +// uuidsCount: test.fields.uuidsCount, +// uncommittedUUIDsCount: test.fields.uncommittedUUIDsCount, +// } +// +// gotDetail := idx.LoadIndexDetail() +// if err := checkFunc(test.want, gotDetail); err != nil { +// tt.Errorf("error = %v", err) +// } +// +// }) +// } +// } diff --git a/pkg/manager/index/service/option.go b/pkg/manager/index/service/option.go index c3fffb7dc24..ec6b76d662b 100644 --- a/pkg/manager/index/service/option.go +++ b/pkg/manager/index/service/option.go @@ -31,7 +31,6 @@ var defaultOptions = []Option{ WithIndexingDuration("1m"), WithIndexingDurationLimit("30m"), WithSaveIndexDurationLimit("3h"), - WithSaveIndexWaitDuration("10m"), WithMinUncommitted(100), WithCreationPoolSize(10000), } @@ -39,27 +38,22 @@ var defaultOptions = []Option{ func WithIndexingConcurrency(c int) Option { return func(idx *index) error { if c != 0 { - idx.concurrency = c + idx.createIndexConcurrency = c } return nil } } -func WithIndexingDuration(dur string) Option { +func WithSaveConcurrency(c int) Option { return func(idx *index) error { - if dur == "" { - return nil - } - d, err := timeutil.Parse(dur) - if err != nil { - return err + if c != 0 { + idx.saveIndexConcurrency = c } - idx.indexDuration = d return nil } } -func WithIndexingDurationLimit(dur string) Option { +func WithIndexingDuration(dur string) Option { return func(idx *index) error { if dur == "" { return nil @@ -68,12 +62,12 @@ func WithIndexingDurationLimit(dur string) Option { if err != nil { return err } - idx.indexDurationLimit = d + idx.indexDuration = d return nil } } -func WithSaveIndexDurationLimit(dur string) Option { +func WithIndexingDurationLimit(dur string) Option { return func(idx *index) error { if dur == "" { return nil @@ -82,12 +76,12 @@ func WithSaveIndexDurationLimit(dur string) Option { if err != nil { return err } - idx.saveIndexDurationLimit = d + idx.indexDurationLimit = d return nil } } -func WithSaveIndexWaitDuration(dur string) Option { +func WithSaveIndexDurationLimit(dur string) Option { return func(idx *index) error { if dur == "" { return nil @@ -96,7 +90,7 @@ func WithSaveIndexWaitDuration(dur string) Option { if err != nil { return err } - idx.saveIndexWaitDuration = d + idx.saveIndexDurationLimit = d return nil } } diff --git a/pkg/manager/index/usecase/indexer.go b/pkg/manager/index/usecase/indexer.go index a891fc487f0..0ca2f303c1d 100644 --- a/pkg/manager/index/usecase/indexer.go +++ b/pkg/manager/index/usecase/indexer.go @@ -98,7 +98,6 @@ func New(cfg *config.Data) (r runner.Runner, err error) { service.WithIndexingDuration(cfg.Indexer.AutoIndexCheckDuration), service.WithIndexingDurationLimit(cfg.Indexer.AutoIndexDurationLimit), service.WithSaveIndexDurationLimit(cfg.Indexer.AutoSaveIndexDurationLimit), - service.WithSaveIndexWaitDuration(cfg.Indexer.AutoSaveIndexWaitDuration), service.WithCreationPoolSize(cfg.Indexer.CreationPoolSize), service.WithMinUncommitted(cfg.Indexer.AutoIndexLength), ) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index d1f80abe163..1f21447a3ed 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -242,9 +242,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -648,9 +648,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19de2de2a00075bf566bee3bd4db014b11587e84184d3f7a791bc17f1a8e9e48" +checksum = "9554e3ab233f0a932403704f1a1d08c30d5ccd931adfdfa1e8b5a19b52c1d55a" dependencies = [ "anyhow", "itertools", @@ -816,9 +816,9 @@ checksum = "b7401a30af6cb5818bb64852270bb722533397edcfc7344954a38f420819ece2" [[package]] name = "syn" -version = "2.0.61" +version = "2.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9" +checksum = "bf5be731623ca1a1fb7d8be6f261a3be6d3e2337b8a1f97be944d020c8fcb704" dependencies = [ "proc-macro2", "quote", diff --git a/rust/libs/proto/src/manager.index.v1.tonic.rs b/rust/libs/proto/src/manager.index.v1.tonic.rs index 84255cb3a55..03d77f27662 100644 --- a/rust/libs/proto/src/manager.index.v1.tonic.rs +++ b/rust/libs/proto/src/manager.index.v1.tonic.rs @@ -17,6 +17,8 @@ pub mod index_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; + /** Represent the index manager service. +*/ #[derive(Debug, Clone)] pub struct IndexClient { inner: tonic::client::Grpc, @@ -97,6 +99,8 @@ pub mod index_client { self.inner = self.inner.max_encoding_message_size(limit); self } + /** Represent the RPC to get the index information. +*/ pub async fn index_info( &mut self, request: impl tonic::IntoRequest< @@ -124,6 +128,37 @@ pub mod index_client { .insert(GrpcMethod::new("manager.index.v1.Index", "IndexInfo")); self.inner.unary(req, path, codec).await } + /** Represent the RPC to get the index information for each agents. +*/ + pub async fn index_detail( + &mut self, + request: impl tonic::IntoRequest< + super::super::super::super::payload::v1::Empty, + >, + ) -> std::result::Result< + tonic::Response< + super::super::super::super::payload::v1::info::index::Detail, + >, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/manager.index.v1.Index/IndexDetail", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("manager.index.v1.Index", "IndexDetail")); + self.inner.unary(req, path, codec).await + } } } /// Generated server implementations. @@ -133,6 +168,8 @@ pub mod index_server { /// Generated trait containing gRPC methods that should be implemented for use with IndexServer. #[async_trait] pub trait Index: Send + Sync + 'static { + /** Represent the RPC to get the index information. +*/ async fn index_info( &self, request: tonic::Request, @@ -140,7 +177,20 @@ pub mod index_server { tonic::Response, tonic::Status, >; + /** Represent the RPC to get the index information for each agents. +*/ + async fn index_detail( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response< + super::super::super::super::payload::v1::info::index::Detail, + >, + tonic::Status, + >; } + /** Represent the index manager service. +*/ #[derive(Debug)] pub struct IndexServer { inner: _Inner, @@ -269,6 +319,55 @@ pub mod index_server { }; Box::pin(fut) } + "/manager.index.v1.Index/IndexDetail" => { + #[allow(non_camel_case_types)] + struct IndexDetailSvc(pub Arc); + impl< + T: Index, + > tonic::server::UnaryService< + super::super::super::super::payload::v1::Empty, + > for IndexDetailSvc { + type Response = super::super::super::super::payload::v1::info::index::Detail; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request< + super::super::super::super::payload::v1::Empty, + >, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::index_detail(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = IndexDetailSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } _ => { Box::pin(async move { Ok( diff --git a/rust/libs/proto/src/payload.v1.rs b/rust/libs/proto/src/payload.v1.rs index 25051403a43..a386d592a17 100644 --- a/rust/libs/proto/src/payload.v1.rs +++ b/rust/libs/proto/src/payload.v1.rs @@ -838,6 +838,20 @@ pub mod info { #[prost(bool, tag="4")] pub saving: bool, } + /// Represent the index count for each Agents message. + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Detail { + /// count infos for each agents + #[prost(map="string, message", tag="1")] + pub counts: ::std::collections::HashMap<::prost::alloc::string::String, Count>, + /// index replica of vald cluster + #[prost(uint32, tag="2")] + pub replica: u32, + /// live agent replica of vald cluster + #[prost(uint32, tag="3")] + pub live_agents: u32, + } /// Represent the UUID message. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/versions/GOLANGCILINT_VERSION b/versions/GOLANGCILINT_VERSION index f399a6f2bcd..1c55d0483b7 100644 --- a/versions/GOLANGCILINT_VERSION +++ b/versions/GOLANGCILINT_VERSION @@ -1 +1 @@ -v1.58.0 +v1.58.1 diff --git a/versions/K3S_VERSION b/versions/K3S_VERSION index 6e9db4b4bb8..8bf5775b8a9 100644 --- a/versions/K3S_VERSION +++ b/versions/K3S_VERSION @@ -1 +1 @@ -v1.29.4-k3s1 +v1.30.0-k3s1 diff --git a/versions/NGT_VERSION b/versions/NGT_VERSION index c043eea7767..b1b25a5ffae 100644 --- a/versions/NGT_VERSION +++ b/versions/NGT_VERSION @@ -1 +1 @@ -2.2.1 +2.2.2 diff --git a/versions/PROMETHEUS_STACK_VERSION b/versions/PROMETHEUS_STACK_VERSION index 18365ff7ad2..ebb9afb11fb 100644 --- a/versions/PROMETHEUS_STACK_VERSION +++ b/versions/PROMETHEUS_STACK_VERSION @@ -1 +1 @@ -58.4.0 +58.5.1 diff --git a/versions/YQ_VERSION b/versions/YQ_VERSION index ec877613c7c..9ca027a51d6 100644 --- a/versions/YQ_VERSION +++ b/versions/YQ_VERSION @@ -1 +1 @@ -v4.43.1 +v4.44.1 diff --git a/versions/actions/SOFTPROPS_ACTION_GH_RELEASE b/versions/actions/SOFTPROPS_ACTION_GH_RELEASE index 3eefcb9dd5b..e01025862f7 100644 --- a/versions/actions/SOFTPROPS_ACTION_GH_RELEASE +++ b/versions/actions/SOFTPROPS_ACTION_GH_RELEASE @@ -1 +1 @@ -1.0.0 +2.0.5