From 87e2cc32eb668bc1f9776c44e36aab6f12a5cfb8 Mon Sep 17 00:00:00 2001 From: kpango Date: Thu, 31 Aug 2023 10:28:15 +0900 Subject: [PATCH] refactor index manager service Signed-off-by: kpango --- apis/docs/v1/docs.md | 61 ++++ apis/grpc/v1/agent/core/agent.pb.go | 4 + apis/grpc/v1/agent/sidecar/sidecar.pb.go | 4 + apis/grpc/v1/discoverer/discoverer.pb.go | 4 + .../grpc/v1/filter/egress/egress_filter.pb.go | 4 + .../v1/filter/ingress/ingress_filter.pb.go | 4 + .../grpc/v1/manager/index/index_manager.pb.go | 51 +-- .../manager/index/index_manager_vtproto.pb.go | 38 +++ apis/grpc/v1/payload/payload.pb.go | 259 +++++++++----- apis/grpc/v1/payload/payload_vtproto.pb.go | 317 ++++++++++++++++++ apis/grpc/v1/vald/filter.pb.go | 4 + apis/grpc/v1/vald/insert.pb.go | 4 + apis/grpc/v1/vald/object.pb.go | 4 + apis/grpc/v1/vald/remove.pb.go | 4 + apis/grpc/v1/vald/search.pb.go | 4 + apis/grpc/v1/vald/update.pb.go | 4 + apis/grpc/v1/vald/upsert.pb.go | 4 + .../v1/manager/index/index_manager.proto | 4 + apis/proto/v1/payload/payload.proto | 5 + .../manager/index/index_manager.swagger.json | 34 ++ go.mod | 86 +++++ go.sum | 82 +++++ .../client/v1/client/discoverer/discover.go | 4 + internal/sync/errgroup/errgroup_test.go | 4 + internal/sync/semaphore/semaphore.go | 17 + .../sync/semaphore/semaphore_bench_test.go | 6 + internal/sync/singleflight/singleflight.go | 105 ++++++ .../sync/singleflight/singleflight_test.go | 30 ++ pkg/agent/core/ngt/handler/grpc/search.go | 4 + pkg/agent/core/ngt/service/ngt.go | 4 + pkg/manager/index/handler/grpc/handler.go | 10 + .../index/handler/grpc/handler_test.go | 110 ++++++ pkg/manager/index/service/indexer.go | 248 ++++++++------ pkg/manager/index/service/indexer_test.go | 145 ++++++++ pkg/manager/index/service/option.go | 26 +- pkg/manager/index/usecase/indexer.go | 1 - versions/GOLANGCILINT_VERSION | 4 + versions/KUBECTL_VERSION | 6 +- versions/NGT_VERSION | 4 + versions/PROMETHEUS_STACK_VERSION | 4 + versions/PROTOBUF_VERSION | 4 + versions/TELEPRESENCE_VERSION | 4 + 42 files changed, 1495 insertions(+), 230 deletions(-) diff --git a/apis/docs/v1/docs.md b/apis/docs/v1/docs.md index 88740c70316..88e03f5738a 100644 --- a/apis/docs/v1/docs.md +++ b/apis/docs/v1/docs.md @@ -31,6 +31,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) @@ -96,8 +98,11 @@ - [Filter](#vald-v1-Filter) - [apis/proto/v1/vald/insert.proto](#apis_proto_v1_vald_insert-proto) - [Insert](#vald-v1-Insert) +<<<<<<< HEAD - [apis/proto/v1/vald/object.proto](#apis_proto_v1_vald_object-proto) - [Object](#vald-v1-Object) +======= +>>>>>>> refactor/manager-index/small-refactor - [apis/proto/v1/vald/remove.proto](#apis_proto_v1_vald_remove-proto) - [Remove](#vald-v1-Remove) - [apis/proto/v1/vald/search.proto](#apis_proto_v1_vald_search-proto) @@ -106,6 +111,11 @@ - [Update](#vald-v1-Update) - [apis/proto/v1/vald/upsert.proto](#apis_proto_v1_vald_upsert-proto) - [Upsert](#vald-v1-Upsert) +<<<<<<< HEAD +======= +- [apis/proto/v1/vald/object.proto](#apis_proto_v1_vald_object-proto) + - [Object](#vald-v1-Object) +>>>>>>> refactor/manager-index/small-refactor - [Scalar Value Types](#scalar-value-types) @@ -205,9 +215,16 @@ Represent the ingress filter service. Represent the index manager service. +<<<<<<< HEAD | 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. | +>>>>>>> refactor/manager-index/small-refactor @@ -329,6 +346,25 @@ 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 | + + + +### Info.Index.Detail.CountsEntry + +| Field | Type | Label | Description | +| ----- | ------------------------------------------------ | ----- | ----------- | +| key | [string](#string) | | | +| value | [Info.Index.Count](#payload-v1-Info-Index-Count) | | | + ### Info.Index.UUID @@ -997,6 +1033,7 @@ Insert service provides ways to add new vectors. | StreamInsert | [.payload.v1.Insert.Request](#payload-v1-Insert-Request) stream | [.payload.v1.Object.StreamLocation](#payload-v1-Object-StreamLocation) stream | A method to add new multiple vectors by bidirectional streaming. | | MultiInsert | [.payload.v1.Insert.MultiRequest](#payload-v1-Insert-MultiRequest) | [.payload.v1.Object.Locations](#payload-v1-Object-Locations) | A method to add new multiple vectors in a single request. | +<<<<<<< HEAD

Top

@@ -1016,6 +1053,8 @@ Object service provides ways to fetch indexed vectors. | StreamGetObject | [.payload.v1.Object.VectorRequest](#payload-v1-Object-VectorRequest) stream | [.payload.v1.Object.StreamVector](#payload-v1-Object-StreamVector) stream | A method to fetch vectors by bidirectional streaming. | | StreamListObject | [.payload.v1.Object.List.Request](#payload-v1-Object-List-Request) | [.payload.v1.Object.List.Response](#payload-v1-Object-List-Response) stream | A method to get all the vectors with server streaming | +======= +>>>>>>> refactor/manager-index/small-refactor

Top

@@ -1097,6 +1136,28 @@ Upsert service provides ways to insert/update vectors. | StreamUpsert | [.payload.v1.Upsert.Request](#payload-v1-Upsert-Request) stream | [.payload.v1.Object.StreamLocation](#payload-v1-Object-StreamLocation) stream | A method to insert/update multiple vectors by bidirectional streaming. | | MultiUpsert | [.payload.v1.Upsert.MultiRequest](#payload-v1-Upsert-MultiRequest) | [.payload.v1.Object.Locations](#payload-v1-Object-Locations) | A method to insert/update multiple vectors in a single request. | +<<<<<<< HEAD +======= + + +

Top

+ +## apis/proto/v1/vald/object.proto + + + +### Object + +Object service provides ways to fetch indexed vectors. + +| Method Name | Request Type | Response Type | Description | +| ---------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------- | +| Exists | [.payload.v1.Object.ID](#payload-v1-Object-ID) | [.payload.v1.Object.ID](#payload-v1-Object-ID) | A method to check whether a specified ID is indexed or not. | +| GetObject | [.payload.v1.Object.VectorRequest](#payload-v1-Object-VectorRequest) | [.payload.v1.Object.Vector](#payload-v1-Object-Vector) | A method to fetch a vector. | +| StreamGetObject | [.payload.v1.Object.VectorRequest](#payload-v1-Object-VectorRequest) stream | [.payload.v1.Object.StreamVector](#payload-v1-Object-StreamVector) stream | A method to fetch vectors by bidirectional streaming. | +| StreamListObject | [.payload.v1.Object.List.Request](#payload-v1-Object-List-Request) | [.payload.v1.Object.List.Response](#payload-v1-Object-List-Response) stream | A method to get all the vectors with server streaming | + +>>>>>>> refactor/manager-index/small-refactor ## Scalar Value Types | .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | diff --git a/apis/grpc/v1/agent/core/agent.pb.go b/apis/grpc/v1/agent/core/agent.pb.go index ae1691e36a6..5c3b45aae68 100644 --- a/apis/grpc/v1/agent/core/agent.pb.go +++ b/apis/grpc/v1/agent/core/agent.pb.go @@ -17,7 +17,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 +<<<<<<< HEAD // protoc v4.24.1 +======= +// protoc v4.24.0 +>>>>>>> refactor/manager-index/small-refactor // source: apis/proto/v1/agent/core/agent.proto package core diff --git a/apis/grpc/v1/agent/sidecar/sidecar.pb.go b/apis/grpc/v1/agent/sidecar/sidecar.pb.go index 9020a646338..25574b1ac04 100644 --- a/apis/grpc/v1/agent/sidecar/sidecar.pb.go +++ b/apis/grpc/v1/agent/sidecar/sidecar.pb.go @@ -17,7 +17,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 +<<<<<<< HEAD // protoc v4.24.1 +======= +// protoc v4.24.0 +>>>>>>> refactor/manager-index/small-refactor // source: apis/proto/v1/agent/sidecar/sidecar.proto package sidecar diff --git a/apis/grpc/v1/discoverer/discoverer.pb.go b/apis/grpc/v1/discoverer/discoverer.pb.go index c527903b890..92698a9fb04 100644 --- a/apis/grpc/v1/discoverer/discoverer.pb.go +++ b/apis/grpc/v1/discoverer/discoverer.pb.go @@ -17,7 +17,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 +<<<<<<< HEAD // protoc v4.24.1 +======= +// protoc v4.24.0 +>>>>>>> refactor/manager-index/small-refactor // source: apis/proto/v1/discoverer/discoverer.proto package discoverer diff --git a/apis/grpc/v1/filter/egress/egress_filter.pb.go b/apis/grpc/v1/filter/egress/egress_filter.pb.go index 819bde27fb9..8fd1e637b01 100644 --- a/apis/grpc/v1/filter/egress/egress_filter.pb.go +++ b/apis/grpc/v1/filter/egress/egress_filter.pb.go @@ -17,7 +17,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 +<<<<<<< HEAD // protoc v4.24.1 +======= +// protoc v4.24.0 +>>>>>>> refactor/manager-index/small-refactor // source: apis/proto/v1/filter/egress/egress_filter.proto package egress diff --git a/apis/grpc/v1/filter/ingress/ingress_filter.pb.go b/apis/grpc/v1/filter/ingress/ingress_filter.pb.go index 7750c688455..86abb5aaeab 100644 --- a/apis/grpc/v1/filter/ingress/ingress_filter.pb.go +++ b/apis/grpc/v1/filter/ingress/ingress_filter.pb.go @@ -17,7 +17,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 +<<<<<<< HEAD // protoc v4.24.1 +======= +// protoc v4.24.0 +>>>>>>> refactor/manager-index/small-refactor // source: apis/proto/v1/filter/ingress/ingress_filter.proto package ingress diff --git a/apis/grpc/v1/manager/index/index_manager.pb.go b/apis/grpc/v1/manager/index/index_manager.pb.go index 02d723546ed..996a4987b4f 100644 --- a/apis/grpc/v1/manager/index/index_manager.pb.go +++ b/apis/grpc/v1/manager/index/index_manager.pb.go @@ -17,7 +17,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 +<<<<<<< HEAD // protoc v4.24.1 +======= +// protoc v4.24.0 +>>>>>>> refactor/manager-index/small-refactor // source: apis/proto/v1/manager/index/index_manager.proto package index @@ -51,31 +55,40 @@ var file_apis_proto_v1_manager_index_index_manager_proto_rawDesc = []byte{ 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 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, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 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_apis_proto_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_apis_proto_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 219ea820f6b..d17db0fddc0 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: "apis/proto/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 5dd6599ac3e..ee55374a520 100644 --- a/apis/grpc/v1/payload/payload.pb.go +++ b/apis/grpc/v1/payload/payload.pb.go @@ -17,7 +17,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 +<<<<<<< HEAD // protoc v4.24.1 +======= +// protoc v4.24.0 +>>>>>>> refactor/manager-index/small-refactor // source: apis/proto/v1/payload/payload.proto package payload @@ -4090,6 +4094,55 @@ 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"` +} + +func (x *Info_Index_Detail) Reset() { + *x = Info_Index_Detail{} + if protoimpl.UnsafeEnabled { + mi := &file_apis_proto_v1_payload_payload_proto_msgTypes[69] + 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_apis_proto_v1_payload_payload_proto_msgTypes[69] + 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_apis_proto_v1_payload_payload_proto_rawDescGZIP(), []int{9, 0, 1} +} + +func (x *Info_Index_Detail) GetCounts() map[string]*Info_Index_Count { + if x != nil { + return x.Counts + } + return nil +} + // Represent the UUID message. type Info_Index_UUID struct { state protoimpl.MessageState @@ -4100,7 +4153,7 @@ type Info_Index_UUID struct { func (x *Info_Index_UUID) Reset() { *x = Info_Index_UUID{} if protoimpl.UnsafeEnabled { - mi := &file_apis_proto_v1_payload_payload_proto_msgTypes[69] + mi := &file_apis_proto_v1_payload_payload_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4113,7 +4166,7 @@ func (x *Info_Index_UUID) String() string { func (*Info_Index_UUID) ProtoMessage() {} func (x *Info_Index_UUID) ProtoReflect() protoreflect.Message { - mi := &file_apis_proto_v1_payload_payload_proto_msgTypes[69] + mi := &file_apis_proto_v1_payload_payload_proto_msgTypes[70] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4126,7 +4179,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_apis_proto_v1_payload_payload_proto_rawDescGZIP(), []int{9, 0, 1} + return file_apis_proto_v1_payload_payload_proto_rawDescGZIP(), []int{9, 0, 2} } // The committed UUID. @@ -4141,7 +4194,7 @@ type Info_Index_UUID_Committed struct { func (x *Info_Index_UUID_Committed) Reset() { *x = Info_Index_UUID_Committed{} if protoimpl.UnsafeEnabled { - mi := &file_apis_proto_v1_payload_payload_proto_msgTypes[70] + mi := &file_apis_proto_v1_payload_payload_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4154,7 +4207,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_apis_proto_v1_payload_payload_proto_msgTypes[70] + mi := &file_apis_proto_v1_payload_payload_proto_msgTypes[72] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4167,7 +4220,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_apis_proto_v1_payload_payload_proto_rawDescGZIP(), []int{9, 0, 1, 0} + return file_apis_proto_v1_payload_payload_proto_rawDescGZIP(), []int{9, 0, 2, 0} } func (x *Info_Index_UUID_Committed) GetUuid() string { @@ -4189,7 +4242,7 @@ type Info_Index_UUID_Uncommitted struct { func (x *Info_Index_UUID_Uncommitted) Reset() { *x = Info_Index_UUID_Uncommitted{} if protoimpl.UnsafeEnabled { - mi := &file_apis_proto_v1_payload_payload_proto_msgTypes[71] + mi := &file_apis_proto_v1_payload_payload_proto_msgTypes[73] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4202,7 +4255,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_apis_proto_v1_payload_payload_proto_msgTypes[71] + mi := &file_apis_proto_v1_payload_payload_proto_msgTypes[73] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4215,7 +4268,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_apis_proto_v1_payload_payload_proto_rawDescGZIP(), []int{9, 0, 1, 1} + return file_apis_proto_v1_payload_payload_proto_rawDescGZIP(), []int{9, 0, 2, 1} } func (x *Info_Index_UUID_Uncommitted) GetUuid() string { @@ -4567,7 +4620,7 @@ var file_apis_proto_v1_payload_payload_proto_rawDesc = []byte{ 0x12, 0x1c, 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, 0xe0, 0x07, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0xca, 0x01, 0x0a, 0x05, + 0x64, 0x65, 0x22, 0x87, 0x09, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0xf1, 0x02, 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, @@ -4575,68 +4628,78 @@ var file_apis_proto_v1_payload_payload_proto_rawDesc = []byte{ 0x6f, 0x6d, 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, 0xfa, 0x42, 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, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x61, 0x76, 0x69, 0x6e, 0x67, 0x1a, 0xa4, 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, 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, 0xfa, 0x42, 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, 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, 0xfa, 0x42, 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, 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, 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, - 0xfa, 0x42, 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, 0xfa, - 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x05, 0x6e, 0x6f, 0x64, 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, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x5a, - 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, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x05, + 0x6e, 0x6f, 0x64, 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, 0x07, 0x0a, 0x05, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x5a, 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, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4652,7 +4715,7 @@ func file_apis_proto_v1_payload_payload_proto_rawDescGZIP() []byte { } var file_apis_proto_v1_payload_payload_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_apis_proto_v1_payload_payload_proto_msgTypes = make([]protoimpl.MessageInfo, 72) +var file_apis_proto_v1_payload_payload_proto_msgTypes = make([]protoimpl.MessageInfo, 74) var file_apis_proto_v1_payload_payload_proto_goTypes = []interface{}{ (Search_AggregationAlgorithm)(0), // 0: payload.v1.Search.AggregationAlgorithm (*Search)(nil), // 1: payload.v1.Search @@ -4724,10 +4787,12 @@ var file_apis_proto_v1_payload_payload_proto_goTypes = []interface{}{ (*Info_Nodes)(nil), // 67: payload.v1.Info.Nodes (*Info_IPs)(nil), // 68: payload.v1.Info.IPs (*Info_Index_Count)(nil), // 69: payload.v1.Info.Index.Count - (*Info_Index_UUID)(nil), // 70: payload.v1.Info.Index.UUID - (*Info_Index_UUID_Committed)(nil), // 71: payload.v1.Info.Index.UUID.Committed - (*Info_Index_UUID_Uncommitted)(nil), // 72: payload.v1.Info.Index.UUID.Uncommitted - (*status.Status)(nil), // 73: google.rpc.Status + (*Info_Index_Detail)(nil), // 70: payload.v1.Info.Index.Detail + (*Info_Index_UUID)(nil), // 71: payload.v1.Info.Index.UUID + nil, // 72: payload.v1.Info.Index.Detail.CountsEntry + (*Info_Index_UUID_Committed)(nil), // 73: payload.v1.Info.Index.UUID.Committed + (*Info_Index_UUID_Uncommitted)(nil), // 74: payload.v1.Info.Index.UUID.Uncommitted + (*status.Status)(nil), // 75: google.rpc.Status } var file_apis_proto_v1_payload_payload_proto_depIdxs = []int32{ 18, // 0: payload.v1.Search.Request.config:type_name -> payload.v1.Search.Config @@ -4743,7 +4808,7 @@ var file_apis_proto_v1_payload_payload_proto_depIdxs = []int32{ 43, // 10: payload.v1.Search.Response.results:type_name -> payload.v1.Object.Distance 19, // 11: payload.v1.Search.Responses.responses:type_name -> payload.v1.Search.Response 19, // 12: payload.v1.Search.StreamResponse.response:type_name -> payload.v1.Search.Response - 73, // 13: payload.v1.Search.StreamResponse.status:type_name -> google.rpc.Status + 75, // 13: payload.v1.Search.StreamResponse.status:type_name -> google.rpc.Status 22, // 14: payload.v1.Filter.Config.targets:type_name -> payload.v1.Filter.Target 47, // 15: payload.v1.Insert.Request.vector:type_name -> payload.v1.Object.Vector 28, // 16: payload.v1.Insert.Request.config:type_name -> payload.v1.Insert.Config @@ -4775,17 +4840,17 @@ var file_apis_proto_v1_payload_payload_proto_depIdxs = []int32{ 45, // 42: payload.v1.Object.VectorRequest.id:type_name -> payload.v1.Object.ID 23, // 43: payload.v1.Object.VectorRequest.filters:type_name -> payload.v1.Filter.Config 43, // 44: payload.v1.Object.StreamDistance.distance:type_name -> payload.v1.Object.Distance - 73, // 45: payload.v1.Object.StreamDistance.status:type_name -> google.rpc.Status + 75, // 45: payload.v1.Object.StreamDistance.status:type_name -> google.rpc.Status 47, // 46: payload.v1.Object.Vectors.vectors:type_name -> payload.v1.Object.Vector 47, // 47: payload.v1.Object.StreamVector.vector:type_name -> payload.v1.Object.Vector - 73, // 48: payload.v1.Object.StreamVector.status:type_name -> google.rpc.Status + 75, // 48: payload.v1.Object.StreamVector.status:type_name -> google.rpc.Status 51, // 49: payload.v1.Object.StreamBlob.blob:type_name -> payload.v1.Object.Blob - 73, // 50: payload.v1.Object.StreamBlob.status:type_name -> google.rpc.Status + 75, // 50: payload.v1.Object.StreamBlob.status:type_name -> google.rpc.Status 53, // 51: payload.v1.Object.StreamLocation.location:type_name -> payload.v1.Object.Location - 73, // 52: payload.v1.Object.StreamLocation.status:type_name -> google.rpc.Status + 75, // 52: payload.v1.Object.StreamLocation.status:type_name -> google.rpc.Status 53, // 53: payload.v1.Object.Locations.locations:type_name -> payload.v1.Object.Location 47, // 54: payload.v1.Object.List.Response.vector:type_name -> payload.v1.Object.Vector - 73, // 55: payload.v1.Object.List.Response.status:type_name -> google.rpc.Status + 75, // 55: payload.v1.Object.List.Response.status:type_name -> google.rpc.Status 64, // 56: payload.v1.Info.Pod.cpu:type_name -> payload.v1.Info.CPU 65, // 57: payload.v1.Info.Pod.memory:type_name -> payload.v1.Info.Memory 63, // 58: payload.v1.Info.Pod.node:type_name -> payload.v1.Info.Node @@ -4794,11 +4859,13 @@ var file_apis_proto_v1_payload_payload_proto_depIdxs = []int32{ 66, // 61: payload.v1.Info.Node.Pods:type_name -> payload.v1.Info.Pods 62, // 62: payload.v1.Info.Pods.pods:type_name -> payload.v1.Info.Pod 63, // 63: payload.v1.Info.Nodes.nodes:type_name -> payload.v1.Info.Node - 64, // [64:64] is the sub-list for method output_type - 64, // [64:64] is the sub-list for method input_type - 64, // [64:64] is the sub-list for extension type_name - 64, // [64:64] is the sub-list for extension extendee - 0, // [0:64] is the sub-list for field type_name + 72, // 64: payload.v1.Info.Index.Detail.counts:type_name -> payload.v1.Info.Index.Detail.CountsEntry + 69, // 65: payload.v1.Info.Index.Detail.CountsEntry.value:type_name -> payload.v1.Info.Index.Count + 66, // [66:66] is the sub-list for method output_type + 66, // [66:66] is the sub-list for method input_type + 66, // [66:66] is the sub-list for extension type_name + 66, // [66:66] is the sub-list for extension extendee + 0, // [0:66] is the sub-list for field type_name } func init() { file_apis_proto_v1_payload_payload_proto_init() } @@ -5636,7 +5703,7 @@ func file_apis_proto_v1_payload_payload_proto_init() { } } file_apis_proto_v1_payload_payload_proto_msgTypes[69].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: @@ -5648,6 +5715,18 @@ func file_apis_proto_v1_payload_payload_proto_init() { } } file_apis_proto_v1_payload_payload_proto_msgTypes[70].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_apis_proto_v1_payload_payload_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Info_Index_UUID_Committed); i { case 0: return &v.state @@ -5659,7 +5738,7 @@ func file_apis_proto_v1_payload_payload_proto_init() { return nil } } - file_apis_proto_v1_payload_payload_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { + file_apis_proto_v1_payload_payload_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Info_Index_UUID_Uncommitted); i { case 0: return &v.state @@ -5702,7 +5781,7 @@ func file_apis_proto_v1_payload_payload_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_apis_proto_v1_payload_payload_proto_rawDesc, NumEnums: 1, - NumMessages: 72, + NumMessages: 74, NumExtensions: 0, NumServices: 0, }, diff --git a/apis/grpc/v1/payload/payload_vtproto.pb.go b/apis/grpc/v1/payload/payload_vtproto.pb.go index b0f8162a93f..9891f52823e 100644 --- a/apis/grpc/v1/payload/payload_vtproto.pb.go +++ b/apis/grpc/v1/payload/payload_vtproto.pb.go @@ -1395,6 +1395,29 @@ 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 := &Info_Index_Detail{} + 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) @@ -3493,6 +3516,42 @@ 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 + } + } + } + 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 @@ -6902,6 +6961,61 @@ 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 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 = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = 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 @@ -8685,6 +8799,29 @@ 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 + sov(uint64(l)) + mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l + n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + } + } + n += len(m.unknownFields) + return n +} + func (m *Info_Index_UUID_Committed) SizeVT() (n int) { if m == nil { return 0 @@ -15238,6 +15375,186 @@ 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 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 ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return 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 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 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 ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return 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 ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLength + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return 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 := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Counts[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return 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/grpc/v1/vald/filter.pb.go b/apis/grpc/v1/vald/filter.pb.go index 14a4e50b372..5a9bee930fd 100644 --- a/apis/grpc/v1/vald/filter.pb.go +++ b/apis/grpc/v1/vald/filter.pb.go @@ -17,7 +17,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 +<<<<<<< HEAD // protoc v4.24.1 +======= +// protoc v4.24.0 +>>>>>>> refactor/manager-index/small-refactor // source: apis/proto/v1/vald/filter.proto package vald diff --git a/apis/grpc/v1/vald/insert.pb.go b/apis/grpc/v1/vald/insert.pb.go index aaf972ee056..635520d6df4 100644 --- a/apis/grpc/v1/vald/insert.pb.go +++ b/apis/grpc/v1/vald/insert.pb.go @@ -17,7 +17,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 +<<<<<<< HEAD // protoc v4.24.1 +======= +// protoc v4.24.0 +>>>>>>> refactor/manager-index/small-refactor // source: apis/proto/v1/vald/insert.proto package vald diff --git a/apis/grpc/v1/vald/object.pb.go b/apis/grpc/v1/vald/object.pb.go index 0cefb0ac65e..25e14f4f739 100644 --- a/apis/grpc/v1/vald/object.pb.go +++ b/apis/grpc/v1/vald/object.pb.go @@ -17,7 +17,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 +<<<<<<< HEAD // protoc v4.24.1 +======= +// protoc v4.24.0 +>>>>>>> refactor/manager-index/small-refactor // source: apis/proto/v1/vald/object.proto package vald diff --git a/apis/grpc/v1/vald/remove.pb.go b/apis/grpc/v1/vald/remove.pb.go index 58f7de151cf..8e9a42eda1c 100644 --- a/apis/grpc/v1/vald/remove.pb.go +++ b/apis/grpc/v1/vald/remove.pb.go @@ -17,7 +17,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 +<<<<<<< HEAD // protoc v4.24.1 +======= +// protoc v4.24.0 +>>>>>>> refactor/manager-index/small-refactor // source: apis/proto/v1/vald/remove.proto package vald diff --git a/apis/grpc/v1/vald/search.pb.go b/apis/grpc/v1/vald/search.pb.go index 5cb2ac80cdb..bb89d88d237 100644 --- a/apis/grpc/v1/vald/search.pb.go +++ b/apis/grpc/v1/vald/search.pb.go @@ -17,7 +17,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 +<<<<<<< HEAD // protoc v4.24.1 +======= +// protoc v4.24.0 +>>>>>>> refactor/manager-index/small-refactor // source: apis/proto/v1/vald/search.proto package vald diff --git a/apis/grpc/v1/vald/update.pb.go b/apis/grpc/v1/vald/update.pb.go index a2ccc728f1a..c98269093cb 100644 --- a/apis/grpc/v1/vald/update.pb.go +++ b/apis/grpc/v1/vald/update.pb.go @@ -17,7 +17,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 +<<<<<<< HEAD // protoc v4.24.1 +======= +// protoc v4.24.0 +>>>>>>> refactor/manager-index/small-refactor // source: apis/proto/v1/vald/update.proto package vald diff --git a/apis/grpc/v1/vald/upsert.pb.go b/apis/grpc/v1/vald/upsert.pb.go index 573c23e5875..f23f5bf1dfd 100644 --- a/apis/grpc/v1/vald/upsert.pb.go +++ b/apis/grpc/v1/vald/upsert.pb.go @@ -17,7 +17,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 +<<<<<<< HEAD // protoc v4.24.1 +======= +// protoc v4.24.0 +>>>>>>> refactor/manager-index/small-refactor // source: apis/proto/v1/vald/upsert.proto package vald diff --git a/apis/proto/v1/manager/index/index_manager.proto b/apis/proto/v1/manager/index/index_manager.proto index 40a1679d6b6..5bfa43433c1 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 dd0ebef7299..23ab56f2c65 100644 --- a/apis/proto/v1/payload/payload.proto +++ b/apis/proto/v1/payload/payload.proto @@ -471,6 +471,11 @@ 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; + } // Represent the UUID message. message UUID { diff --git a/apis/swagger/v1/manager/index/apis/proto/v1/manager/index/index_manager.swagger.json b/apis/swagger/v1/manager/index/apis/proto/v1/manager/index/index_manager.swagger.json index 835e1aa5b93..51f382052f6 100644 --- a/apis/swagger/v1/manager/index/apis/proto/v1/manager/index/index_manager.swagger.json +++ b/apis/swagger/v1/manager/index/apis/proto/v1/manager/index/index_manager.swagger.json @@ -7,6 +7,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/runtimeError" + } + } + }, + "tags": ["Index"] + } + }, "/index/info": { "get": { "summary": "Represent the RPC to get the index information.", @@ -54,6 +75,19 @@ }, "description": "Represent the index count message." }, + "IndexDetail": { + "type": "object", + "properties": { + "counts": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/IndexCount" + }, + "title": "count infos for each agents" + } + }, + "description": "Represent the index count for each Agents message." + }, "protobufAny": { "type": "object", "properties": { diff --git a/go.mod b/go.mod index a627c2108f6..fc1e3ec7036 100755 --- a/go.mod +++ b/go.mod @@ -4,9 +4,15 @@ go 1.20 replace ( cloud.google.com/go => cloud.google.com/go v0.110.7 +<<<<<<< HEAD cloud.google.com/go/bigquery => cloud.google.com/go/bigquery v1.54.0 cloud.google.com/go/compute => cloud.google.com/go/compute v1.23.0 cloud.google.com/go/datastore => cloud.google.com/go/datastore v1.14.0 +======= + cloud.google.com/go/bigquery => cloud.google.com/go/bigquery v1.53.0 + cloud.google.com/go/compute => cloud.google.com/go/compute v1.23.0 + cloud.google.com/go/datastore => cloud.google.com/go/datastore v1.13.0 +>>>>>>> refactor/manager-index/small-refactor cloud.google.com/go/firestore => cloud.google.com/go/firestore v1.12.0 cloud.google.com/go/iam => cloud.google.com/go/iam v1.1.2 cloud.google.com/go/kms => cloud.google.com/go/kms v1.15.1 @@ -23,7 +29,11 @@ replace ( github.com/Azure/azure-amqp-common-go/v3 => github.com/Azure/azure-amqp-common-go/v3 v3.2.3 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.7.1 +<<<<<<< HEAD github.com/Azure/azure-sdk-for-go/sdk/azidentity => github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 +======= + github.com/Azure/azure-sdk-for-go/sdk/azidentity => github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 +>>>>>>> refactor/manager-index/small-refactor github.com/Azure/azure-sdk-for-go/sdk/internal => github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 github.com/Azure/go-amqp => github.com/Azure/go-amqp v1.0.1 github.com/Azure/go-autorest => github.com/Azure/go-autorest v14.2.1-0.20230628134501-d3f8f8a6cdf2+incompatible @@ -43,6 +53,7 @@ replace ( github.com/ajstarks/svgo => github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b 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 +<<<<<<< HEAD github.com/aws/aws-sdk-go => github.com/aws/aws-sdk-go v1.44.334 github.com/aws/aws-sdk-go-v2 => github.com/aws/aws-sdk-go-v2 v1.21.0 github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream => github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.13 @@ -66,6 +77,31 @@ replace ( github.com/aws/aws-sdk-go-v2/service/sso => github.com/aws/aws-sdk-go-v2/service/sso v1.13.5 github.com/aws/aws-sdk-go-v2/service/sts => github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 github.com/aws/smithy-go => github.com/aws/smithy-go v1.14.2 +======= + github.com/aws/aws-sdk-go => github.com/aws/aws-sdk-go v1.44.323 + github.com/aws/aws-sdk-go-v2 => github.com/aws/aws-sdk-go-v2 v1.20.1 + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream => github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.12 + github.com/aws/aws-sdk-go-v2/config => github.com/aws/aws-sdk-go-v2/config v1.18.33 + github.com/aws/aws-sdk-go-v2/credentials => github.com/aws/aws-sdk-go-v2/credentials v1.13.32 + github.com/aws/aws-sdk-go-v2/feature/ec2/imds => github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.8 + github.com/aws/aws-sdk-go-v2/feature/s3/manager => github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.77 + github.com/aws/aws-sdk-go-v2/internal/configsources => github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.38 + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.32 + github.com/aws/aws-sdk-go-v2/internal/ini => github.com/aws/aws-sdk-go-v2/internal/ini v1.3.39 + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding => github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.13 + github.com/aws/aws-sdk-go-v2/service/internal/checksum => github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.33 + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url => github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.32 + github.com/aws/aws-sdk-go-v2/service/internal/s3shared => github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.1 + github.com/aws/aws-sdk-go-v2/service/kms => github.com/aws/aws-sdk-go-v2/service/kms v1.24.2 + github.com/aws/aws-sdk-go-v2/service/s3 => github.com/aws/aws-sdk-go-v2/service/s3 v1.38.2 + github.com/aws/aws-sdk-go-v2/service/secretsmanager => github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.21.0 + github.com/aws/aws-sdk-go-v2/service/sns => github.com/aws/aws-sdk-go-v2/service/sns v1.21.2 + github.com/aws/aws-sdk-go-v2/service/sqs => github.com/aws/aws-sdk-go-v2/service/sqs v1.24.2 + github.com/aws/aws-sdk-go-v2/service/ssm => github.com/aws/aws-sdk-go-v2/service/ssm v1.37.2 + github.com/aws/aws-sdk-go-v2/service/sso => github.com/aws/aws-sdk-go-v2/service/sso v1.13.2 + github.com/aws/aws-sdk-go-v2/service/sts => github.com/aws/aws-sdk-go-v2/service/sts v1.21.2 + github.com/aws/smithy-go => github.com/aws/smithy-go v1.14.1 +>>>>>>> refactor/manager-index/small-refactor github.com/benbjohnson/clock => github.com/benbjohnson/clock v1.3.5 github.com/beorn7/perks => github.com/beorn7/perks v1.0.1 github.com/bmizerany/assert => github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 @@ -120,7 +156,11 @@ replace ( github.com/go-playground/assert/v2 => github.com/go-playground/assert/v2 v2.2.0 github.com/go-playground/locales => github.com/go-playground/locales v0.14.1 github.com/go-playground/universal-translator => github.com/go-playground/universal-translator v0.18.1 +<<<<<<< HEAD github.com/go-playground/validator/v10 => github.com/go-playground/validator/v10 v10.15.2 +======= + github.com/go-playground/validator/v10 => github.com/go-playground/validator/v10 v10.15.0 +>>>>>>> refactor/manager-index/small-refactor github.com/go-redis/redis/v8 => github.com/go-redis/redis/v8 v8.11.5 github.com/go-sql-driver/mysql => github.com/go-sql-driver/mysql v1.7.1 github.com/go-task/slim-sprig => github.com/go-task/slim-sprig v2.20.0+incompatible @@ -153,7 +193,11 @@ 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.2 +<<<<<<< HEAD github.com/google/pprof => github.com/google/pprof v0.0.0-20230821062121-407c9e7a662f +======= + github.com/google/pprof => github.com/google/pprof v0.0.0-20230811205829-9131a7e9cc17 +>>>>>>> refactor/manager-index/small-refactor 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.3.1 @@ -162,7 +206,11 @@ replace ( github.com/gorilla/mux => github.com/gorilla/mux v1.8.0 github.com/gorilla/websocket => github.com/gorilla/websocket v1.5.0 github.com/gregjones/httpcache => github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 +<<<<<<< HEAD github.com/grpc-ecosystem/grpc-gateway/v2 => github.com/grpc-ecosystem/grpc-gateway/v2 v2.17.1 +======= + github.com/grpc-ecosystem/grpc-gateway/v2 => github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2 +>>>>>>> refactor/manager-index/small-refactor github.com/hailocab/go-hostpool => github.com/kpango/go-hostpool v0.0.0-20210303030322-aab80263dcd0 github.com/hanwen/go-fuse/v2 => github.com/hanwen/go-fuse/v2 v2.3.0 github.com/hashicorp/go-uuid => github.com/hashicorp/go-uuid v1.0.3 @@ -190,7 +238,11 @@ replace ( github.com/jstemmer/go-junit-report => github.com/jstemmer/go-junit-report v1.0.0 github.com/kisielk/errcheck => github.com/kisielk/errcheck v1.6.3 github.com/kisielk/gotool => github.com/kisielk/gotool v1.0.0 +<<<<<<< HEAD github.com/klauspost/compress => github.com/klauspost/compress v1.16.8-0.20230829121245-11e91a17b933 +======= + github.com/klauspost/compress => github.com/klauspost/compress v1.16.8-0.20230809110045-b404607005bc +>>>>>>> refactor/manager-index/small-refactor github.com/klauspost/cpuid/v2 => github.com/klauspost/cpuid/v2 v2.2.5 github.com/kpango/fastime => github.com/kpango/fastime v1.1.9 github.com/kpango/fuid => github.com/kpango/fuid v0.0.0-20221203053508-503b5ad89aa1 @@ -283,16 +335,27 @@ replace ( go.opentelemetry.io/otel/sdk/metric => go.opentelemetry.io/otel/sdk/metric v0.33.0 go.opentelemetry.io/otel/trace => go.opentelemetry.io/otel/trace v1.11.1 go.opentelemetry.io/proto/otlp => go.opentelemetry.io/proto/otlp v1.0.0 +<<<<<<< HEAD go.starlark.net => go.starlark.net v0.0.0-20230829175125-68633c9954b0 +======= + go.starlark.net => go.starlark.net v0.0.0-20230814145427-12f4cb8177e4 +>>>>>>> refactor/manager-index/small-refactor 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.2.1 go.uber.org/multierr => go.uber.org/multierr v1.11.0 go.uber.org/zap => go.uber.org/zap v1.25.0 +<<<<<<< HEAD gocloud.dev => gocloud.dev v0.34.0 golang.org/x/crypto => golang.org/x/crypto v0.12.0 golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb golang.org/x/exp/typeparams => golang.org/x/exp/typeparams v0.0.0-20230817173708-d852ddb80c63 +======= + gocloud.dev => gocloud.dev v0.33.0 + golang.org/x/crypto => golang.org/x/crypto v0.12.0 + golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb + golang.org/x/exp/typeparams => golang.org/x/exp/typeparams v0.0.0-20230811145659-89c5cff77bcb +>>>>>>> refactor/manager-index/small-refactor golang.org/x/image => golang.org/x/image v0.11.0 golang.org/x/lint => golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 golang.org/x/mobile => golang.org/x/mobile v0.0.0-20230818142238-7088062f872d @@ -307,6 +370,7 @@ replace ( golang.org/x/tools => golang.org/x/tools v0.12.0 golang.org/x/xerrors => golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 gomodules.xyz/jsonpatch/v2 => gomodules.xyz/jsonpatch/v2 v2.4.0 +<<<<<<< HEAD gonum.org/v1/gonum => gonum.org/v1/gonum v0.14.0 gonum.org/v1/hdf5 => gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946 gonum.org/v1/plot => gonum.org/v1/plot v0.13.0 @@ -315,6 +379,16 @@ replace ( google.golang.org/genproto => google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d +======= + gonum.org/v1/gonum => gonum.org/v1/gonum v0.13.0 + gonum.org/v1/hdf5 => gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946 + gonum.org/v1/plot => gonum.org/v1/plot v0.13.0 + google.golang.org/api => google.golang.org/api v0.137.0 + google.golang.org/appengine => google.golang.org/appengine v1.6.7 + google.golang.org/genproto => google.golang.org/genproto v0.0.0-20230814215434-ca7cfce7776a + google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20230814215434-ca7cfce7776a + google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20230814215434-ca7cfce7776a +>>>>>>> refactor/manager-index/small-refactor google.golang.org/grpc => google.golang.org/grpc v1.57.0 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.31.0 @@ -391,11 +465,19 @@ require ( golang.org/x/sync v0.3.0 golang.org/x/sys v0.11.0 golang.org/x/text v0.12.0 +<<<<<<< HEAD golang.org/x/tools v0.12.1-0.20230818130535-1517d1a3ba60 gonum.org/v1/hdf5 v0.0.0-00010101000000-000000000000 gonum.org/v1/plot v0.10.1 google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d +======= + golang.org/x/tools v0.11.0 + gonum.org/v1/hdf5 v0.0.0-00010101000000-000000000000 + gonum.org/v1/plot v0.10.1 + google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5 + google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577 +>>>>>>> refactor/manager-index/small-refactor google.golang.org/grpc v1.57.0 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 @@ -498,7 +580,11 @@ require ( gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect google.golang.org/api v0.134.0 // indirect google.golang.org/appengine v1.6.7 // indirect +<<<<<<< HEAD google.golang.org/genproto v0.0.0-20230821184602-ccc8af3d0e93 // indirect +======= + google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect +>>>>>>> refactor/manager-index/small-refactor gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.27.2 // indirect diff --git a/go.sum b/go.sum index 4e229bbe987..ff11f02da39 100644 --- a/go.sum +++ b/go.sum @@ -43,7 +43,11 @@ cloud.google.com/go/dataplex v1.9.0/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MP cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= cloud.google.com/go/dataproc/v2 v2.0.1/go.mod h1:7Ez3KRHdFGcfY7GcevBbvozX+zyWGcwLJvvAMwCaoZ4= cloud.google.com/go/dataqna v0.8.1/go.mod h1:zxZM0Bl6liMePWsHA8RMGAfmTG34vJMapbHAxQ5+WA8= +<<<<<<< HEAD cloud.google.com/go/datastore v1.14.0/go.mod h1:GAeStMBIt9bPS7jMJA85kgkpsMkvseWWXiaHya9Jes8= +======= +cloud.google.com/go/datastore v1.13.0/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= +>>>>>>> refactor/manager-index/small-refactor cloud.google.com/go/datastream v1.10.0/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q= cloud.google.com/go/deploy v1.13.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g= cloud.google.com/go/dialogflow v1.40.0/go.mod h1:L7jnH+JL2mtmdChzAIcXQHXMvQkE3U4hTaNltEuxXn4= @@ -115,8 +119,13 @@ cloud.google.com/go/servicedirectory v1.11.0/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6 cloud.google.com/go/shell v1.7.1/go.mod h1:u1RaM+huXFaTojTbW4g9P5emOrrmLE69KrxqQahKn4g= cloud.google.com/go/spanner v1.47.0/go.mod h1:IXsJwVW2j4UKs0eYDqodab6HgGuA1bViSqW4uH9lfUI= cloud.google.com/go/speech v1.19.0/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= +<<<<<<< HEAD cloud.google.com/go/storage v1.32.0 h1:5w6DxEGOnktmJHarxAOUywxVW9lbNWIzlzzUltG/3+o= cloud.google.com/go/storage v1.32.0/go.mod h1:Hhh/dogNRGca7IWv1RC2YqEn0c0G77ctA/OxflYkiD8= +======= +cloud.google.com/go/storage v1.31.0 h1:+S3LjjEN2zZ+L5hOwj4+1OkGCsLVe0NzpXKQ1pSdTCI= +cloud.google.com/go/storage v1.31.0/go.mod h1:81ams1PrhW16L4kF7qg+4mTq7SRs5HsbDTM0bWvrwJ0= +>>>>>>> refactor/manager-index/small-refactor cloud.google.com/go/storagetransfer v1.10.0/go.mod h1:DM4sTlSmGiNczmV6iZyceIh2dbs+7z2Ayg6YAiQlYfA= cloud.google.com/go/talent v1.6.2/go.mod h1:CbGvmKCG61mkdjcqTcLOkb2ZN1SrQI8MDyma2l7VD24= cloud.google.com/go/texttospeech v1.7.1/go.mod h1:m7QfG5IXxeneGqTapXNxv2ItxP/FS0hCZBwXYqucgSk= @@ -175,6 +184,7 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd github.com/apache/arrow/go/v12 v12.0.0/go.mod h1:d+tV/eHZZ7Dz7RPrFKtPK02tpr+c9/PEd/zm8mDS9Vg= github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +<<<<<<< HEAD github.com/aws/aws-sdk-go v1.44.334 h1:h2bdbGb//fez6Sv6PaYv868s9liDeoYM6hYsAqTB4MU= github.com/aws/aws-sdk-go v1.44.334/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v1.21.0 h1:gMT0IW+03wtYJhRqTVYn0wLzwdnK9sRMcxmtfGzRdJc= @@ -196,6 +206,29 @@ github.com/aws/aws-sdk-go-v2/service/sso v1.13.5 h1:oCvTFSDi67AX0pOX3PuPdGFewvLR github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.1 h1:hd0SKLMdOL/Sl6Z0np1PX9LeH2gqNtBe0MhTedA8MGI= github.com/aws/aws-sdk-go-v2/service/sts v1.21.5 h1:CQBFElb0LS8RojMJlxRSo/HXipvTZW2S44Lt9Mk2aYQ= github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= +======= +github.com/aws/aws-sdk-go v1.44.323 h1:97/dn93DWrN1VfhAWQ2tV+xuE6oO/LO9rSsEsuC4PLU= +github.com/aws/aws-sdk-go v1.44.323/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go-v2 v1.20.1 h1:rZBf5DWr7YGrnlTK4kgDQGn1ltqOg5orCYb/UhOFZkg= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.12 h1:lN6L3LrYHeZ6xCxaIYtoWCx4GMLk4nRknsh29OMSqHY= +github.com/aws/aws-sdk-go-v2/config v1.18.33 h1:JKcw5SFxFW/rpM4mOPjv0VQ11E2kxW13F3exWOy7VZU= +github.com/aws/aws-sdk-go-v2/credentials v1.13.32 h1:lIH1eKPcCY1ylR4B6PkBGRWMHO3aVenOKJHWiS4/G2w= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.8 h1:DK/9C+UN/X+1+Wm8pqaDksQr2tSLzq+8X1/rI/ZxKEQ= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.77 h1:oWSNL9oQy+do911sXpJyIc2J7RiUrbm9BecyaGy1wHo= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.38 h1:c8ed/T9T2K5I+h/JzmF5tpI46+OODQ74dzmdo+QnaMg= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.32 h1:hNeAAymUY5gu11WrrmFb3CVIp9Dar9hbo44yzzcQpzA= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.39 h1:fc0ukRAiP1syoSGZYu+DaE+FulSYhTiJ8WpVu5jElU4= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.0 h1:U5yySdwt2HPo/pnQec04DImLzWORbeWML1fJiLkKruI= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.13 h1:iV/W5OMBys+66OeXJi/7xIRrKZNsu0ylsLGu+6nbmQE= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.33 h1:QviNkc+vGSuEHx8P+pVNKOdWLXBPIwMFv7p0fphgE4U= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.32 h1:dGAseBFEYxth10V23b5e2mAS+tX7oVbfYHD6dnDdAsg= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.1 h1:PT6PBCycRwhpEW5hJnRiceCeoWJ+r3bdgXtV+VKG7Pk= +github.com/aws/aws-sdk-go-v2/service/s3 v1.38.2 h1:v346f1h8sUBKXnEbrv43L37MTBlFHyKXQPIZHNAaghA= +github.com/aws/aws-sdk-go-v2/service/sso v1.13.2 h1:A2RlEMo4SJSwbNoUUgkxTAEMduAy/8wG3eB2b2lP4gY= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.1 h1:hd0SKLMdOL/Sl6Z0np1PX9LeH2gqNtBe0MhTedA8MGI= +github.com/aws/aws-sdk-go-v2/service/sts v1.21.2 h1:ympg1+Lnq33XLhcK/xTG4yZHPs1Oyxu+6DEWbl7qOzA= +github.com/aws/smithy-go v1.14.1 h1:EFKMUmH/iHMqLiwoEDx2rRjRQpI1YCn5jTysoaDujFs= +>>>>>>> refactor/manager-index/small-refactor github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= @@ -337,8 +370,13 @@ 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.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +<<<<<<< HEAD github.com/google/pprof v0.0.0-20230821062121-407c9e7a662f h1:pDhu5sgp8yJlEF/g6osliIIpF9K4F5jvkULXa4daRDQ= github.com/google/pprof v0.0.0-20230821062121-407c9e7a662f/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +======= +github.com/google/pprof v0.0.0-20230811205829-9131a7e9cc17 h1:0h35ESZ02+hN/MFZb7XZOXg+Rl9+Rk8fBIf5YLws9gA= +github.com/google/pprof v0.0.0-20230811205829-9131a7e9cc17/go.mod h1:Jh3hGz2jkYak8qXPD19ryItVnUgpgeqzdkY/D0EaeuA= +>>>>>>> refactor/manager-index/small-refactor 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.5 h1:8IYp3w9nysqv3JH+NJgXJzGbDHzLOTj43BmSkp+O7qg= @@ -368,8 +406,13 @@ github.com/goxjs/gl v0.0.0-20210104184919-e3fafc6f8f2a/go.mod h1:dy/f2gjY09hwVfI github.com/goxjs/glfw v0.0.0-20191126052801-d2efb5f20838/go.mod h1:oS8P8gVOT4ywTcjV6wZlOU4GuVFQ8F5328KY3MJ79CY= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +<<<<<<< HEAD github.com/grpc-ecosystem/grpc-gateway/v2 v2.17.1 h1:LSsiG61v9IzzxMkqEr6nrix4miJI62xlRjwT7BYD2SM= github.com/grpc-ecosystem/grpc-gateway/v2 v2.17.1/go.mod h1:Hbb13e3/WtqQ8U5hLGkek9gJvBLasHuPFI0UEGfnQ10= +======= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2 h1:dygLcbEBA+t/P7ck6a8AkXv6juQ4cK0RHBoh32jxhHM= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2/go.mod h1:Ap9RLCIJVtgQg1/BBgVEfypOAySvvlcpcVQkSzJCH4Y= +>>>>>>> refactor/manager-index/small-refactor github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= @@ -401,8 +444,13 @@ github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:C github.com/kisielk/errcheck v1.6.3/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= +<<<<<<< HEAD github.com/klauspost/compress v1.16.8-0.20230829121245-11e91a17b933 h1:HjtVDh+PEXJNXJDbU19ZK3xqgIonCl0xeQdYI/SDw6U= github.com/klauspost/compress v1.16.8-0.20230829121245-11e91a17b933/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +======= +github.com/klauspost/compress v1.16.8-0.20230809110045-b404607005bc h1:5EwbwgCPqUsIcq9X7+CKH3a0NVJZFxbrY8fz9PUQEz8= +github.com/klauspost/compress v1.16.8-0.20230809110045-b404607005bc/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +>>>>>>> refactor/manager-index/small-refactor github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/kpango/fastime v1.1.9 h1:xVQHcqyPt5M69DyFH7g1EPRns1YQNap9d5eLhl/Jy84= @@ -567,8 +615,13 @@ go.opentelemetry.io/otel/trace v1.11.1 h1:ofxdnzsNrGBYXbP7t7zpUK281+go5rF7dvdIZX go.opentelemetry.io/otel/trace v1.11.1/go.mod h1:f/Q9G7vzk5u91PhbmKbg1Qn0rzH1LJ4vbPHFGkTPtOk= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= +<<<<<<< HEAD go.starlark.net v0.0.0-20230829175125-68633c9954b0 h1:mr0wY3kXIH4jJZPj1HYmK35saEoo+2aQkdD1Dh/IssM= go.starlark.net v0.0.0-20230829175125-68633c9954b0/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds= +======= +go.starlark.net v0.0.0-20230814145427-12f4cb8177e4 h1:Ydko8M6UfXgvSpGOnbAjRMQDIvBheUsjBjkm6Azcpf4= +go.starlark.net v0.0.0-20230814145427-12f4cb8177e4/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds= +>>>>>>> refactor/manager-index/small-refactor go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= @@ -577,16 +630,26 @@ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= +<<<<<<< HEAD gocloud.dev v0.34.0 h1:LzlQY+4l2cMtuNfwT2ht4+fiXwWf/NmPTnXUlLmGif4= gocloud.dev v0.34.0/go.mod h1:psKOachbnvY3DAOPbsFVmLIErwsbWPUG2H5i65D38vE= +======= +gocloud.dev v0.33.0 h1:ET5z49jm1+eUhY5BkuGk2d7czfgGeXKd4vtg1Jcg9OQ= +gocloud.dev v0.33.0/go.mod h1:z6W8qorjrfM09H8t1MDk8KLPj3Xi26aFBzDKAHWIgLU= +>>>>>>> refactor/manager-index/small-refactor golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/exp/shiny v0.0.0-20220827204233-334a2380cb91/go.mod h1:VjAR7z0ngyATZTELrBSkxOOHhhlnVUxDye4mcjx5h/8= golang.org/x/exp/shiny v0.0.0-20230425010034-47ecfdc1ba53/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= +<<<<<<< HEAD golang.org/x/exp/typeparams v0.0.0-20230817173708-d852ddb80c63 h1:XkcpbHJE31bhdecT6qfUGtB7MCIKA8Vb9uGOyX/T364= golang.org/x/exp/typeparams v0.0.0-20230817173708-d852ddb80c63/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +======= +golang.org/x/exp/typeparams v0.0.0-20230811145659-89c5cff77bcb h1:v3JOchFBzuOEFQgVl0t5JnLg3yx29q2e1IjrEovxAt4= +golang.org/x/exp/typeparams v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +>>>>>>> refactor/manager-index/small-refactor golang.org/x/image v0.11.0 h1:ds2RoQvBvYTiJkwpSFDwCcDFNX7DqjL2WsUgTNk0Ooo= golang.org/x/image v0.11.0/go.mod h1:bglhjqbqVuEb9e9+eNR45Jfu7D+T4Qan+NhQk8Ck2P8= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= @@ -613,12 +676,18 @@ golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3j golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= +<<<<<<< HEAD gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= +======= +gonum.org/v1/gonum v0.13.0 h1:a0T3bh+7fhRyqeNbiC3qVHYmkiQgit3wnNan/2c0HMM= +gonum.org/v1/gonum v0.13.0/go.mod h1:/WPYRckkfWrhWefxyYTfrTtQR0KH4iyHNuzxqXAKyAU= +>>>>>>> refactor/manager-index/small-refactor 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= gonum.org/v1/plot v0.13.0 h1:yb2Z/b8bY5h/xC4uix+ujJ+ixvPUvBmUOtM73CJzpsw= gonum.org/v1/plot v0.13.0/go.mod h1:mV4Bpu4PWTgN2CETURNF8hCMg7EtlZqJYCcmYo/t4Co= +<<<<<<< HEAD google.golang.org/api v0.138.0 h1:K/tVp05MxNVbHShRw9m7e9VJGdagNeTdMzqPH7AUqr0= google.golang.org/api v0.138.0/go.mod h1:4xyob8CxC+0GChNBvEUAk8VBKNvYOTWM9T3v3UfRxuY= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= @@ -630,6 +699,19 @@ google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go. google.golang.org/genproto/googleapis/bytestream v0.0.0-20230807174057-1744710a1577/go.mod h1:NjCQG/D8JandXxM57PZbAJL1DCNL6EypA0vPPwfsc7c= google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +======= +google.golang.org/api v0.137.0 h1:QrKX6uNvzJLr0Fd3vWVqcyrcmFoYi036VUAsZbiF4+s= +google.golang.org/api v0.137.0/go.mod h1:4xyob8CxC+0GChNBvEUAk8VBKNvYOTWM9T3v3UfRxuY= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20230814215434-ca7cfce7776a h1:+pp9kgkk8qyqFeQyXoDBFI4U+YYB15cmRkQ3pi6v/h4= +google.golang.org/genproto v0.0.0-20230814215434-ca7cfce7776a/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto/googleapis/api v0.0.0-20230814215434-ca7cfce7776a h1:ICnet6R+XBkBfhCeApORkkEZbXfPUIHmqOC+5MdMtaQ= +google.golang.org/genproto/googleapis/api v0.0.0-20230814215434-ca7cfce7776a/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20230807174057-1744710a1577/go.mod h1:NjCQG/D8JandXxM57PZbAJL1DCNL6EypA0vPPwfsc7c= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230814215434-ca7cfce7776a h1:5rTPHLf5eLPfqGvw3fLpEmUpko2Ky91ft14LxGs5BZc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230814215434-ca7cfce7776a/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +>>>>>>> refactor/manager-index/small-refactor google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0/go.mod h1:Dk1tviKTvMCz5tvh7t+fh94dhmQVHuCt2OzJB3CTW9Y= diff --git a/internal/client/v1/client/discoverer/discover.go b/internal/client/v1/client/discoverer/discover.go index a97704bdd53..6e5e11831eb 100644 --- a/internal/client/v1/client/discoverer/discover.go +++ b/internal/client/v1/client/discoverer/discover.go @@ -344,7 +344,11 @@ func (c *client) disconnectOldAddrs(ctx context.Context, oldAddrs, connectedAddr if !c.autoconn { return nil } +<<<<<<< HEAD var cur sync.Map[string, any] +======= + var cur sync.Map[string, any] // TODO: Does this have to be a sync.Map not a map? +>>>>>>> refactor/manager-index/small-refactor for _, addr := range connectedAddrs { cur.Store(addr, struct{}{}) } diff --git a/internal/sync/errgroup/errgroup_test.go b/internal/sync/errgroup/errgroup_test.go index 72a0e9a9854..f06083bcad2 100644 --- a/internal/sync/errgroup/errgroup_test.go +++ b/internal/sync/errgroup/errgroup_test.go @@ -251,7 +251,11 @@ func TestTryGo(t *testing.T) { g.SetLimit(0) for i := 0; i < 1<<10; i++ { if g.TryGo(fn) { +<<<<<<< HEAD t.Fatalf("TryGo should fail but got succeeded.") +======= + t.Fatalf("TryGo should fail but got succeded.") +>>>>>>> refactor/manager-index/small-refactor } } g.Wait() diff --git a/internal/sync/semaphore/semaphore.go b/internal/sync/semaphore/semaphore.go index c078cbf40b4..766c498391e 100644 --- a/internal/sync/semaphore/semaphore.go +++ b/internal/sync/semaphore/semaphore.go @@ -40,8 +40,13 @@ import ( ) type waiter struct { +<<<<<<< HEAD ready chan<- struct{} // Closed when semaphore acquired. n int64 +======= + n int64 + ready chan<- struct{} // Closed when semaphore acquired. +>>>>>>> refactor/manager-index/small-refactor } // NewWeighted creates a new weighted semaphore with the given @@ -54,10 +59,17 @@ func NewWeighted(n int64) *Weighted { // Weighted provides a way to bound concurrent access to a resource. // The callers can request access with a given weight. type Weighted struct { +<<<<<<< HEAD waiters list.List mu sync.Mutex size int64 cur int64 +======= + size int64 + cur int64 + mu sync.Mutex + waiters list.List +>>>>>>> refactor/manager-index/small-refactor } // Acquire acquires the semaphore with a weight of n, blocking until resources @@ -150,8 +162,13 @@ func (s *Weighted) notifyWaiters() { break // No more waiters blocked. } +<<<<<<< HEAD w, ok := next.Value.(waiter) if ok && s.size-s.cur < w.n { +======= + w := next.Value.(waiter) + if s.size-s.cur < w.n { +>>>>>>> refactor/manager-index/small-refactor // Not enough tokens for the next waiter. We could keep going (to try to // find a waiter with a smaller request), but under load that could cause // starvation for large requests; instead, we leave all remaining waiters diff --git a/internal/sync/semaphore/semaphore_bench_test.go b/internal/sync/semaphore/semaphore_bench_test.go index 9605e1fff78..e491aaee6c5 100644 --- a/internal/sync/semaphore/semaphore_bench_test.go +++ b/internal/sync/semaphore/semaphore_bench_test.go @@ -84,7 +84,10 @@ func (s semChan) Release(n int64) { // acquireN calls Acquire(size) on sem N times and then calls Release(size) N times. func acquireN(b *testing.B, sem weighted, size int64, N int) { +<<<<<<< HEAD b.Helper() +======= +>>>>>>> refactor/manager-index/small-refactor b.ResetTimer() for i := 0; i < b.N; i++ { for j := 0; j < N; j++ { @@ -98,7 +101,10 @@ func acquireN(b *testing.B, sem weighted, size int64, N int) { // tryAcquireN calls TryAcquire(size) on sem N times and then calls Release(size) N times. func tryAcquireN(b *testing.B, sem weighted, size int64, N int) { +<<<<<<< HEAD b.Helper() +======= +>>>>>>> refactor/manager-index/small-refactor b.ResetTimer() for i := 0; i < b.N; i++ { for j := 0; j < N; j++ { diff --git a/internal/sync/singleflight/singleflight.go b/internal/sync/singleflight/singleflight.go index afbbd459f10..1b2a320ab93 100644 --- a/internal/sync/singleflight/singleflight.go +++ b/internal/sync/singleflight/singleflight.go @@ -34,6 +34,7 @@ package singleflight import ( +<<<<<<< HEAD "context" "fmt" "runtime" @@ -41,6 +42,15 @@ import ( "github.com/vdaas/vald/internal/errors" "github.com/vdaas/vald/internal/info" +======= + "bytes" + "context" + "errors" + "fmt" + "runtime/debug" + "sync/atomic" + +>>>>>>> refactor/manager-index/small-refactor "github.com/vdaas/vald/internal/sync" ) @@ -51,12 +61,18 @@ var errGoexit = errors.New("runtime.Goexit was called") // A panicError is an arbitrary value recovered from a panic // with the stack trace during the execution of given function. type panicError struct { +<<<<<<< HEAD value any detail info.Detail +======= + value interface{} + stack []byte +>>>>>>> refactor/manager-index/small-refactor } // Error implements error interface. func (p *panicError) Error() string { +<<<<<<< HEAD return fmt.Sprintf("%v\n\n%s", p.value, p.detail.String()) } @@ -67,6 +83,26 @@ func newPanicError(v any) error { // call is an in-flight or completed singleflight.Do call. type call[V any] struct { wg sync.WaitGroup +======= + return fmt.Sprintf("%v\n\n%s", p.value, p.stack) +} + +func newPanicError(v interface{}) error { + stack := debug.Stack() + + // The first line of the stack trace is of the form "goroutine N [status]:" + // but by the time the panic reaches Do the goroutine may no longer exist + // and its status will have changed. Trim out the misleading line. + if line := bytes.IndexByte(stack[:], '\n'); line >= 0 { + stack = stack[line+1:] + } + return &panicError{value: v, stack: stack} +} + +// call is an in-flight or completed singleflight.Do call +type call[V any] struct { + mu sync.Mutex +>>>>>>> refactor/manager-index/small-refactor // These fields are written once before the WaitGroup is done // and are only read after the WaitGroup is done. @@ -78,6 +114,20 @@ type call[V any] struct { // not written after the WaitGroup is done. dups uint64 chans []chan<- Result[V] +<<<<<<< HEAD +======= + + chmu sync.RWMutex +} + +func (c *call[V]) appendChans(chs ...chan<- Result[V]) { + c.chmu.Lock() + defer c.chmu.Unlock() + if len(c.chans) == 0 { + c.chans = make([]chan<- Result[V], 0, len(chs)) + } + c.chans = append(c.chans, chs...) +>>>>>>> refactor/manager-index/small-refactor } // Group represents interface for zero time cache. @@ -90,8 +140,12 @@ type Group[V any] interface { // group represents a class of work and forms a namespace in // which units of work can be executed with duplicate suppression. type group[V any] struct { +<<<<<<< HEAD mu sync.Mutex // protects m m map[string]*call[V] // lazily initialized +======= + m sync.Map[string, *call[V]] +>>>>>>> refactor/manager-index/small-refactor } // Result holds the results of Do, so they can be passed @@ -113,6 +167,7 @@ func New[V any]() Group[V] { // original to complete and receives the same results. // The return value shared indicates whether v was given to multiple callers. func (g *group[V]) Do(ctx context.Context, key string, fn func(context.Context) (V, error)) (v V, shared bool, err error) { +<<<<<<< HEAD g.mu.Lock() if g.m == nil { g.m = make(map[string]*call[V]) @@ -135,6 +190,19 @@ func (g *group[V]) Do(ctx context.Context, key string, fn func(context.Context) g.mu.Unlock() g.doCall(ctx, c, key, fn) +======= + c, loaded := g.m.LoadOrStore(key, new(call[V])) + if loaded { + atomic.AddUint64(&c.dups, 1) + c.mu.Lock() + c.mu.Unlock() + v, err = c.val, c.err + return v, true, err + } + c.mu.Lock() + g.doCall(ctx, c, key, fn) + c.mu.Unlock() +>>>>>>> refactor/manager-index/small-refactor return c.val, atomic.LoadUint64(&c.dups) > 0, c.err } @@ -143,6 +211,7 @@ func (g *group[V]) Do(ctx context.Context, key string, fn func(context.Context) // // The returned channel will not be closed. func (g *group[V]) DoChan(ctx context.Context, key string, fn func(context.Context) (V, error)) <-chan Result[V] { +<<<<<<< HEAD ch := make(chan Result[V]) g.mu.Lock() if g.m == nil { @@ -159,6 +228,15 @@ func (g *group[V]) DoChan(ctx context.Context, key string, fn func(context.Conte g.m[key] = c g.mu.Unlock() +======= + c, loaded := g.m.LoadOrStore(key, new(call[V])) + ch := make(chan Result[V], 1) + c.appendChans(ch) + if loaded { + atomic.AddUint64(&c.dups, 1) + return ch + } +>>>>>>> refactor/manager-index/small-refactor go g.doCall(ctx, c, key, fn) return ch @@ -170,13 +248,20 @@ func (g *group[V]) doCall(ctx context.Context, c *call[V], key string, fn func(c recovered := false // use double-defer to distinguish panic from runtime.Goexit, +<<<<<<< HEAD // more details see https://golang.org/cl/134395 . defer func() { // the given function invoked runtime.Goexit. +======= + // more details see https://golang.org/cl/134395 + defer func() { + // the given function invoked runtime.Goexit +>>>>>>> refactor/manager-index/small-refactor if !normalReturn && !recovered { c.err = errGoexit } +<<<<<<< HEAD g.mu.Lock() defer g.mu.Unlock() c.wg.Done() @@ -187,6 +272,14 @@ func (g *group[V]) doCall(ctx context.Context, c *call[V], key string, fn func(c if e, ok := c.err.(*panicError); ok { // In order to prevent the waiting channels from being blocked forever, // needs to ensure that this panic cannot be recovered. +======= + g.m.LoadAndDelete(key) + if e, ok := c.err.(*panicError); ok { + // In order to prevent the waiting channels from being blocked forever, + // needs to ensure that this panic cannot be recovered. + c.chmu.RLock() + defer c.chmu.RUnlock() +>>>>>>> refactor/manager-index/small-refactor if len(c.chans) > 0 { go panic(e) select {} // Keep this goroutine around so that it will appear in the crash dump. @@ -194,9 +287,17 @@ func (g *group[V]) doCall(ctx context.Context, c *call[V], key string, fn func(c panic(e) } } else if c.err == errGoexit { +<<<<<<< HEAD // Already in the process of goexit, no need to call again. } else { // Normal return. +======= + // Already in the process of goexit, no need to call again + } else { + // Normal return + c.chmu.RLock() + defer c.chmu.RUnlock() +>>>>>>> refactor/manager-index/small-refactor for _, ch := range c.chans { select { case <-ctx.Done(): @@ -240,7 +341,11 @@ func (g *group[V]) doCall(ctx context.Context, c *call[V], key string, fn func(c // to Do for this key will call the function rather than waiting for // an earlier call to complete. func (g *group[V]) Forget(key string) { +<<<<<<< HEAD g.mu.Lock() delete(g.m, key) g.mu.Unlock() +======= + g.m.LoadAndDelete(key) +>>>>>>> refactor/manager-index/small-refactor } diff --git a/internal/sync/singleflight/singleflight_test.go b/internal/sync/singleflight/singleflight_test.go index 21407022420..7cf50efcb72 100644 --- a/internal/sync/singleflight/singleflight_test.go +++ b/internal/sync/singleflight/singleflight_test.go @@ -25,13 +25,20 @@ import ( "os/exec" "reflect" "runtime" +<<<<<<< HEAD +======= + "runtime/debug" +>>>>>>> refactor/manager-index/small-refactor "strings" "sync/atomic" "testing" "time" "github.com/vdaas/vald/internal/errors" +<<<<<<< HEAD "github.com/vdaas/vald/internal/info" +======= +>>>>>>> refactor/manager-index/small-refactor "github.com/vdaas/vald/internal/sync" "github.com/vdaas/vald/internal/test/goleak" ) @@ -328,7 +335,11 @@ func TestDoDupSuppress(t *testing.T) { var wg1, wg2 sync.WaitGroup c := make(chan string, 1) var calls int32 +<<<<<<< HEAD fn := func(context.Context) (string, error) { +======= + fn := func(ctx context.Context) (string, error) { +>>>>>>> refactor/manager-index/small-refactor if atomic.AddInt32(&calls, 1) == 1 { // First invocation. wg1.Done() @@ -447,7 +458,11 @@ func TestPanicDo(t *testing.T) { go func() { defer func() { if err := recover(); err != nil { +<<<<<<< HEAD t.Logf("Got panic: %v\n%s", err, info.Get().String()) +======= + t.Logf("Got panic: %v\n%s", err, debug.Stack()) +>>>>>>> refactor/manager-index/small-refactor atomic.AddInt32(&panicCount, 1) } @@ -502,11 +517,18 @@ func TestGoexitDo(t *testing.T) { } } +<<<<<<< HEAD func executable(tb testing.TB) string { tb.Helper() exe, err := os.Executable() if err != nil { tb.Skipf("skipping: test executable not found") +======= +func executable(t testing.TB) string { + exe, err := os.Executable() + if err != nil { + t.Skipf("skipping: test executable not found") +>>>>>>> refactor/manager-index/small-refactor } // Control case: check whether exec.Command works at all. @@ -514,7 +536,11 @@ func executable(tb testing.TB) string { cmd := exec.Command(exe, "-test.list=^$") cmd.Env = []string{} if err := cmd.Run(); err != nil { +<<<<<<< HEAD tb.Skipf("skipping: exec appears not to work on %s: %v", runtime.GOOS, err) +======= + t.Skipf("skipping: exec appears not to work on %s: %v", runtime.GOOS, err) +>>>>>>> refactor/manager-index/small-refactor } return exe @@ -628,7 +654,11 @@ func ExampleGroup() { // Results are shared by functions executed with duplicate keys. fmt.Println("Shared:", res2.Shared) // Only the first function is executed: it is registered and started with "key", +<<<<<<< HEAD // and doesn't complete before the second function is registered with a duplicate key. +======= + // and doesn't complete before the second funtion is registered with a duplicate key. +>>>>>>> refactor/manager-index/small-refactor fmt.Println("Equal results:", res1.Val == res2.Val) fmt.Println("Result:", res1.Val) diff --git a/pkg/agent/core/ngt/handler/grpc/search.go b/pkg/agent/core/ngt/handler/grpc/search.go index f02d8f1d3ef..024968fbf4e 100644 --- a/pkg/agent/core/ngt/handler/grpc/search.go +++ b/pkg/agent/core/ngt/handler/grpc/search.go @@ -30,6 +30,10 @@ import ( "github.com/vdaas/vald/internal/safety" "github.com/vdaas/vald/internal/strings" "github.com/vdaas/vald/internal/sync" +<<<<<<< HEAD +======= + "github.com/vdaas/vald/pkg/agent/core/ngt/model" +>>>>>>> refactor/manager-index/small-refactor "go.opentelemetry.io/otel/attribute" ) diff --git a/pkg/agent/core/ngt/service/ngt.go b/pkg/agent/core/ngt/service/ngt.go index 69383a254e7..812e6e75c5a 100644 --- a/pkg/agent/core/ngt/service/ngt.go +++ b/pkg/agent/core/ngt/service/ngt.go @@ -43,6 +43,10 @@ import ( "github.com/vdaas/vald/internal/strings" "github.com/vdaas/vald/internal/sync" "github.com/vdaas/vald/internal/sync/errgroup" +<<<<<<< HEAD +======= + "github.com/vdaas/vald/pkg/agent/core/ngt/model" +>>>>>>> refactor/manager-index/small-refactor "github.com/vdaas/vald/pkg/agent/core/ngt/service/kvs" "github.com/vdaas/vald/pkg/agent/core/ngt/service/vqueue" "github.com/vdaas/vald/pkg/agent/internal/metadata" diff --git a/pkg/manager/index/handler/grpc/handler.go b/pkg/manager/index/handler/grpc/handler.go index a58fd80fdfe..fbddf3f6914 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 4fc33375179..f85fbe68d42 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 ca6eb8440ba..cc391372296 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,30 @@ type index struct { creationPoolSize uint32 indexDuration time.Duration indexDurationLimit time.Duration + saveIndexDuration time.Duration saveIndexDurationLimit time.Duration +<<<<<<< HEAD saveIndexWaitDuration time.Duration saveIndexTargetAddrCh chan string schMap sync.Map[string, any] concurrency int indexInfos sync.Map[string, *payload.Info_Index_Count] indexing atomic.Value // bool +======= + shouldSaveList sync.Map[string, struct{}] + createIndexConcurrency int + saveIndexConcurrency int + indexInfos sync.Map[string, *payload.Info_Index_Count] + indexing atomic.Bool + saving atomic.Bool +>>>>>>> refactor/manager-index/small-refactor 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 +85,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 +102,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 +110,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 +214,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 +225,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 +347,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 +361,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 a5847b45e53..ff644fbe21e 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 d10f86dbfed..7c95b7d37b2 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 9619bddec19..97c5c39ffa4 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/versions/GOLANGCILINT_VERSION b/versions/GOLANGCILINT_VERSION index 22e84701bc1..2a69be76170 100644 --- a/versions/GOLANGCILINT_VERSION +++ b/versions/GOLANGCILINT_VERSION @@ -1 +1,5 @@ +<<<<<<< HEAD v1.54.2 +======= +v1.54.1 +>>>>>>> refactor/manager-index/small-refactor diff --git a/versions/KUBECTL_VERSION b/versions/KUBECTL_VERSION index c615248205a..3ad472cd94e 100644 --- a/versions/KUBECTL_VERSION +++ b/versions/KUBECTL_VERSION @@ -1 +1,5 @@ -v1.28.1 \ No newline at end of file +<<<<<<< HEAD +v1.28.1 +======= +v1.27.4 +>>>>>>> refactor/manager-index/small-refactor diff --git a/versions/NGT_VERSION b/versions/NGT_VERSION index eca07e4c1a8..faf2650af16 100644 --- a/versions/NGT_VERSION +++ b/versions/NGT_VERSION @@ -1 +1,5 @@ +<<<<<<< HEAD 2.1.2 +======= +2.1.1 +>>>>>>> refactor/manager-index/small-refactor diff --git a/versions/PROMETHEUS_STACK_VERSION b/versions/PROMETHEUS_STACK_VERSION index d751f0b0c4f..519d7351618 100644 --- a/versions/PROMETHEUS_STACK_VERSION +++ b/versions/PROMETHEUS_STACK_VERSION @@ -1 +1,5 @@ +<<<<<<< HEAD 49.2.0 +======= +48.3.1 +>>>>>>> refactor/manager-index/small-refactor diff --git a/versions/PROTOBUF_VERSION b/versions/PROTOBUF_VERSION index 9dc0ade5023..163d05dea86 100644 --- a/versions/PROTOBUF_VERSION +++ b/versions/PROTOBUF_VERSION @@ -1 +1,5 @@ +<<<<<<< HEAD 24.2 +======= +24.0 +>>>>>>> refactor/manager-index/small-refactor diff --git a/versions/TELEPRESENCE_VERSION b/versions/TELEPRESENCE_VERSION index 68e69e405ee..34f1200cb57 100644 --- a/versions/TELEPRESENCE_VERSION +++ b/versions/TELEPRESENCE_VERSION @@ -1 +1,5 @@ +<<<<<<< HEAD 2.15.0 +======= +2.15.0-rc.1 +>>>>>>> refactor/manager-index/small-refactor