diff --git a/CHANGELOG.md b/CHANGELOG.md
index 25a6a697d59..c2894fcc056 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4750,7 +4750,7 @@
- :white_check_mark: add internal/config/ngt test ([#554](https://github.com/vdaas/vald/pull/554))
- :white_check_mark: internal/cache/cacher test ([#553](https://github.com/vdaas/vald/pull/553))
- :white_check_mark: Add test case for `internal/file` ([#550](https://github.com/vdaas/vald/pull/550))
-- :white_check_mark: add internal/singleflight test ([#542](https://github.com/vdaas/vald/pull/542))
+- :white_check_mark: add internal/sync/singleflight test ([#542](https://github.com/vdaas/vald/pull/542))
- not to force rebuild gotests ([#548](https://github.com/vdaas/vald/pull/548))
- :pencil: Add use case document ([#482](https://github.com/vdaas/vald/pull/482))
- :white_check_mark: add internal/log/mock/retry test ([#549](https://github.com/vdaas/vald/pull/549))
@@ -5272,7 +5272,7 @@
- internal gRPC client for Vald
- Cassandra NewConvictionPolicy
- dicoverer now returns clone object
-- new internal/singleflight package
+- new internal/sync/singleflight package
- new internal/net package
- coding guideline
diff --git a/Makefile b/Makefile
index ec122ea034c..6e799374ea2 100644
--- a/Makefile
+++ b/Makefile
@@ -361,7 +361,7 @@ clean:
license:
GOPRIVATE=$(GOPRIVATE) \
MAINTAINER=$(MAINTAINER) \
- go run -mod=readonly hack/license/gen/main.go ./
+ go run -mod=readonly hack/license/gen/main.go $(ROOTDIR)
.PHONY: init
## initialize development environment
diff --git a/Makefile.d/test.mk b/Makefile.d/test.mk
index b85e6401dd0..f591103b6ad 100644
--- a/Makefile.d/test.mk
+++ b/Makefile.d/test.mk
@@ -284,7 +284,7 @@ gotests/patch:
@$(call green, "apply patches to go test files...")
find $(ROOTDIR)/internal/k8s/* -name '*_test.go' | xargs sed -i -E "s%k8s.io/apimachinery/pkg/api/errors%github.com/vdaas/vald/internal/errors%g"
find $(ROOTDIR)/* -name '*_test.go' | xargs sed -i -E "s%cockroachdb/errors%vdaas/vald/internal/errors%g"
- find $(ROOTDIR)/* -name '*_test.go' | xargs sed -i -E "s%golang.org/x/sync/errgroup%github.com/vdaas/vald/internal/errgroup%g"
+ find $(ROOTDIR)/* -name '*_test.go' | xargs sed -i -E "s%golang.org/x/sync/errgroup%github.com/vdaas/vald/internal/sync/errgroup%g"
find $(ROOTDIR)/* -name '*_test.go' | xargs sed -i -E "s%pkg/errors%vdaas/vald/internal/errors%g"
find $(ROOTDIR)/* -name '*_test.go' | xargs sed -i -E "s%go-errors/errors%vdaas/vald/internal/errors%g"
find $(ROOTDIR)/* -name '*_test.go' | xargs sed -i -E "s%go.uber.org/goleak%github.com/vdaas/vald/internal/test/goleak%g"
diff --git a/apis/docs/v1/docs.md b/apis/docs/v1/docs.md
index f8714aee2bc..be27980c93c 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)
@@ -87,7 +89,6 @@
- [Upsert.MultiRequest](#payload-v1-Upsert-MultiRequest)
- [Upsert.ObjectRequest](#payload-v1-Upsert-ObjectRequest)
- [Upsert.Request](#payload-v1-Upsert-Request)
-
- [Search.AggregationAlgorithm](#payload-v1-Search-AggregationAlgorithm)
- [apis/proto/v1/vald/filter.proto](#apis_proto_v1_vald_filter-proto)
@@ -203,9 +204,10 @@ Represent the ingress filter service.
Represent the index manager service.
-| Method Name | Request Type | Response Type | Description |
-| ----------- | -------------------------------------- | ------------------------------------------------------------ | ----------------------------------------------- |
-| IndexInfo | [.payload.v1.Empty](#payload-v1-Empty) | [.payload.v1.Info.Index.Count](#payload-v1-Info-Index-Count) | Represent the RPC to get the index information. |
+| Method Name | Request Type | Response Type | Description |
+| ----------- | -------------------------------------- | -------------------------------------------------------------- | --------------------------------------------------------------- |
+| IndexInfo | [.payload.v1.Empty](#payload-v1-Empty) | [.payload.v1.Info.Index.Count](#payload-v1-Info-Index-Count) | Represent the RPC to get the index information. |
+| IndexDetail | [.payload.v1.Empty](#payload-v1-Empty) | [.payload.v1.Info.Index.Detail](#payload-v1-Info-Index-Detail) | Represent the RPC to get the index information for each agents. |
@@ -327,6 +329,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
diff --git a/apis/grpc/v1/agent/core/agent.pb.go b/apis/grpc/v1/agent/core/agent.pb.go
index b341a5865c4..02c1126c37a 100644
--- a/apis/grpc/v1/agent/core/agent.pb.go
+++ b/apis/grpc/v1/agent/core/agent.pb.go
@@ -16,8 +16,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.30.0
-// protoc v4.23.3
+// protoc-gen-go v1.31.0
+// protoc v4.23.4
// 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 84d27605e9f..a602b133ee9 100644
--- a/apis/grpc/v1/agent/sidecar/sidecar.pb.go
+++ b/apis/grpc/v1/agent/sidecar/sidecar.pb.go
@@ -16,8 +16,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.30.0
-// protoc v4.23.3
+// protoc-gen-go v1.31.0
+// protoc v4.23.4
// 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 5f91b388f6f..168c8ae6136 100644
--- a/apis/grpc/v1/discoverer/discoverer.pb.go
+++ b/apis/grpc/v1/discoverer/discoverer.pb.go
@@ -16,8 +16,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.30.0
-// protoc v4.23.3
+// protoc-gen-go v1.31.0
+// protoc v4.23.4
// 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 8c7c83a62ac..4d45b5d5da9 100644
--- a/apis/grpc/v1/filter/egress/egress_filter.pb.go
+++ b/apis/grpc/v1/filter/egress/egress_filter.pb.go
@@ -16,8 +16,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.30.0
-// protoc v4.23.3
+// protoc-gen-go v1.31.0
+// protoc v4.23.4
// 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 45d72f20543..9211486344f 100644
--- a/apis/grpc/v1/filter/ingress/ingress_filter.pb.go
+++ b/apis/grpc/v1/filter/ingress/ingress_filter.pb.go
@@ -16,8 +16,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.30.0
-// protoc v4.23.3
+// protoc-gen-go v1.31.0
+// protoc v4.23.4
// 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 64cf7cd3614..5fe1b02b33a 100644
--- a/apis/grpc/v1/manager/index/index_manager.pb.go
+++ b/apis/grpc/v1/manager/index/index_manager.pb.go
@@ -16,8 +16,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.30.0
-// protoc v4.23.3
+// protoc-gen-go v1.31.0
+// protoc v4.23.4
// source: apis/proto/v1/manager/index/index_manager.proto
package index
@@ -51,31 +51,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 56914a35b98..b0d1b2dd506 100644
--- a/apis/grpc/v1/payload/payload.pb.go
+++ b/apis/grpc/v1/payload/payload.pb.go
@@ -16,8 +16,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.30.0
-// protoc v4.23.3
+// protoc-gen-go v1.31.0
+// protoc v4.23.4
// source: apis/proto/v1/payload/payload.proto
package payload
@@ -3921,6 +3921,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[66]
+ 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[66]
+ 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
@@ -3931,7 +3980,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[66]
+ mi := &file_apis_proto_v1_payload_payload_proto_msgTypes[67]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3944,7 +3993,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[66]
+ mi := &file_apis_proto_v1_payload_payload_proto_msgTypes[67]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3957,7 +4006,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.
@@ -3972,7 +4021,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[67]
+ mi := &file_apis_proto_v1_payload_payload_proto_msgTypes[69]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3985,7 +4034,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[67]
+ 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 {
@@ -3998,7 +4047,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 {
@@ -4020,7 +4069,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[68]
+ mi := &file_apis_proto_v1_payload_payload_proto_msgTypes[70]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4033,7 +4082,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[68]
+ 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 {
@@ -4046,7 +4095,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 {
@@ -4387,8 +4436,8 @@ var file_apis_proto_v1_payload_payload_proto_rawDesc = []byte{
0x6e, 0x61, 0x6d, 0x65, 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, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x75, 0x0a, 0x05, 0x43, 0x6f, 0x75,
+ 0x52, 0x04, 0x6e, 0x6f, 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, 0x69, 0x74, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52,
@@ -4396,67 +4445,77 @@ var file_apis_proto_v1_payload_payload_proto_rawDesc = []byte{
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,
+ 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,
+ 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,
}
var (
@@ -4472,7 +4531,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, 69)
+var file_apis_proto_v1_payload_payload_proto_msgTypes = make([]protoimpl.MessageInfo, 71)
var file_apis_proto_v1_payload_payload_proto_goTypes = []interface{}{
(Search_AggregationAlgorithm)(0), // 0: payload.v1.Search.AggregationAlgorithm
(*Search)(nil), // 1: payload.v1.Search
@@ -4541,10 +4600,12 @@ var file_apis_proto_v1_payload_payload_proto_goTypes = []interface{}{
(*Info_Nodes)(nil), // 64: payload.v1.Info.Nodes
(*Info_IPs)(nil), // 65: payload.v1.Info.IPs
(*Info_Index_Count)(nil), // 66: payload.v1.Info.Index.Count
- (*Info_Index_UUID)(nil), // 67: payload.v1.Info.Index.UUID
- (*Info_Index_UUID_Committed)(nil), // 68: payload.v1.Info.Index.UUID.Committed
- (*Info_Index_UUID_Uncommitted)(nil), // 69: payload.v1.Info.Index.UUID.Uncommitted
- (*status.Status)(nil), // 70: google.rpc.Status
+ (*Info_Index_Detail)(nil), // 67: payload.v1.Info.Index.Detail
+ (*Info_Index_UUID)(nil), // 68: payload.v1.Info.Index.UUID
+ nil, // 69: payload.v1.Info.Index.Detail.CountsEntry
+ (*Info_Index_UUID_Committed)(nil), // 70: payload.v1.Info.Index.UUID.Committed
+ (*Info_Index_UUID_Uncommitted)(nil), // 71: payload.v1.Info.Index.UUID.Uncommitted
+ (*status.Status)(nil), // 72: 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
@@ -4560,7 +4621,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
- 70, // 13: payload.v1.Search.StreamResponse.status:type_name -> google.rpc.Status
+ 72, // 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
@@ -4592,14 +4653,14 @@ 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
- 70, // 45: payload.v1.Object.StreamDistance.status:type_name -> google.rpc.Status
+ 72, // 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
- 70, // 48: payload.v1.Object.StreamVector.status:type_name -> google.rpc.Status
+ 72, // 48: payload.v1.Object.StreamVector.status:type_name -> google.rpc.Status
51, // 49: payload.v1.Object.StreamBlob.blob:type_name -> payload.v1.Object.Blob
- 70, // 50: payload.v1.Object.StreamBlob.status:type_name -> google.rpc.Status
+ 72, // 50: payload.v1.Object.StreamBlob.status:type_name -> google.rpc.Status
53, // 51: payload.v1.Object.StreamLocation.location:type_name -> payload.v1.Object.Location
- 70, // 52: payload.v1.Object.StreamLocation.status:type_name -> google.rpc.Status
+ 72, // 52: payload.v1.Object.StreamLocation.status:type_name -> google.rpc.Status
53, // 53: payload.v1.Object.Locations.locations:type_name -> payload.v1.Object.Location
61, // 54: payload.v1.Info.Pod.cpu:type_name -> payload.v1.Info.CPU
62, // 55: payload.v1.Info.Pod.memory:type_name -> payload.v1.Info.Memory
@@ -4609,11 +4670,13 @@ var file_apis_proto_v1_payload_payload_proto_depIdxs = []int32{
63, // 59: payload.v1.Info.Node.Pods:type_name -> payload.v1.Info.Pods
59, // 60: payload.v1.Info.Pods.pods:type_name -> payload.v1.Info.Pod
60, // 61: payload.v1.Info.Nodes.nodes:type_name -> payload.v1.Info.Node
- 62, // [62:62] is the sub-list for method output_type
- 62, // [62:62] is the sub-list for method input_type
- 62, // [62:62] is the sub-list for extension type_name
- 62, // [62:62] is the sub-list for extension extendee
- 0, // [0:62] is the sub-list for field type_name
+ 69, // 62: payload.v1.Info.Index.Detail.counts:type_name -> payload.v1.Info.Index.Detail.CountsEntry
+ 66, // 63: payload.v1.Info.Index.Detail.CountsEntry.value:type_name -> payload.v1.Info.Index.Count
+ 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
}
func init() { file_apis_proto_v1_payload_payload_proto_init() }
@@ -5415,7 +5478,7 @@ func file_apis_proto_v1_payload_payload_proto_init() {
}
}
file_apis_proto_v1_payload_payload_proto_msgTypes[66].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:
@@ -5427,6 +5490,18 @@ func file_apis_proto_v1_payload_payload_proto_init() {
}
}
file_apis_proto_v1_payload_payload_proto_msgTypes[67].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[69].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Info_Index_UUID_Committed); i {
case 0:
return &v.state
@@ -5438,7 +5513,7 @@ func file_apis_proto_v1_payload_payload_proto_init() {
return nil
}
}
- file_apis_proto_v1_payload_payload_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} {
+ file_apis_proto_v1_payload_payload_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Info_Index_UUID_Uncommitted); i {
case 0:
return &v.state
@@ -5477,7 +5552,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: 69,
+ NumMessages: 71,
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 b7ed81cd2a0..68f88099719 100644
--- a/apis/grpc/v1/payload/payload_vtproto.pb.go
+++ b/apis/grpc/v1/payload/payload_vtproto.pb.go
@@ -1316,6 +1316,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)
@@ -3297,6 +3320,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
@@ -6543,6 +6602,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
@@ -8260,6 +8374,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
@@ -14543,6 +14680,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 44ccefb4a65..b08d19dcbfe 100644
--- a/apis/grpc/v1/vald/filter.pb.go
+++ b/apis/grpc/v1/vald/filter.pb.go
@@ -16,8 +16,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.30.0
-// protoc v4.23.3
+// protoc-gen-go v1.31.0
+// protoc v4.23.4
// 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 8be1c36c9ee..96e84b2e5e3 100644
--- a/apis/grpc/v1/vald/insert.pb.go
+++ b/apis/grpc/v1/vald/insert.pb.go
@@ -16,8 +16,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.30.0
-// protoc v4.23.3
+// protoc-gen-go v1.31.0
+// protoc v4.23.4
// 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 a541a07affd..d7c79d6c5a6 100644
--- a/apis/grpc/v1/vald/object.pb.go
+++ b/apis/grpc/v1/vald/object.pb.go
@@ -16,8 +16,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.30.0
-// protoc v4.23.3
+// protoc-gen-go v1.31.0
+// protoc v4.23.4
// 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 736b44ce555..cf8ba0ca735 100644
--- a/apis/grpc/v1/vald/remove.pb.go
+++ b/apis/grpc/v1/vald/remove.pb.go
@@ -16,8 +16,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.30.0
-// protoc v4.23.3
+// protoc-gen-go v1.31.0
+// protoc v4.23.4
// 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 150f37b537f..5f32ea623e9 100644
--- a/apis/grpc/v1/vald/search.pb.go
+++ b/apis/grpc/v1/vald/search.pb.go
@@ -16,8 +16,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.30.0
-// protoc v4.23.3
+// protoc-gen-go v1.31.0
+// protoc v4.23.4
// 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 53e89c5e2b0..6db85bb7317 100644
--- a/apis/grpc/v1/vald/update.pb.go
+++ b/apis/grpc/v1/vald/update.pb.go
@@ -16,8 +16,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.30.0
-// protoc v4.23.3
+// protoc-gen-go v1.31.0
+// protoc v4.23.4
// 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 f111ded0dbb..491fc403128 100644
--- a/apis/grpc/v1/vald/upsert.pb.go
+++ b/apis/grpc/v1/vald/upsert.pb.go
@@ -16,8 +16,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.30.0
-// protoc v4.23.3
+// protoc-gen-go v1.31.0
+// protoc v4.23.4
// 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 d2b9bd22857..d44a04de1d5 100644
--- a/apis/proto/v1/payload/payload.proto
+++ b/apis/proto/v1/payload/payload.proto
@@ -455,6 +455,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 76548a29ca6..e3563a89aab 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/docs/contributing/coding-style.md b/docs/contributing/coding-style.md
index da6644f1c54..50a5ee693d3 100644
--- a/docs/contributing/coding-style.md
+++ b/docs/contributing/coding-style.md
@@ -385,7 +385,7 @@ if err := srv.Run(); err != nil {
All errors should define in [internal/errors package](https://github.com/vdaas/vald/blob/main/internal/errors). All errors should be start with `Err` prefix, and all errors should be handle if possible.
-Please use [internal/errgroup](https://github.com/vdaas/vald/blob/main/internal/errgroup) for synchronized error handling on multi-goroutine processing.
+Please use [internal/sync/errgroup](https://github.com/vdaas/vald/blob/main/internal/sync/errgroup) for synchronized error handling on multi-goroutine processing.
### Error checking
diff --git a/go.mod b/go.mod
index 301b9473175..01f57fe19c9 100755
--- a/go.mod
+++ b/go.mod
@@ -3,13 +3,13 @@ module github.com/vdaas/vald
go 1.20
replace (
- cloud.google.com/go => cloud.google.com/go v0.110.5
- cloud.google.com/go/bigquery => cloud.google.com/go/bigquery v1.52.0
- cloud.google.com/go/compute => cloud.google.com/go/compute v1.21.0
+ cloud.google.com/go => cloud.google.com/go v0.110.6
+ cloud.google.com/go/bigquery => cloud.google.com/go/bigquery v1.53.0
+ cloud.google.com/go/compute => cloud.google.com/go/compute v1.22.0
cloud.google.com/go/datastore => cloud.google.com/go/datastore v1.12.1
cloud.google.com/go/firestore => cloud.google.com/go/firestore v1.11.0
cloud.google.com/go/iam => cloud.google.com/go/iam v1.1.1
- cloud.google.com/go/kms => cloud.google.com/go/kms v1.13.0
+ cloud.google.com/go/kms => cloud.google.com/go/kms v1.15.0
cloud.google.com/go/monitoring => cloud.google.com/go/monitoring v1.15.1
cloud.google.com/go/pubsub => cloud.google.com/go/pubsub v1.32.0
cloud.google.com/go/secretmanager => cloud.google.com/go/secretmanager v1.11.1
@@ -22,7 +22,7 @@ replace (
git.sr.ht/~sbinet/gg => git.sr.ht/~sbinet/gg v0.5.0
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.6.1
+ github.com/Azure/azure-sdk-for-go/sdk/azcore => github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity => github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0
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
@@ -36,35 +36,35 @@ replace (
github.com/Azure/go-autorest/tracing => github.com/Azure/go-autorest/tracing v0.6.1-0.20230628134501-d3f8f8a6cdf2
github.com/BurntSushi/toml => github.com/BurntSushi/toml v1.3.2
github.com/DATA-DOG/go-sqlmock => github.com/DATA-DOG/go-sqlmock v1.5.0
- github.com/GoogleCloudPlatform/cloudsql-proxy => github.com/GoogleCloudPlatform/cloudsql-proxy v1.33.8
+ github.com/GoogleCloudPlatform/cloudsql-proxy => github.com/GoogleCloudPlatform/cloudsql-proxy v1.33.9
github.com/Masterminds/semver/v3 => github.com/Masterminds/semver/v3 v3.2.1
- github.com/ajstarks/deck => github.com/ajstarks/deck v0.0.0-20230623225713-5ca9e3628bb7
- github.com/ajstarks/deck/generate => github.com/ajstarks/deck/generate v0.0.0-20230623225713-5ca9e3628bb7
+ github.com/ajstarks/deck => github.com/ajstarks/deck v0.0.0-20230713212537-3862a8c503c2
+ github.com/ajstarks/deck/generate => github.com/ajstarks/deck/generate v0.0.0-20230713212537-3862a8c503c2
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
- github.com/aws/aws-sdk-go => github.com/aws/aws-sdk-go v1.44.299
- github.com/aws/aws-sdk-go-v2 => github.com/aws/aws-sdk-go-v2 v1.18.1
+ github.com/aws/aws-sdk-go => github.com/aws/aws-sdk-go v1.44.307
+ github.com/aws/aws-sdk-go-v2 => github.com/aws/aws-sdk-go-v2 v1.19.0
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream => github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10
- github.com/aws/aws-sdk-go-v2/config => github.com/aws/aws-sdk-go-v2/config v1.18.27
- github.com/aws/aws-sdk-go-v2/credentials => github.com/aws/aws-sdk-go-v2/credentials v1.13.26
- github.com/aws/aws-sdk-go-v2/feature/ec2/imds => github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.4
- github.com/aws/aws-sdk-go-v2/feature/s3/manager => github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.71
- github.com/aws/aws-sdk-go-v2/internal/configsources => github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.34
- github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.28
- github.com/aws/aws-sdk-go-v2/internal/ini => github.com/aws/aws-sdk-go-v2/internal/ini v1.3.35
+ github.com/aws/aws-sdk-go-v2/config => github.com/aws/aws-sdk-go-v2/config v1.18.28
+ github.com/aws/aws-sdk-go-v2/credentials => github.com/aws/aws-sdk-go-v2/credentials v1.13.27
+ github.com/aws/aws-sdk-go-v2/feature/ec2/imds => github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.5
+ github.com/aws/aws-sdk-go-v2/feature/s3/manager => github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.72
+ github.com/aws/aws-sdk-go-v2/internal/configsources => github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.35
+ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.29
+ github.com/aws/aws-sdk-go-v2/internal/ini => github.com/aws/aws-sdk-go-v2/internal/ini v1.3.36
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding => github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11
- github.com/aws/aws-sdk-go-v2/service/internal/checksum => github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.29
- github.com/aws/aws-sdk-go-v2/service/internal/presigned-url => github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.28
- github.com/aws/aws-sdk-go-v2/service/internal/s3shared => github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.3
- github.com/aws/aws-sdk-go-v2/service/kms => github.com/aws/aws-sdk-go-v2/service/kms v1.23.0
- github.com/aws/aws-sdk-go-v2/service/s3 => github.com/aws/aws-sdk-go-v2/service/s3 v1.36.0
- github.com/aws/aws-sdk-go-v2/service/secretsmanager => github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.19.10
- github.com/aws/aws-sdk-go-v2/service/sns => github.com/aws/aws-sdk-go-v2/service/sns v1.20.13
- github.com/aws/aws-sdk-go-v2/service/sqs => github.com/aws/aws-sdk-go-v2/service/sqs v1.23.2
- github.com/aws/aws-sdk-go-v2/service/ssm => github.com/aws/aws-sdk-go-v2/service/ssm v1.36.7
- github.com/aws/aws-sdk-go-v2/service/sso => github.com/aws/aws-sdk-go-v2/service/sso v1.12.12
- github.com/aws/aws-sdk-go-v2/service/sts => github.com/aws/aws-sdk-go-v2/service/sts v1.19.2
+ github.com/aws/aws-sdk-go-v2/service/internal/checksum => github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.30
+ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url => github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.29
+ github.com/aws/aws-sdk-go-v2/service/internal/s3shared => github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.4
+ github.com/aws/aws-sdk-go-v2/service/kms => github.com/aws/aws-sdk-go-v2/service/kms v1.23.1
+ github.com/aws/aws-sdk-go-v2/service/s3 => github.com/aws/aws-sdk-go-v2/service/s3 v1.37.0
+ github.com/aws/aws-sdk-go-v2/service/secretsmanager => github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.19.11
+ github.com/aws/aws-sdk-go-v2/service/sns => github.com/aws/aws-sdk-go-v2/service/sns v1.20.14
+ github.com/aws/aws-sdk-go-v2/service/sqs => github.com/aws/aws-sdk-go-v2/service/sqs v1.23.3
+ github.com/aws/aws-sdk-go-v2/service/ssm => github.com/aws/aws-sdk-go-v2/service/ssm v1.36.8
+ github.com/aws/aws-sdk-go-v2/service/sso => github.com/aws/aws-sdk-go-v2/service/sso v1.12.13
+ github.com/aws/aws-sdk-go-v2/service/sts => github.com/aws/aws-sdk-go-v2/service/sts v1.19.3
github.com/aws/smithy-go => github.com/aws/smithy-go v1.13.5
github.com/benbjohnson/clock => github.com/benbjohnson/clock v1.3.5
github.com/beorn7/perks => github.com/beorn7/perks v1.0.1
@@ -113,7 +113,7 @@ replace (
github.com/go-logr/logr => github.com/go-logr/logr v1.2.4
github.com/go-logr/stdr => github.com/go-logr/stdr v1.2.2
github.com/go-logr/zapr => github.com/go-logr/zapr v1.2.4
- github.com/go-openapi/jsonpointer => github.com/go-openapi/jsonpointer v0.19.6
+ github.com/go-openapi/jsonpointer => github.com/go-openapi/jsonpointer v0.20.0
github.com/go-openapi/jsonreference => github.com/go-openapi/jsonreference v0.20.2
github.com/go-openapi/swag => github.com/go-openapi/swag v0.22.4
github.com/go-pdf/fpdf => github.com/go-pdf/fpdf v1.4.3
@@ -132,7 +132,7 @@ replace (
github.com/gobwas/ws => github.com/gobwas/ws v1.2.1
github.com/goccy/go-json => github.com/goccy/go-json v0.10.2
github.com/gocql/gocql => github.com/gocql/gocql v1.5.2
- github.com/gocraft/dbr/v2 => github.com/gocraft/dbr/v2 v2.7.4
+ github.com/gocraft/dbr/v2 => github.com/gocraft/dbr/v2 v2.7.5
github.com/godbus/dbus/v5 => github.com/godbus/dbus/v5 v5.1.0
github.com/gofrs/uuid => github.com/gofrs/uuid v4.4.0+incompatible
github.com/gogo/protobuf => github.com/gogo/protobuf v1.3.2
@@ -167,11 +167,11 @@ replace (
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
github.com/hashicorp/go-version => github.com/hashicorp/go-version v1.6.0
- github.com/iancoleman/strcase => github.com/iancoleman/strcase v0.2.0
+ github.com/iancoleman/strcase => github.com/iancoleman/strcase v0.3.0
github.com/ianlancetaylor/demangle => github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab
github.com/inconshreveable/mousetrap => github.com/inconshreveable/mousetrap v1.1.0
github.com/jackc/chunkreader/v2 => github.com/jackc/chunkreader/v2 v2.0.1
- github.com/jackc/pgconn => github.com/jackc/pgconn v1.14.0
+ github.com/jackc/pgconn => github.com/jackc/pgconn v1.14.1
github.com/jackc/pgio => github.com/jackc/pgio v1.0.0
github.com/jackc/pgmock => github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65
github.com/jackc/pgpassfile => github.com/jackc/pgpassfile v1.0.0
@@ -190,7 +190,7 @@ 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
- github.com/klauspost/compress => github.com/klauspost/compress v1.16.8-0.20230710085017-b7fbbd3fb210
+ github.com/klauspost/compress => github.com/klauspost/compress v1.16.8-0.20230717094025-33c9bc800133
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
@@ -223,7 +223,7 @@ replace (
github.com/nxadm/tail => github.com/nxadm/tail v1.4.8
github.com/onsi/ginkgo => github.com/onsi/ginkgo v1.16.5
github.com/onsi/ginkgo/v2 => github.com/onsi/ginkgo/v2 v2.11.0
- github.com/onsi/gomega => github.com/onsi/gomega v1.27.8
+ github.com/onsi/gomega => github.com/onsi/gomega v1.27.10
github.com/peterbourgon/diskv => github.com/peterbourgon/diskv v2.0.1+incompatible
github.com/phpdave11/gofpdf => github.com/phpdave11/gofpdf v1.4.2
github.com/phpdave11/gofpdi => github.com/phpdave11/gofpdi v1.0.13
@@ -282,17 +282,17 @@ replace (
go.opentelemetry.io/otel/sdk => go.opentelemetry.io/otel/sdk v1.11.1
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 v0.20.0
- go.starlark.net => go.starlark.net v0.0.0-20230612165344-9532f5667272
+ go.opentelemetry.io/proto/otlp => go.opentelemetry.io/proto/otlp v1.0.0
+ go.starlark.net => go.starlark.net v0.0.0-20230721164632-08598ae210f9
go.uber.org/atomic => go.uber.org/atomic v1.11.0
- go.uber.org/automaxprocs => go.uber.org/automaxprocs v1.5.2
+ 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.24.0
- gocloud.dev => gocloud.dev v0.30.0
+ gocloud.dev => gocloud.dev v0.32.0
golang.org/x/crypto => golang.org/x/crypto v0.11.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-20230711153332-06a737ee72cb
+ golang.org/x/exp => golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1
+ golang.org/x/exp/typeparams => golang.org/x/exp/typeparams v0.0.0-20230713183714-613f0c0eb8a1
golang.org/x/image => golang.org/x/image v0.9.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-20230531173138-3c911d8e3eda
@@ -310,11 +310,11 @@ replace (
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.130.0
+ google.golang.org/api => google.golang.org/api v0.133.0
google.golang.org/appengine => google.golang.org/appengine v1.6.7
- google.golang.org/genproto => google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98
- google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98
- google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98
+ google.golang.org/genproto => google.golang.org/genproto v0.0.0-20230724170836-66ad5b6ff146
+ google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20230724170836-66ad5b6ff146
+ google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20230724170836-66ad5b6ff146
google.golang.org/grpc => google.golang.org/grpc v1.56.2
google.golang.org/grpc/cmd/protoc-gen-go-grpc => google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0
google.golang.org/protobuf => google.golang.org/protobuf v1.31.0
@@ -340,14 +340,14 @@ replace (
sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.15.0
sigs.k8s.io/json => sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd
sigs.k8s.io/kustomize => sigs.k8s.io/kustomize v2.0.3+incompatible
- sigs.k8s.io/structured-merge-diff/v4 => sigs.k8s.io/structured-merge-diff/v4 v4.2.3
+ sigs.k8s.io/structured-merge-diff/v4 => sigs.k8s.io/structured-merge-diff/v4 v4.3.0
sigs.k8s.io/yaml => sigs.k8s.io/yaml v1.3.0
)
require (
- cloud.google.com/go/storage v1.30.1
+ cloud.google.com/go/storage v1.31.0
code.cloudfoundry.org/bytefmt v0.0.0-20190710193110-1eb035ffe2b6
- github.com/aws/aws-sdk-go v1.44.284
+ github.com/aws/aws-sdk-go v1.44.303
github.com/envoyproxy/protoc-gen-validate v1.0.1
github.com/fsnotify/fsnotify v1.6.0
github.com/go-redis/redis/v8 v8.0.0-00010101000000-000000000000
@@ -386,15 +386,15 @@ require (
gocloud.dev v0.0.0-00010101000000-000000000000
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea
golang.org/x/net v0.12.0
- golang.org/x/oauth2 v0.9.0
+ golang.org/x/oauth2 v0.10.0
golang.org/x/sync v0.3.0
golang.org/x/sys v0.10.0
golang.org/x/text v0.11.0
golang.org/x/tools v0.10.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-20230706204954-ccb25ca9f130
- google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130
+ google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753
+ google.golang.org/genproto/googleapis/rpc v0.0.0-20230720185612-659f7aaaa771
google.golang.org/grpc v1.56.2
google.golang.org/protobuf v1.31.0
gopkg.in/yaml.v2 v2.4.0
@@ -407,8 +407,8 @@ require (
)
require (
- cloud.google.com/go v0.110.4 // indirect
- cloud.google.com/go/compute v1.20.1 // indirect
+ cloud.google.com/go v0.110.6 // indirect
+ cloud.google.com/go/compute v1.22.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.1 // indirect
git.sr.ht/~sbinet/gg v0.4.1 // indirect
@@ -431,11 +431,12 @@ require (
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.1 // indirect
- github.com/go-openapi/swag v0.22.3 // indirect
+ github.com/go-openapi/swag v0.22.4 // indirect
github.com/go-pdf/fpdf v0.8.0 // indirect
github.com/go-toolsmith/astcopy v1.0.2 // indirect
github.com/go-toolsmith/astequal v1.1.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
+ github.com/golang-sql/sqlexp v0.0.0-00010101000000-000000000000 // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
@@ -447,7 +448,7 @@ require (
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/wire v0.5.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect
- github.com/googleapis/gax-go/v2 v2.11.0 // indirect
+ github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect
@@ -457,7 +458,7 @@ require (
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
- github.com/klauspost/cpuid/v2 v2.2.4 // indirect
+ github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
@@ -494,9 +495,9 @@ require (
golang.org/x/time v0.3.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect
- google.golang.org/api v0.128.0 // indirect
+ google.golang.org/api v0.132.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
- google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect
+ google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 // indirect
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 e5a83f949d9..4c4d808c78c 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,5 @@
-cloud.google.com/go v0.110.5 h1:9z8Gn5rlVah5I+vyxARz5bCMuQGIGqJBSNq1mwHQhMk=
-cloud.google.com/go v0.110.5/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI=
+cloud.google.com/go v0.110.6 h1:8uYAkj3YHTP/1iwReuHPxLSbdcyc+dSBbzFMrVwDR6Q=
+cloud.google.com/go v0.110.6/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI=
cloud.google.com/go/accessapproval v1.7.1/go.mod h1:JYczztsHRMK7NTXb6Xw+dwbs/WnOJxbo/2mTI+Kgg68=
cloud.google.com/go/accesscontextmanager v1.8.0/go.mod h1:uI+AI/r1oyWK99NN8cQ3UK76AMelMzgZCvJfsi2c+ps=
cloud.google.com/go/accesscontextmanager v1.8.1/go.mod h1:JFJHfvuaTC+++1iL1coPiG1eu5D24db2wXCDWDjIrxo=
@@ -14,10 +14,10 @@ cloud.google.com/go/artifactregistry v1.14.1/go.mod h1:nxVdG19jTaSTu7yA7+VbWL346
cloud.google.com/go/asset v1.14.1/go.mod h1:4bEJ3dnHCqWCDbWJ/6Vn7GVI9LerSi7Rfdi03hd+WTQ=
cloud.google.com/go/assuredworkloads v1.11.1/go.mod h1:+F04I52Pgn5nmPG36CWFtxmav6+7Q+c5QyJoL18Lry0=
cloud.google.com/go/automl v1.13.1/go.mod h1:1aowgAHWYZU27MybSCFiukPO7xnyawv7pt3zK4bheQE=
-cloud.google.com/go/baremetalsolution v0.5.0/go.mod h1:dXGxEkmR9BMwxhzBhV0AioD0ULBmuLZI8CdwalUxuss=
-cloud.google.com/go/batch v0.7.0/go.mod h1:vLZN95s6teRUqRQ4s3RLDsH8PvboqBK+rn1oevL159g=
-cloud.google.com/go/beyondcorp v0.6.1/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4=
-cloud.google.com/go/bigquery v1.52.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4=
+cloud.google.com/go/baremetalsolution v1.1.1/go.mod h1:D1AV6xwOksJMV4OSlWHtWuFNZZYujJknMAP4Qa27QIA=
+cloud.google.com/go/batch v1.3.1/go.mod h1:VguXeQKXIYaeeIYbuozUmBR13AfL4SJP7IltNPS+A4A=
+cloud.google.com/go/beyondcorp v1.0.0/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4=
+cloud.google.com/go/bigquery v1.53.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4=
cloud.google.com/go/billing v1.16.0/go.mod h1:y8vx09JSSJG02k5QxbycNRrN7FGZB6F3CAcgum7jvGA=
cloud.google.com/go/binaryauthorization v1.6.1/go.mod h1:TKt4pa8xhowwffiBmbrbcxijJRZED4zrqnwZ1lKH51U=
cloud.google.com/go/certificatemanager v1.7.1/go.mod h1:iW8J3nG6SaRYImIa+wXQ0g8IgoofDFRp5UMzaNk1UqI=
@@ -25,8 +25,8 @@ cloud.google.com/go/channel v1.16.0/go.mod h1:eN/q1PFSl5gyu0dYdmxNXscY/4Fi7ABmeH
cloud.google.com/go/cloudbuild v1.10.1/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU=
cloud.google.com/go/clouddms v1.6.1/go.mod h1:Ygo1vL52Ov4TBZQquhz5fiw2CQ58gvu+PlS6PVXCpZI=
cloud.google.com/go/cloudtasks v1.11.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM=
-cloud.google.com/go/compute v1.21.0 h1:JNBsyXVoOoNJtTQcnEY5uYpZIbeCTYIeDe0Xh1bySMk=
-cloud.google.com/go/compute v1.21.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM=
+cloud.google.com/go/compute v1.22.0 h1:cB8R6FtUtT1TYGl5R3xuxnW6OUIc/DrT2aiR16TTG7Y=
+cloud.google.com/go/compute v1.22.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM=
cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM=
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
@@ -56,7 +56,7 @@ cloud.google.com/go/eventarc v1.12.1/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8
cloud.google.com/go/filestore v1.7.1/go.mod h1:y10jsorq40JJnjR/lQ8AfFbbcGlw3g+Dp8oN7i7FjV4=
cloud.google.com/go/firestore v1.11.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4=
cloud.google.com/go/functions v1.15.1/go.mod h1:P5yNWUTkyU+LvW/S9O6V+V423VZooALQlqoXdoPz5AE=
-cloud.google.com/go/gkebackup v0.4.0/go.mod h1:byAyBGUwYGEEww7xsbnUTBHIYcOPy/PgUWUtOeRm9Vg=
+cloud.google.com/go/gkebackup v1.3.0/go.mod h1:vUDOu++N0U5qs4IhG1pcOnD1Mac79xWy6GoBFlWCWBU=
cloud.google.com/go/gkeconnect v0.8.1/go.mod h1:KWiK1g9sDLZqhxB2xEuPV8V9NYzrqTUmQR9shJHpOZw=
cloud.google.com/go/gkehub v0.14.1/go.mod h1:VEXKIJZ2avzrbd7u+zeMtW00Y8ddk/4V9511C9CQGTY=
cloud.google.com/go/gkemulticloud v0.6.1/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw=
@@ -67,7 +67,7 @@ cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+K
cloud.google.com/go/iap v1.8.1/go.mod h1:sJCbeqg3mvWLqjZNsI6dfAtbbV1DL2Rl7e1mTyXYREQ=
cloud.google.com/go/ids v1.4.1/go.mod h1:np41ed8YMU8zOgv53MMMoCntLTn2lF+SUzlM+O3u/jw=
cloud.google.com/go/iot v1.7.1/go.mod h1:46Mgw7ev1k9KqK1ao0ayW9h0lI+3hxeanz+L1zmbbbk=
-cloud.google.com/go/kms v1.13.0/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM=
+cloud.google.com/go/kms v1.15.0/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM=
cloud.google.com/go/language v1.10.1/go.mod h1:CPp94nsdVNiQEt1CNjF5WkTcisLiHPyIbMhvR8H2AW0=
cloud.google.com/go/lifesciences v0.9.1/go.mod h1:hACAOd1fFbCGLr/+weUKRAJas82Y4vrL3O5326N//Wc=
cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M=
@@ -77,7 +77,7 @@ cloud.google.com/go/longrunning v0.4.2/go.mod h1:OHrnaYyLUV6oqwh0xiS7e5sLQhP1m0Q
cloud.google.com/go/longrunning v0.5.0/go.mod h1:0JNuqRShmscVAhIACGtskSAWtqtOoPkwP0YF1oVEchc=
cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc=
cloud.google.com/go/managedidentities v1.6.1/go.mod h1:h/irGhTN2SkZ64F43tfGPMbHnypMbu4RB3yl8YcuEak=
-cloud.google.com/go/maps v0.7.0/go.mod h1:3GnvVl3cqeSvgMcpRlQidXsPYuDGQ8naBis7MVzpXsY=
+cloud.google.com/go/maps v1.3.0/go.mod h1:6mWTUv+WhnOwAgjVsSW2QPPECmW+s3PcRyOa9vgG/5s=
cloud.google.com/go/mediatranslation v0.8.1/go.mod h1:L/7hBdEYbYHQJhX2sldtTO5SZZ1C1vkapubj0T2aGig=
cloud.google.com/go/memcache v1.10.1/go.mod h1:47YRQIarv4I3QS5+hoETgKO40InqzLP6kpNLvyXuyaA=
cloud.google.com/go/metastore v1.11.1/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/MlYi/z5OAOWRA=
@@ -105,7 +105,7 @@ cloud.google.com/go/redis v1.13.1/go.mod h1:VP7DGLpE91M6bcsDdMuyCm2hIpB6Vp2hI090
cloud.google.com/go/resourcemanager v1.9.1/go.mod h1:dVCuosgrh1tINZ/RwBufr8lULmWGOkPS8gL5gqyjdT8=
cloud.google.com/go/resourcesettings v1.6.1/go.mod h1:M7mk9PIZrC5Fgsu1kZJci6mpgN8o0IUzVx3eJU3y4Jw=
cloud.google.com/go/retail v1.14.1/go.mod h1:y3Wv3Vr2k54dLNIrCzenyKG8g8dhvhncT2NcNjb/6gE=
-cloud.google.com/go/run v0.9.0/go.mod h1:Wwu+/vvg8Y+JUApMwEDfVfhetv30hCG4ZwDR/IXl2Qg=
+cloud.google.com/go/run v1.2.0/go.mod h1:36V1IlDzQ0XxbQjUx6IYbw8H3TJnWvhii963WW3B/bo=
cloud.google.com/go/scheduler v1.10.1/go.mod h1:R63Ldltd47Bs4gnhQkmNDse5w8gBRrhObZ54PxgR2Oo=
cloud.google.com/go/secretmanager v1.11.1/go.mod h1:znq9JlXgTNdBeQk9TBW/FnR/W4uChEKGeqQWAJ8SXFw=
cloud.google.com/go/security v1.15.1/go.mod h1:MvTnnbsWnehoizHi09zoiZob0iCHVcL4AUBj76h9fXA=
@@ -133,10 +133,6 @@ cloud.google.com/go/websecurityscanner v1.6.1/go.mod h1:Njgaw3rttgRHXzwCB8kgCYqv
cloud.google.com/go/workflows v1.11.1/go.mod h1:Z+t10G1wF7h8LgdY/EmRcQY8ptBD/nvofaL6FqlET6g=
code.cloudfoundry.org/bytefmt v0.0.0-20230612151507-41ef4d1f67a4 h1:9G5F8zgma5v0GdDvNz6iZwwJp3RS/z0SY/aHGfVwvTo=
code.cloudfoundry.org/bytefmt v0.0.0-20230612151507-41ef4d1f67a4/go.mod h1:wYHCXH/gI19ujoFVuMkY48qPpPCoHLKBKXPkn67h/Yc=
-code.cloudfoundry.org/clock v0.0.0-20180518195852-02e53af36e6c/go.mod h1:QD9Lzhd/ux6eNQVUDVRJX/RKTigpewimNYBi7ivZKY8=
-contrib.go.opencensus.io/exporter/aws v0.0.0-20230502192102-15967c811cec/go.mod h1:uu1P0UCM/6RbsMrgPa98ll8ZcHM858i/AD06a9aLRCA=
-contrib.go.opencensus.io/exporter/stackdriver v0.13.14/go.mod h1:5pSSGY0Bhuk7waTHuDf4aQ8D2DrhgETRo9fy6k3Xlzc=
-contrib.go.opencensus.io/integrations/ocsql v0.1.7/go.mod h1:8DsSdjz3F+APR+0z0WkU1aRorQCFfRxvqjUUPMbF3fE=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20221208032759-85de2813cf6b/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
eliasnaur.com/font v0.0.0-20230308162249-dd43949cb42d/go.mod h1:OYVuxibdk9OSLX8vAqydtRPP87PyTFcT9uH3MlEGBQA=
@@ -156,39 +152,16 @@ git.sr.ht/~sbinet/cmpimg v0.1.0/go.mod h1:FU12psLbF4TfNXkKH2ZZQ29crIqoiqTZmeQ7dk
git.sr.ht/~sbinet/gg v0.5.0 h1:6V43j30HM623V329xA9Ntq+WJrMjDxRjuAB1LFWF5m8=
git.sr.ht/~sbinet/gg v0.5.0/go.mod h1:G2C0eRESqlKhS7ErsNey6HHrqU1PwsnCQlekFi9Q2Oo=
git.wow.st/gmp/jni v0.0.0-20210610011705-34026c7e22d0/go.mod h1:+axXBRUTIDlCeE73IKeD/os7LoEnTKdkp8/gQOFjqyo=
-github.com/Azure/azure-amqp-common-go/v3 v3.2.3/go.mod h1:7rPmbSfszeovxGfc5fSAXE4ehlXQZHpMja2OtxC2Tas=
-github.com/Azure/azure-sdk-for-go v68.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
-github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q=
-github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U=
-github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM=
-github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys v0.10.0/go.mod h1:Pu5Zksi2KrU7LPbZbNINx6fuVrUp/ffvpxdDj+i8LeE=
-github.com/Azure/azure-sdk-for-go/sdk/keyvault/internal v0.7.1/go.mod h1:9V2j0jn9jDEkCkv8w/bKTNppX/d0FVA1ud77xCIP4KA=
-github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus v1.4.0/go.mod h1:pXDkeh10bAqElvd+S5Ppncj+DCKvJGXNa8rRT2R7rIw=
-github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.0.0/go.mod h1:2e8rMJtl2+2j+HXbTBwnyGpm5Nou7KhvSfxOq8JpTag=
-github.com/Azure/go-amqp v1.0.1/go.mod h1:+bg0x3ce5+Q3ahCEXnCsGG3ETpDQe3MEVnOuT2ywPwc=
-github.com/Azure/go-autorest v14.2.1-0.20230628134501-d3f8f8a6cdf2+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
-github.com/Azure/go-autorest/autorest v0.11.30-0.20230628134501-d3f8f8a6cdf2/go.mod h1:ZtEzC4Jy2JDrZLxvWs8LrBWEBycl1hbT1eknI8MtfAs=
-github.com/Azure/go-autorest/autorest/adal v0.9.23/go.mod h1:5pcMqFkdPhviJdlEy3kC/v1ZLnQl0MH6XA5YCcMhy4c=
-github.com/Azure/go-autorest/autorest/date v0.3.1-0.20230628134501-d3f8f8a6cdf2/go.mod h1:CHJ5Cu2H2HOHbo8wSOidbGEk/L11sCIy/IglS16YuRI=
-github.com/Azure/go-autorest/autorest/mocks v0.4.3-0.20230628134501-d3f8f8a6cdf2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU=
-github.com/Azure/go-autorest/autorest/to v0.4.1-0.20230628134501-d3f8f8a6cdf2/go.mod h1:DSh3VxN6gfEglfL5RXwMuwLQrHEayq9JF/NUe+DkxCI=
-github.com/Azure/go-autorest/logger v0.2.2-0.20230628134501-d3f8f8a6cdf2/go.mod h1:mwDiRID/uD2cdq/qPxuXAZnmOEnn6qSn/xnC+0Q//eE=
-github.com/Azure/go-autorest/tracing v0.6.1-0.20230628134501-d3f8f8a6cdf2/go.mod h1:DWJLY5/ttkqsBNafOmCvqIlik+Da9EFPSpzNnCWRjMo=
-github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4=
-github.com/AzureAD/microsoft-authentication-library-for-go v0.5.1/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4=
-github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o=
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
-github.com/GoogleCloudPlatform/cloudsql-proxy v1.33.8/go.mod h1:4cMRW7kWQ1a3r65oxcb6TQhBKWE9OxyvEwsgifRAFp4=
github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk=
github.com/Kodeworks/golang-image-ico v0.0.0-20141118225523-73f0f4cfade9/go.mod h1:7uhhqiBaR4CpN0k9rMjOtjpcfGd6DG2m04zQxKnWQ0I=
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww=
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
-github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ=
-github.com/ajstarks/deck v0.0.0-20230623225713-5ca9e3628bb7/go.mod h1:Nd40ZJeNA/I7Wu/RloLtis/eRLHLR/Q9YhYrDZndIeg=
-github.com/ajstarks/deck/generate v0.0.0-20230623225713-5ca9e3628bb7/go.mod h1:u04DhpZIpzaPnAUmhhjibCj450/2ITtLTEnvhaM49as=
+github.com/ajstarks/deck v0.0.0-20230713212537-3862a8c503c2/go.mod h1:Nd40ZJeNA/I7Wu/RloLtis/eRLHLR/Q9YhYrDZndIeg=
+github.com/ajstarks/deck/generate v0.0.0-20230713212537-3862a8c503c2/go.mod h1:u04DhpZIpzaPnAUmhhjibCj450/2ITtLTEnvhaM49as=
github.com/ajstarks/fc v0.0.0-20230606144319-ef5d5cb73a3d/go.mod h1:Qp3TfzbBiIjHwDxIpu+g9nYfNw+xXF2Yqp4WmMlTtwM=
github.com/ajstarks/openvg v0.0.0-20191008131700-c6885d824eb8/go.mod h1:jpZHIkd4sQEgrzshrUQrRfv5OUMMq0w/Q1yK6ZYhUlk=
github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b h1:slYM766cy2nI3BwyRiyQj/Ud48djTMtMebDqepE95rw=
@@ -201,61 +174,34 @@ 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=
-github.com/aws/aws-sdk-go v1.44.299 h1:HVD9lU4CAFHGxleMJp95FV/sRhtg7P4miHD1v88JAQk=
-github.com/aws/aws-sdk-go v1.44.299/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
-github.com/aws/aws-sdk-go-v2 v1.18.1 h1:+tefE750oAb7ZQGzla6bLkOwfcQCEtC5y2RqoqCeqKo=
-github.com/aws/aws-sdk-go-v2 v1.18.1/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw=
+github.com/aws/aws-sdk-go v1.44.307 h1:2R0/EPgpZcFSUwZhYImq/srjaOrOfLv5MNRzrFyAM38=
+github.com/aws/aws-sdk-go v1.44.307/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
+github.com/aws/aws-sdk-go-v2 v1.19.0 h1:klAT+y3pGFBU/qVf1uzwttpBbiuozJYWzNLHioyDJ+k=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 h1:dK82zF6kkPeCo8J1e+tGx4JdvDIQzj7ygIoLg8WMuGs=
-github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10/go.mod h1:VeTZetY5KRJLuD/7fkQXMU6Mw7H5m/KP2J5Iy9osMno=
-github.com/aws/aws-sdk-go-v2/config v1.18.27 h1:Az9uLwmssTE6OGTpsFqOnaGpLnKDqNYOJzWuC6UAYzA=
-github.com/aws/aws-sdk-go-v2/config v1.18.27/go.mod h1:0My+YgmkGxeqjXZb5BYme5pc4drjTnM+x1GJ3zv42Nw=
-github.com/aws/aws-sdk-go-v2/credentials v1.13.26 h1:qmU+yhKmOCyujmuPY7tf5MxR/RKyZrOPO3V4DobiTUk=
-github.com/aws/aws-sdk-go-v2/credentials v1.13.26/go.mod h1:GoXt2YC8jHUBbA4jr+W3JiemnIbkXOfxSXcisUsZ3os=
-github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.4 h1:LxK/bitrAr4lnh9LnIS6i7zWbCOdMsfzKFBI6LUCS0I=
-github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.4/go.mod h1:E1hLXN/BL2e6YizK1zFlYd8vsfi2GTjbjBazinMmeaM=
-github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.71 h1:SAB1UAVaf6nGCu3zyIrV+VWsendXrms1GqtW4zBotKA=
-github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.71/go.mod h1:ZNo5H4PR3/fwsXYqb+Ld5YAfvHcYCbltaTTtSay4l2o=
-github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.34 h1:A5UqQEmPaCFpedKouS4v+dHCTUo2sKqhoKO9U5kxyWo=
-github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.34/go.mod h1:wZpTEecJe0Btj3IYnDx/VlUzor9wm3fJHyvLpQF0VwY=
-github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.28 h1:srIVS45eQuewqz6fKKu6ZGXaq6FuFg5NzgQBAM6g8Y4=
-github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.28/go.mod h1:7VRpKQQedkfIEXb4k52I7swUnZP0wohVajJMRn3vsUw=
-github.com/aws/aws-sdk-go-v2/internal/ini v1.3.35 h1:LWA+3kDM8ly001vJ1X1waCuLJdtTl48gwkPKWy9sosI=
-github.com/aws/aws-sdk-go-v2/internal/ini v1.3.35/go.mod h1:0Eg1YjxE0Bhn56lx+SHJwCzhW+2JGtizsrx+lCqrfm0=
-github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.26 h1:wscW+pnn3J1OYnanMnza5ZVYXLX4cKk5rAvUAl4Qu+c=
-github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.26/go.mod h1:MtYiox5gvyB+OyP0Mr0Sm/yzbEAIPL9eijj/ouHAPw0=
+github.com/aws/aws-sdk-go-v2/config v1.18.28 h1:TINEaKyh1Td64tqFvn09iYpKiWjmHYrG1fa91q2gnqw=
+github.com/aws/aws-sdk-go-v2/credentials v1.13.27 h1:dz0yr/yR1jweAnsCx+BmjerUILVPQ6FS5AwF/OyG1kA=
+github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.5 h1:kP3Me6Fy3vdi+9uHd7YLr6ewPxRL+PU6y15urfTaamU=
+github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.72 h1:m0MmP89v1B0t3b8W8rtATU76KNsodak69QtiokHyEvo=
+github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.35 h1:hMUCiE3Zi5AHrRNGf5j985u0WyqI6r2NULhUfo0N/No=
+github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.29 h1:yOpYx+FTBdpk/g+sBU6Cb1H0U/TLEcYYp66mYqsPpcc=
+github.com/aws/aws-sdk-go-v2/internal/ini v1.3.36 h1:8r5m1BoAWkn0TDC34lUculryf7nUF25EgIMdjvGCkgo=
+github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.27 h1:cZG7psLfqpkB6H+fIrgUDWmlzM474St1LP0jcz272yI=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 h1:y2+VQzC6Zh2ojtV2LoC0MNwHWc6qXv/j2vrQtlftkdA=
-github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11/go.mod h1:iV4q2hsqtNECrfmlXyord9u4zyuFEJX9eLgLpSPzWA8=
-github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.29 h1:zZSLP3v3riMOP14H7b4XP0uyfREDQOYv2cqIrvTXDNQ=
-github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.29/go.mod h1:z7EjRjVwZ6pWcWdI2H64dKttvzaP99jRIj5hphW0M5U=
-github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.28 h1:bkRyG4a929RCnpVSTvLM2j/T4ls015ZhhYApbmYs15s=
-github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.28/go.mod h1:jj7znCIg05jXlaGBlFMGP8+7UN3VtCkRBG2spnmRQkU=
-github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.3 h1:dBL3StFxHtpBzJJ/mNEsjXVgfO+7jR0dAIEwLqMapEA=
-github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.3/go.mod h1:f1QyiAsvIv4B49DmCqrhlXqyaR+0IxMmyX+1P+AnzOM=
-github.com/aws/aws-sdk-go-v2/service/kms v1.23.0/go.mod h1:aNfh11Smy55o65PB3MyKbkM8BFyFUcZmj1k+4g8eNfg=
-github.com/aws/aws-sdk-go-v2/service/s3 v1.36.0 h1:lEmQ1XSD9qLk+NZXbgvLJI/IiTz7OIR2TYUTFH25EI4=
-github.com/aws/aws-sdk-go-v2/service/s3 v1.36.0/go.mod h1:aVbf0sko/TsLWHx30c/uVu7c62+0EAJ3vbxaJga0xCw=
-github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.19.10/go.mod h1:ezn6mzIRqTPdAbDpm03dx4y9g6rvGRb2q33wS76dCxw=
-github.com/aws/aws-sdk-go-v2/service/sns v1.20.13/go.mod h1:rWrvp9i8y/lX94lS7Kn/0iu9RY6vXzeKRqS/knVX8/c=
-github.com/aws/aws-sdk-go-v2/service/sqs v1.23.2/go.mod h1:TaV67b6JMD1988x/uMDop/JnMFK6v5d4Ru+sDmFg+ww=
-github.com/aws/aws-sdk-go-v2/service/ssm v1.36.7/go.mod h1:NdyMyZH/FzmCaybTrVMBD0nTCGrs1G4cOPKHFywx9Ns=
-github.com/aws/aws-sdk-go-v2/service/sso v1.12.12 h1:nneMBM2p79PGWBQovYO/6Xnc2ryRMw3InnDJq1FHkSY=
-github.com/aws/aws-sdk-go-v2/service/sso v1.12.12/go.mod h1:HuCOxYsF21eKrerARYO6HapNeh9GBNq7fius2AcwodY=
-github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.12 h1:2qTR7IFk7/0IN/adSFhYu9Xthr0zVFTgBrmPldILn80=
-github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.12/go.mod h1:E4VrHCPzmVB/KFXtqBGKb3c8zpbNBgKe3fisDNLAW5w=
-github.com/aws/aws-sdk-go-v2/service/sts v1.19.2 h1:XFJ2Z6sNUUcAz9poj+245DMkrHE4h2j5I9/xD50RHfE=
-github.com/aws/aws-sdk-go-v2/service/sts v1.19.2/go.mod h1:dp0yLPsLBOi++WTxzCjA/oZqi6NPIhoR+uF7GeMU9eg=
+github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.30 h1:Bje8Xkh2OWpjBdNfXLrnn8eZg569dUQmhgtydxAYyP0=
+github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.29 h1:IiDolu/eLmuB18DRZibj77n1hHQT7z12jnGO7Ze3pLc=
+github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.4 h1:hx4WksB0NRQ9utR+2c3gEGzl6uKj3eM6PMQ6tN3lgXs=
+github.com/aws/aws-sdk-go-v2/service/s3 v1.37.0 h1:PalLOEGZ/4XfQxpGZFTLaoJSmPoybnqJYotaIZEf/Rg=
+github.com/aws/aws-sdk-go-v2/service/sso v1.12.13 h1:sWDv7cMITPcZ21QdreULwxOOAmE05JjEsT6fCDtDA9k=
+github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.13 h1:BFubHS/xN5bjl818QaroN6mQdjneYQ+AOx44KNXlyH4=
+github.com/aws/aws-sdk-go-v2/service/sts v1.19.3 h1:e5mnydVdCVWxP+5rPAGi2PYxC7u2OZgH1ypC114H04U=
github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8=
-github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o=
-github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
-github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
-github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
github.com/campoy/embedmd v1.0.0 h1:V4kI2qTJJLf4J29RzI/MAt2c3Bl4dQSYPuflzwFH2hY=
github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
@@ -263,26 +209,20 @@ github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY
github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
-github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
-github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ=
github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk=
github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8=
github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k=
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
-github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
-github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/denisenkom/go-mssqldb v0.12.3 h1:pBSGx9Tq67pBOTLmxNuirNTeB8Vjmf886Kx+8Y+8shw=
-github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/disintegration/gift v1.2.1/go.mod h1:Jh2i7f7Q2BM7Ezno3PhfezbR1xpUg9dUg3/RlKGr4HI=
-github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ=
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE=
@@ -297,7 +237,6 @@ github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJ
github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4=
github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0=
github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
-github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
github.com/frankban/quicktest v1.14.5 h1:dfYrrRyLtiqT9GyKXgdh+k4inNeTvmGbuSgZ3lx3GhA=
github.com/frankban/quicktest v1.14.5/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fredbi/uri v0.1.0/go.mod h1:1xC40RnIOGCaQzswaOvrzvG/3M3F0hyDVb3aO/1iGy0=
@@ -307,9 +246,6 @@ github.com/fyne-io/gl-js v0.0.0-20220119005834-d2da28d9ccfe/go.mod h1:d4clgH0/Gr
github.com/fyne-io/glfw-js v0.0.0-20220120001248-ee7290d23504/go.mod h1:gLRWYfYnMA9TONeppRSikMdXlHQ97xVsPojddUv3b/E=
github.com/fyne-io/image v0.0.0-20220602074514-4956b0afb3d2/go.mod h1:eO7W361vmlPOrykIg+Rsh1SZ3tQBaOsfzZhsIOb/Lm0=
github.com/fyne-io/mobile v0.1.2/go.mod h1:/kOrWrZB6sasLbEy2JIvr4arEzQTXBTZGb3Y96yWbHY=
-github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA=
-github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
-github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU=
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
github.com/go-fonts/dejavu v0.2.0 h1:F3lhaCFgvvovt9UzD/AIPnOACYoAddop/uZwIdsJ4hs=
@@ -321,28 +257,22 @@ github.com/go-fonts/liberation v0.3.1/go.mod h1:jdJ+cqF+F4SUL2V+qxBth8fvBpBDS7yl
github.com/go-fonts/stix v0.2.1/go.mod h1:9h7HeKC7I39zxk+g/jNftDNNMqIlCmVfKcq4LoA05Yo=
github.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6/go.mod h1:9YTyiznxEY1fVinfM7RvRcjRHbw2xLBJ3AAGIT0I4Nw=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20221017161538-93cebf72946b/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
-github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0=
github.com/go-latex/latex v0.0.0-20230307184459-12ec69307ad9 h1:NxXI5pTAtpEaU49bpLpQoDsu1zrteW/vxzTz8Cd2UAs=
github.com/go-latex/latex v0.0.0-20230307184459-12ec69307ad9/go.mod h1:gWuR/CrFDDeVRFQwHPvsv9soJVB/iqymhuZQuJ3a9OM=
-github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
-github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE=
-github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs=
+github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ=
+github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA=
github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE=
github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k=
github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU=
github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
github.com/go-pdf/fpdf v1.4.3 h1:0ZbUVyy3URshI6fCIaCD/iTVW33dqA8zbUHuGynxAPA=
github.com/go-pdf/fpdf v1.4.3/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M=
-github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
-github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
-github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
-github.com/go-playground/validator/v10 v10.14.1/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI=
@@ -360,26 +290,18 @@ github.com/go-toolsmith/astequal v1.1.0 h1:kHKm1AWqClYn15R0K1KKE4RG614D46n+nqUQ0
github.com/go-toolsmith/astequal v1.1.0/go.mod h1:sedf7VIdCL22LD8qIvv7Nn9MuWJruQA/ysswh64lffQ=
github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQiyP2Bvw=
github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ=
-github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
-github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
-github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY=
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/gocql/gocql v1.5.2 h1:WnKf8xRQImcT/KLaEWG2pjEeryDB7K0qQN9mPs1C58Q=
github.com/gocql/gocql v1.5.2/go.mod h1:3gM2c4D3AnkISwBxGnMMsS8Oy4y2lhbPRsH4xnJrHG8=
-github.com/gocraft/dbr/v2 v2.7.4 h1:n2gJ8D5FqCbFGeAsgQvciqsQRp2QMrel1fNjcJeVsXw=
-github.com/gocraft/dbr/v2 v2.7.4/go.mod h1:8IH98S8M8J0JSEiYk0MPH26ZDUKemiQ/GvmXL5jo+Uw=
+github.com/gocraft/dbr/v2 v2.7.5 h1:TlXAEjDHazPKVsvUW9ZXug96B/vTqm+sSOCPb56rtTI=
+github.com/gocraft/dbr/v2 v2.7.5/go.mod h1:8IH98S8M8J0JSEiYk0MPH26ZDUKemiQ/GvmXL5jo+Uw=
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
-github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/goki/freetype v0.0.0-20181231101311-fa8a33aabaff/go.mod h1:wfqRWLHRBsRgkp5dmbG56SA0DmVtwrF5N3oPdI8t+Aw=
github.com/goki/freetype v0.0.0-20220119013949-7a161fd3728c/go.mod h1:wfqRWLHRBsRgkp5dmbG56SA0DmVtwrF5N3oPdI8t+Aw=
-github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
-github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
-github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA=
-github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A=
github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
@@ -402,13 +324,9 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-pkcs11 v0.2.0/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY=
github.com/google/go-replayers/grpcreplay v1.1.0 h1:S5+I3zYyZ+GQz68OfbURDdt/+cSMqCK1wrvNx7WBzTE=
-github.com/google/go-replayers/grpcreplay v1.1.0/go.mod h1:qzAvJ8/wi57zq7gWqaE6AwLM6miiXUQwP1S+I9icmhk=
github.com/google/go-replayers/httpreplay v1.2.0 h1:VM1wEyyjaoU53BwrOnaf9VhAyQQEEioJvFYxYcLRKzk=
-github.com/google/go-replayers/httpreplay v1.2.0/go.mod h1:WahEFFZZ7a1P4VM1qEeHy+tME4bwyqPcwWbNlUI1Mcg=
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 v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no=
-github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw=
github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=
github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8 h1:n6vlPhxsA+BW/XsS5+uqi7GyzaLa5MH7qlSLBZtRdiA=
@@ -435,8 +353,6 @@ github.com/gopherjs/gopherjs v0.0.0-20211219123610-ec9572f70e60/go.mod h1:cz9oNY
github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k=
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
-github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
-github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM=
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/goxjs/gl v0.0.0-20210104184919-e3fafc6f8f2a/go.mod h1:dy/f2gjY09hwVfIyATps4G2ai7/hLwLkc5TrPqONuXY=
github.com/goxjs/glfw v0.0.0-20191126052801-d2efb5f20838/go.mod h1:oS8P8gVOT4ywTcjV6wZlOU4GuVFQ8F5328KY3MJ79CY=
@@ -444,36 +360,18 @@ github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJr
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
-github.com/hanwen/go-fuse/v2 v2.3.0/go.mod h1:xKwi1cF7nXAOBCXujD5ie0ZKsxc8GGSA1rlMJc+8IJs=
-github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
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=
github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
-github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
+github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw=
github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28=
github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
-github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
-github.com/jackc/pgconn v1.14.0/go.mod h1:9mBNlny0UvkgJdCDvdVHYSjI+8tD2rnKK69Wz8ti++E=
-github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8=
-github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak=
-github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
-github.com/jackc/pgproto3/v2 v2.3.2/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
-github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
-github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=
-github.com/jackc/pgx/v4 v4.18.1/go.mod h1:FydWkUyadDmdNH/mHnGob881GawxeEm7TcMCzkb+qQE=
-github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
github.com/jackmordaunt/icns v0.0.0-20181231085925-4f16af745526/go.mod h1:UQkeMHVoNcyXYq9otUupF7/h/2tmHlhrS2zw7ZVvUqc=
github.com/jackmordaunt/icns/v2 v2.2.1/go.mod h1:6aYIB9eSzyfHHMKqDf17Xrs1zetQPReAkiUSHzdw4cI=
-github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs=
-github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM=
-github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nDd82IeqRo=
-github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg=
-github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs=
-github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc=
github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4=
github.com/jezek/xgb v1.0.0/go.mod h1:nrhwO0FX/enq75I7Y7G8iN1ubpSGZEiA3v9e9GyRFlk=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
@@ -481,22 +379,20 @@ github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHW
github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g=
-github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
github.com/josephspurrier/goversioninfo v0.0.0-20200309025242-14b0ab84c6ca/go.mod h1:eJTEwMjXb7kZ633hO3Ln9mBUCOjX2+FlTljvpl9SYdE=
github.com/josephspurrier/goversioninfo v1.4.0/go.mod h1:JWzv5rKQr+MmW+LvM412ToT/IkYDZjaclF2pKDss8IY=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
-github.com/jstemmer/go-junit-report v1.0.0/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/jsummers/gobmp v0.0.0-20151104160322-e2ba15ffa76e/go.mod h1:kLgvv7o6UM+0QSf0QjAse3wReFDsb9qbZJdfexWlrQw=
github.com/jung-kurt/gofpdf v1.16.2/go.mod h1:1hl7y57EsiPAkLbOwzpzqgx1A30nQCk/YmFV8S2vmK0=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
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=
-github.com/klauspost/compress v1.16.8-0.20230710085017-b7fbbd3fb210 h1:ThFAbRWJWoJzxv9JyTGmtTqQZf0fl2pMhdsqS2pQqXI=
-github.com/klauspost/compress v1.16.8-0.20230710085017-b7fbbd3fb210/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
+github.com/klauspost/compress v1.16.8-0.20230717094025-33c9bc800133 h1:EHtgNm0KvRXG0aBa0+5ur6mGJXAsxVF+MLu2/YSTVXQ=
+github.com/klauspost/compress v1.16.8-0.20230717094025-33c9bc800133/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
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=
@@ -514,12 +410,9 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
-github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c=
github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8=
-github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
-github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0=
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE=
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
@@ -530,29 +423,23 @@ github.com/lyft/protoc-gen-star/v2 v2.0.3/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLO
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/mandolyte/mdtopdf v1.3.2/go.mod h1:c28Ldk+tVc/y7QQcEcILStS/OFlerdXGGdBUzJQBgEo=
-github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM=
github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
github.com/mcuadros/go-version v0.0.0-20190830083331-035f6764e8d2/go.mod h1:76rfSfYPWj01Z85hUf/ituArm797mNKcvINh1OlsZKo=
-github.com/microsoft/ApplicationInsights-Go v0.4.4/go.mod h1:fKRUseBqkw6bDiXTs3ESTiU/4YTIHsQS4W3fP2ieF4U=
-github.com/microsoft/go-mssqldb v1.1.0/go.mod h1:LzkFdl4z2Ck+Hi+ycGOTbL56VEfgoyA2DvYejrNGbRk=
github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY=
github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE=
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw=
github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8=
github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c=
-github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
-github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8=
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0=
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4=
-github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo=
@@ -565,9 +452,8 @@ github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU=
github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM=
-github.com/onsi/gomega v1.27.8 h1:gegWiwZjBsf2DgiSbf5hpokZ98JVDMcWkUiigk6/KXc=
-github.com/onsi/gomega v1.27.8/go.mod h1:2J8vzI/s+2shY9XHRApDkdgPo1TKT7P2u6fXeJKFnNQ=
-github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4=
+github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
+github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI=
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY=
@@ -576,7 +462,6 @@ github.com/pierrec/cmdflag v0.0.2/go.mod h1:a3zKGZ3cdQUfxjd0RGMLZr8xI3nvpJOB+m6o
github.com/pierrec/lz4/v3 v3.3.5 h1:JzKda6jLXZpQK5/ulrEfT1I66tsKiGlw6sjKssFpwt8=
github.com/pierrec/lz4/v3 v3.3.5/go.mod h1:280XNCGS8jAcG++AHdd6SeWnzyJ1w9oow2vbORyey8Q=
github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
-github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/sftp v1.13.5/go.mod h1:wHDZ0IZX6JcBYRK1TH9bcVq8G7TLpVHYIGJRFnmPfxg=
@@ -591,7 +476,6 @@ github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdO
github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY=
github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk=
github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM=
-github.com/prometheus/prometheus v1.99.0/go.mod h1:Sw35iJlN8dvKz51BtqxhXpNLIfqNn9IFAo64r7XL9Bw=
github.com/quasilyte/go-ruleguard v0.3.19 h1:tfMnabXle/HzOb5Xe9CUZYWXKfkS1KwRmZyPmD9nVcc=
github.com/quasilyte/go-ruleguard v0.3.19/go.mod h1:lHSn69Scl48I7Gt9cX3VrbsZYvYiBYszZOZW4A+oTEw=
github.com/quasilyte/go-ruleguard/dsl v0.3.22 h1:wd8zkOhSNr+I+8Qeciml08ivDt1pSXe60+5DqOpCjPE=
@@ -600,14 +484,11 @@ github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOA
github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng=
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs=
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ=
-github.com/rakyll/embedmd v0.0.0-20171029212350-c8060a0752a2/go.mod h1:7jOTMgqac46PZcF54q6l2hkLEG8op93fZu61KmxWDV4=
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
-github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
-github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk=
github.com/schollz/progressbar/v2 v2.15.0/go.mod h1:UdPq3prGkfQ7MOzZKlDRpYKcFqEMczbD7YmbPgpzKMI=
@@ -616,7 +497,6 @@ github.com/scylladb/go-reflectx v1.0.1/go.mod h1:rWnOfDIRWBGN0miMLIcoPt/Dhi2doCM
github.com/scylladb/gocqlx v1.5.0 h1:p7NEqRaCMAtW2nvq62iyUNXmIYP29373YOC7D2Xd7Qg=
github.com/scylladb/gocqlx v1.5.0/go.mod h1:QarZcw5kpYh31MXfxiN2JWWvF1cgZbYqfTfXwmwhpEQ=
github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8=
-github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/shurcooL/go v0.0.0-20200502201357-93f07166e636/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=
github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c/go.mod h1:owqhoLW1qZoYLZzLnBw+QkPP9WZnjlSWihhxAJC1+/M=
github.com/shurcooL/vfsgen v0.0.0-20230704071429-0000e147ea92/go.mod h1:7/OT02F6S6I7v6WXb+IjhMuZEYfH/RJ5RwEWnEo5BMg=
@@ -637,10 +517,7 @@ github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
-github.com/tedsuo/ifrit v0.0.0-20180802180643-bea94bb476cc/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0=
github.com/tevino/abool v1.2.0/go.mod h1:qc66Pna1RiIsPa7O4Egxxs9OqkuxDX55zznh9K07Tzg=
-github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
-github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
github.com/urfave/cli/v2 v2.4.0/go.mod h1:NX9W0zmTvedE5oDoOMs2RTC8RvdK98NTYZE5LbaEYPg=
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
@@ -676,32 +553,30 @@ go.opentelemetry.io/otel/sdk/metric v0.33.0 h1:oTqyWfksgKoJmbrs2q7O7ahkJzt+Ipeki
go.opentelemetry.io/otel/sdk/metric v0.33.0/go.mod h1:xdypMeA21JBOvjjzDUtD0kzIcHO/SPez+a8HOzJPGp0=
go.opentelemetry.io/otel/trace v1.11.1 h1:ofxdnzsNrGBYXbP7t7zpUK281+go5rF7dvdIZXF8gdQ=
go.opentelemetry.io/otel/trace v1.11.1/go.mod h1:f/Q9G7vzk5u91PhbmKbg1Qn0rzH1LJ4vbPHFGkTPtOk=
-go.opentelemetry.io/proto/otlp v0.20.0 h1:BLOA1cZBAGSbRiNuGCCKiFrCdYB7deeHDeD1SueyOfA=
-go.opentelemetry.io/proto/otlp v0.20.0/go.mod h1:3QgjzPALBIv9pcknj2EXGPXjYPFdUh/RQfF8Lz3+Vnw=
-go.starlark.net v0.0.0-20230612165344-9532f5667272 h1:2/wtqS591wZyD2OsClsVBKRPEvBsQt/Js+fsCiYhwu8=
-go.starlark.net v0.0.0-20230612165344-9532f5667272/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds=
+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=
+go.starlark.net v0.0.0-20230721164632-08598ae210f9 h1:yqYhkJOFDp5pNek8iA/AYiQ33edjkTEWZC2ENAdtMRI=
+go.starlark.net v0.0.0-20230721164632-08598ae210f9/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds=
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
-go.uber.org/automaxprocs v1.5.2 h1:2LxUOGiR3O6tw8ui5sZa2LAaHnsviZdVOUZw4fvbnME=
-go.uber.org/automaxprocs v1.5.2/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0=
+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=
go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4=
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.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60=
go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg=
-gocloud.dev v0.30.0 h1:PRgA+DXUz8/uuTJDA7wc8o2Hwj9yZ2qAsShZ60esbE8=
-gocloud.dev v0.30.0/go.mod h1:w+GlGVg/Jy9JV0Xc9eSXzUZeVEmSWW49W0syFK1+T9U=
-golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
-golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
+gocloud.dev v0.32.0 h1:jHf8WSkByuAuXcvFt04OiiQH+N0zaRtxI6iEph8Bq8Y=
+gocloud.dev v0.32.0/go.mod h1:m/x/N9cRjDF5MD0i5TLFbKbqkGffl/qayXA9FcMT5Oc=
golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA=
golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio=
-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 v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw=
+golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/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=
-golang.org/x/exp/typeparams v0.0.0-20230711153332-06a737ee72cb h1:dEBryXnHo5BYK4z4ZHvcaRKoNr3eyiNLW8+pcobHcng=
-golang.org/x/exp/typeparams v0.0.0-20230711153332-06a737ee72cb/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
+golang.org/x/exp/typeparams v0.0.0-20230713183714-613f0c0eb8a1 h1:VXDua8UTGWl3e7L5kCk5Vyt0LA3QpsyRu6XXL7K3v1w=
+golang.org/x/exp/typeparams v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
golang.org/x/image v0.9.0 h1:QrzfX26snvCM20hIhBwuHI/ThTg18b/+kcKdXHvnR+g=
golang.org/x/image v0.9.0/go.mod h1:jtrku+n79PfroUbvDdeUWMAI+heR786BofxrbiSF+J0=
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
@@ -734,17 +609,17 @@ gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946 h1:vJpL69PeUullhJyKtTjHjENE
gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946/go.mod h1:BQUWDHIAygjdt1HnUPQ0eWqLN2n5FwJycrpYUVUOx2I=
gonum.org/v1/plot v0.13.0 h1:yb2Z/b8bY5h/xC4uix+ujJ+ixvPUvBmUOtM73CJzpsw=
gonum.org/v1/plot v0.13.0/go.mod h1:mV4Bpu4PWTgN2CETURNF8hCMg7EtlZqJYCcmYo/t4Co=
-google.golang.org/api v0.130.0 h1:A50ujooa1h9iizvfzA4rrJr2B7uRmWexwbekQ2+5FPQ=
-google.golang.org/api v0.130.0/go.mod h1:J/LCJMYSDFvAVREGCbrESb53n4++NMBDetSHGL5I5RY=
+google.golang.org/api v0.133.0 h1:N7Ym5Hl0Dpn0I0o7R1z4UpVA1GCDyS8vbPu1/ObV73A=
+google.golang.org/api v0.133.0/go.mod h1:sjRL3UnjTx5UqNQS9EWr9N8p7xbHpy1k0XGRLCf3Spk=
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-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g=
-google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0=
-google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw=
-google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ=
-google.golang.org/genproto/googleapis/bytestream v0.0.0-20230629202037-9506855d4529/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM=
+google.golang.org/genproto v0.0.0-20230724170836-66ad5b6ff146 h1:0yJBPCSj/Hy/vQsNSrYtRLuJSNKoDzDXMu1q1ePGdus=
+google.golang.org/genproto v0.0.0-20230724170836-66ad5b6ff146/go.mod h1:0ggbjUrZYpy1q+ANUS30SEoGZ53cdfwtbuG7Ptgy108=
+google.golang.org/genproto/googleapis/api v0.0.0-20230724170836-66ad5b6ff146 h1:P60zJj7Yxq1VhZIxpRO7A5lDFyy07D6Dqa+HCixuFBM=
+google.golang.org/genproto/googleapis/api v0.0.0-20230724170836-66ad5b6ff146/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ=
+google.golang.org/genproto/googleapis/bytestream v0.0.0-20230720185612-659f7aaaa771/go.mod h1:3QoBVwTHkXbY1oRGzlhwhOykfcATQN43LJ6iT8Wy8kE=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20230724170836-66ad5b6ff146 h1:0PjALPu/U/4OVXKQM2P8b8NJGd4V+xbZSP+uuBJpGm0=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20230724170836-66ad5b6ff146/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM=
google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI=
google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0/go.mod h1:Dk1tviKTvMCz5tvh7t+fh94dhmQVHuCt2OzJB3CTW9Y=
@@ -752,10 +627,8 @@ google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
-gopkg.in/inconshreveable/log15.v2 v2.16.0/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
-gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
@@ -830,7 +703,6 @@ modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8=
-nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
rsc.io/pdf v0.1.1 h1:k1MczvYDUvJBe93bYd7wrZLLUEcLZAuF824/I4e5Xr4=
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
sigs.k8s.io/controller-runtime v0.15.0 h1:ML+5Adt3qZnMSYxZ7gAverBLNPSMQEibtzAgp0UPojU=
@@ -841,7 +713,7 @@ sigs.k8s.io/kustomize/api v0.13.2 h1:kejWfLeJhUsTGioDoFNJET5LQe/ajzXhJGYoU+pJsiA
sigs.k8s.io/kustomize/api v0.13.2/go.mod h1:DUp325VVMFVcQSq+ZxyDisA8wtldwHxLZbr1g94UHsw=
sigs.k8s.io/kustomize/kyaml v0.14.1 h1:c8iibius7l24G2wVAGZn/Va2wNys03GXLjYVIcFVxKA=
sigs.k8s.io/kustomize/kyaml v0.14.1/go.mod h1:AN1/IpawKilWD7V+YvQwRGUvuUOOWpjsHu6uHwonSF4=
-sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE=
-sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E=
+sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk=
+sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08=
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
diff --git a/hack/benchmark/internal/operation/insert.go b/hack/benchmark/internal/operation/insert.go
index 3428b5ab734..6ecdbefe3fc 100644
--- a/hack/benchmark/internal/operation/insert.go
+++ b/hack/benchmark/internal/operation/insert.go
@@ -16,7 +16,6 @@ package operation
import (
"context"
"strconv"
- "sync"
"sync/atomic"
"testing"
@@ -25,6 +24,7 @@ import (
"github.com/vdaas/vald/internal/io"
"github.com/vdaas/vald/internal/net/grpc/codes"
"github.com/vdaas/vald/internal/net/grpc/status"
+ "github.com/vdaas/vald/internal/sync"
)
func (o *operation) Insert(ctx context.Context, b *testing.B, ds assets.Dataset) (insertedNum int) {
diff --git a/hack/benchmark/internal/operation/remove.go b/hack/benchmark/internal/operation/remove.go
index 7c31ac8a1dc..8789e861ed9 100644
--- a/hack/benchmark/internal/operation/remove.go
+++ b/hack/benchmark/internal/operation/remove.go
@@ -16,11 +16,11 @@ package operation
import (
"context"
"strconv"
- "sync"
"testing"
"github.com/vdaas/vald/apis/grpc/v1/payload"
"github.com/vdaas/vald/internal/io"
+ "github.com/vdaas/vald/internal/sync"
)
func (o *operation) Remove(ctx context.Context, b *testing.B, maxIdNum int) {
diff --git a/hack/benchmark/internal/operation/search.go b/hack/benchmark/internal/operation/search.go
index e37b8a286b2..ee2178c1aad 100644
--- a/hack/benchmark/internal/operation/search.go
+++ b/hack/benchmark/internal/operation/search.go
@@ -16,12 +16,12 @@ package operation
import (
"context"
"strconv"
- "sync"
"testing"
"github.com/vdaas/vald/apis/grpc/v1/payload"
"github.com/vdaas/vald/hack/benchmark/internal/assets"
"github.com/vdaas/vald/internal/io"
+ "github.com/vdaas/vald/internal/sync"
)
func (o *operation) Search(ctx context.Context, b *testing.B, ds assets.Dataset) {
diff --git a/hack/benchmark/internal/starter/agent/core/ngt/ngt.go b/hack/benchmark/internal/starter/agent/core/ngt/ngt.go
index d4fec6c59ae..2dced31d27f 100644
--- a/hack/benchmark/internal/starter/agent/core/ngt/ngt.go
+++ b/hack/benchmark/internal/starter/agent/core/ngt/ngt.go
@@ -19,7 +19,6 @@ package ngt
import (
"context"
- "sync"
"testing"
"time"
@@ -27,6 +26,7 @@ import (
"github.com/vdaas/vald/internal/client/v1/client/vald"
"github.com/vdaas/vald/internal/info"
"github.com/vdaas/vald/internal/runner"
+ "github.com/vdaas/vald/internal/sync"
"github.com/vdaas/vald/pkg/agent/core/ngt/config"
"github.com/vdaas/vald/pkg/agent/core/ngt/usecase"
)
diff --git a/hack/benchmark/src/singleflight/singleflight_bench_test.go b/hack/benchmark/src/singleflight/singleflight_bench_test.go
index 4b183fc6a06..1f9239d5389 100644
--- a/hack/benchmark/src/singleflight/singleflight_bench_test.go
+++ b/hack/benchmark/src/singleflight/singleflight_bench_test.go
@@ -19,13 +19,13 @@ import (
"io/fs"
"math"
"os"
- "sync"
"sync/atomic"
"testing"
"time"
"github.com/vdaas/vald/internal/errors"
- "github.com/vdaas/vald/internal/singleflight"
+ "github.com/vdaas/vald/internal/sync/singleflight"
+ "github.com/vdaas/vald/internal/sync"
stdsingleflight "golang.org/x/sync/singleflight"
)
@@ -36,7 +36,7 @@ type Result struct {
}
type helper struct {
- initDoFn func() func(ctx context.Context, key string, fn func() (string, error))
+ initDoFn func() func(ctx context.Context, key string, fn func(context.Context) (string, error))
sleepDur time.Duration
calledCnt int64
totalCnt int64
@@ -67,7 +67,7 @@ var durs = []time.Duration{
func (h *helper) Do(parallel int, b *testing.B) {
b.Helper()
- fn := func() (string, error) {
+ fn := func(context.Context) (string, error) {
atomic.AddInt64(&h.calledCnt, 1)
time.Sleep(h.sleepDur)
return "", nil
@@ -115,10 +115,10 @@ func Benchmark_group_Do_with_sync_singleflight(b *testing.B) {
results := make([]Result, 0, tryCnt)
for j := 0; j < tryCnt; j++ {
h := &helper{
- initDoFn: func() func(ctx context.Context, key string, fn func() (string, error)) {
+ initDoFn: func() func(ctx context.Context, key string, fn func(context.Context) (string, error)) {
g := new(stdsingleflight.Group)
- return func(ctx context.Context, key string, fn func() (string, error)) {
- g.Do(key, func() (interface{}, error) { return fn() })
+ return func(ctx context.Context, key string, fn func(context.Context) (string, error)) {
+ g.Do(key, func() (interface{}, error) { return fn(context.Background()) })
}
},
sleepDur: dur,
@@ -210,9 +210,9 @@ func Benchmark_group_Do_with_vald_internal_singleflight(b *testing.B) {
results := make([]Result, 0, tryCnt)
for j := 0; j < tryCnt; j++ {
h := &helper{
- initDoFn: func() func(ctx context.Context, key string, fn func() (string, error)) {
+ initDoFn: func() func(ctx context.Context, key string, fn func(context.Context) (string, error)) {
g := singleflight.New[string]()
- return func(ctx context.Context, key string, fn func() (string, error)) {
+ return func(ctx context.Context, key string, fn func(context.Context) (string, error)) {
g.Do(ctx, key, fn)
}
},
diff --git a/hack/license/gen/main.go b/hack/license/gen/main.go
index 6a3d5ce9000..a7fbcc72df0 100644
--- a/hack/license/gen/main.go
+++ b/hack/license/gen/main.go
@@ -23,7 +23,6 @@ import (
"io/fs"
"os"
"path/filepath"
- "sync"
"text/template"
"time"
@@ -31,6 +30,7 @@ import (
"github.com/vdaas/vald/internal/file"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync"
)
var (
@@ -50,6 +50,38 @@ var (
{{.Escape}} limitations under the License.
{{.Escape}}
`))
+ goStandard = template.Must(template.New("Go License").Parse(`{{.Escape}}
+{{.Escape}} Copyright (c) 2009-{{.Year}} The Go Authors. All rights resered.
+{{.Escape}} Modified by {{.Maintainer}}
+{{.Escape}}
+{{.Escape}} Redistribution and use in source and binary forms, with or without
+{{.Escape}} modification, are permitted provided that the following conditions are
+{{.Escape}} met:
+{{.Escape}}
+{{.Escape}} * Redistributions of source code must retain the above copyright
+{{.Escape}} notice, this list of conditions and the following disclaimer.
+{{.Escape}} * Redistributions in binary form must reproduce the above
+{{.Escape}} copyright notice, this list of conditions and the following disclaimer
+{{.Escape}} in the documentation and/or other materials provided with the
+{{.Escape}} distribution.
+{{.Escape}} * Neither the name of Google Inc. nor the names of its
+{{.Escape}} contributors may be used to endorse or promote products derived from
+{{.Escape}} this software without specific prior written permission.
+{{.Escape}}
+{{.Escape}} THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+{{.Escape}} "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+{{.Escape}} LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+{{.Escape}} A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+{{.Escape}} OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+{{.Escape}} SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+{{.Escape}} LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+{{.Escape}} DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+{{.Escape}} THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+{{.Escape}} (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+{{.Escape}} OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+{{.Escape}}
+`))
+
slushEscape = "//"
sharpEscape = "#"
)
@@ -189,8 +221,21 @@ func readAndRewrite(path string) error {
log.Fatal(err)
}
} else {
+ tmpl := apache
switch filepath.Ext(path) {
- case ".go", ".proto":
+ case ".go":
+ d.Escape = slushEscape
+ switch fi.Name() {
+ case "errgroup_test.go",
+ "singleflight.go",
+ "semaphore.go",
+ "semaphore_bench_test.go",
+ "semaphore_example_test.go",
+ "semaphore_test.go":
+ tmpl = goStandard
+ default:
+ }
+ case ".proto":
d.Escape = slushEscape
}
lf := true
@@ -236,7 +281,7 @@ func readAndRewrite(path string) error {
continue
} else if !bf {
once.Do(func() {
- err = apache.Execute(buf, d)
+ err = tmpl.Execute(buf, d)
if err != nil {
// skipcq: RVV-A0003
log.Fatal(err)
diff --git a/internal/backoff/backoff.go b/internal/backoff/backoff.go
index e91cf606316..1b99fbdba4d 100644
--- a/internal/backoff/backoff.go
+++ b/internal/backoff/backoff.go
@@ -21,7 +21,6 @@ import (
"context"
"math"
"strconv"
- "sync"
"time"
"github.com/vdaas/vald/internal/errors"
@@ -30,6 +29,7 @@ import (
"github.com/vdaas/vald/internal/observability/trace"
"github.com/vdaas/vald/internal/rand"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync"
)
// NOTE: This variable is for observability package.
diff --git a/internal/circuitbreaker/manager.go b/internal/circuitbreaker/manager.go
index 0cae88a809c..f3789bfbcfe 100644
--- a/internal/circuitbreaker/manager.go
+++ b/internal/circuitbreaker/manager.go
@@ -16,11 +16,11 @@ package circuitbreaker
import (
"context"
"reflect"
- "sync"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/log"
- valdsync "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync"
+ sync "github.com/vdaas/vald/internal/sync"
)
// NOTE: This variable is for observability package.
@@ -37,7 +37,7 @@ type CircuitBreaker interface {
}
type breakerManager struct {
- m valdsync.Map[string, *breaker]
+ m sync.Map[string, *breaker]
opts []BreakerOption
}
diff --git a/internal/client/v1/client/discoverer/discover.go b/internal/client/v1/client/discoverer/discover.go
index f4f2e6e8e12..4f847e37944 100644
--- a/internal/client/v1/client/discoverer/discover.go
+++ b/internal/client/v1/client/discoverer/discover.go
@@ -25,13 +25,13 @@ import (
"github.com/vdaas/vald/apis/grpc/v1/discoverer"
"github.com/vdaas/vald/apis/grpc/v1/payload"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/net"
"github.com/vdaas/vald/internal/net/grpc"
"github.com/vdaas/vald/internal/safety"
- valdsync "github.com/vdaas/vald/internal/sync"
+ sync "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
type Client interface {
@@ -344,7 +344,7 @@ func (c *client) disconnectOldAddrs(ctx context.Context, oldAddrs, connectedAddr
if !c.autoconn {
return nil
}
- var cur valdsync.Map[string, any] // TODO: Does this have to be a sync.Map not a map?
+ var cur sync.Map[string, any] // TODO: Does this have to be a sync.Map not a map?
for _, addr := range connectedAddrs {
cur.Store(addr, struct{}{})
}
diff --git a/internal/client/v1/client/discoverer/option.go b/internal/client/v1/client/discoverer/option.go
index 794662ef373..f9d890a7452 100644
--- a/internal/client/v1/client/discoverer/option.go
+++ b/internal/client/v1/client/discoverer/option.go
@@ -21,8 +21,8 @@ import (
"context"
"time"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/net/grpc"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/timeutil"
)
diff --git a/internal/client/v1/client/filter/egress/client.go b/internal/client/v1/client/filter/egress/client.go
index 77ea9793cfb..b5ebc4f251b 100644
--- a/internal/client/v1/client/filter/egress/client.go
+++ b/internal/client/v1/client/filter/egress/client.go
@@ -27,7 +27,7 @@ import (
"github.com/vdaas/vald/internal/net/grpc"
"github.com/vdaas/vald/internal/observability/trace"
"github.com/vdaas/vald/internal/strings"
- valdsync "github.com/vdaas/vald/internal/sync"
+ sync "github.com/vdaas/vald/internal/sync"
)
type Client interface {
@@ -40,7 +40,7 @@ type Client interface {
type client struct {
addrs []string
- cl valdsync.Map[string, any]
+ cl sync.Map[string, any]
c grpc.Client
}
diff --git a/internal/client/v1/client/filter/ingress/client.go b/internal/client/v1/client/filter/ingress/client.go
index 7222e0763d3..611d704a8a6 100644
--- a/internal/client/v1/client/filter/ingress/client.go
+++ b/internal/client/v1/client/filter/ingress/client.go
@@ -27,7 +27,7 @@ import (
"github.com/vdaas/vald/internal/net/grpc"
"github.com/vdaas/vald/internal/observability/trace"
"github.com/vdaas/vald/internal/strings"
- valdsync "github.com/vdaas/vald/internal/sync"
+ sync "github.com/vdaas/vald/internal/sync"
)
type Client interface {
@@ -40,7 +40,7 @@ type Client interface {
type client struct {
addrs []string
- cl valdsync.Map[string, any]
+ cl sync.Map[string, any]
c grpc.Client
}
diff --git a/internal/core/algorithm/ngt/ngt.go b/internal/core/algorithm/ngt/ngt.go
index 28a40b2bfc8..80156eb2083 100644
--- a/internal/core/algorithm/ngt/ngt.go
+++ b/internal/core/algorithm/ngt/ngt.go
@@ -27,13 +27,13 @@ import "C"
import (
"context"
"reflect"
- "sync"
"unsafe"
"github.com/vdaas/vald/internal/core/algorithm"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/file"
"github.com/vdaas/vald/internal/log"
+ "github.com/vdaas/vald/internal/sync"
)
type (
diff --git a/internal/core/algorithm/ngt/ngt_test.go b/internal/core/algorithm/ngt/ngt_test.go
index e0dbb195d64..3a064842f98 100644
--- a/internal/core/algorithm/ngt/ngt_test.go
+++ b/internal/core/algorithm/ngt/ngt_test.go
@@ -25,7 +25,6 @@ import (
"path/filepath"
"reflect"
"strings"
- "sync"
"testing"
"github.com/google/go-cmp/cmp"
@@ -34,6 +33,7 @@ import (
"github.com/vdaas/vald/internal/file"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/log/logger"
+ "github.com/vdaas/vald/internal/sync"
"github.com/vdaas/vald/internal/test/comparator"
"github.com/vdaas/vald/internal/test/goleak"
)
diff --git a/internal/db/storage/blob/s3/option.go b/internal/db/storage/blob/s3/option.go
index 39472f8196c..92c94054dec 100644
--- a/internal/db/storage/blob/s3/option.go
+++ b/internal/db/storage/blob/s3/option.go
@@ -22,7 +22,7 @@ import (
"github.com/vdaas/vald/internal/backoff"
"github.com/vdaas/vald/internal/db/storage/blob/s3/reader"
"github.com/vdaas/vald/internal/db/storage/blob/s3/writer"
- "github.com/vdaas/vald/internal/errgroup"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/unit"
)
diff --git a/internal/db/storage/blob/s3/option_test.go b/internal/db/storage/blob/s3/option_test.go
index 92b931f5b51..f9bd0c645fd 100644
--- a/internal/db/storage/blob/s3/option_test.go
+++ b/internal/db/storage/blob/s3/option_test.go
@@ -25,8 +25,8 @@ import (
"github.com/vdaas/vald/internal/backoff"
"github.com/vdaas/vald/internal/db/storage/blob/s3/reader"
"github.com/vdaas/vald/internal/db/storage/blob/s3/writer"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/goleak"
)
diff --git a/internal/db/storage/blob/s3/reader/option.go b/internal/db/storage/blob/s3/reader/option.go
index ed3cddc4a3a..96d5b210af6 100644
--- a/internal/db/storage/blob/s3/reader/option.go
+++ b/internal/db/storage/blob/s3/reader/option.go
@@ -20,7 +20,7 @@ import (
"github.com/vdaas/vald/internal/backoff"
"github.com/vdaas/vald/internal/db/storage/blob/s3/reader/io"
"github.com/vdaas/vald/internal/db/storage/blob/s3/sdk/s3/s3iface"
- "github.com/vdaas/vald/internal/errgroup"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
// Option represents the functional option for reader.
diff --git a/internal/db/storage/blob/s3/reader/option_test.go b/internal/db/storage/blob/s3/reader/option_test.go
index bbaeb11eb27..86041d672b8 100644
--- a/internal/db/storage/blob/s3/reader/option_test.go
+++ b/internal/db/storage/blob/s3/reader/option_test.go
@@ -24,8 +24,8 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/vdaas/vald/internal/backoff"
"github.com/vdaas/vald/internal/db/storage/blob/s3/sdk/s3/s3iface"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/goleak"
)
diff --git a/internal/db/storage/blob/s3/reader/reader.go b/internal/db/storage/blob/s3/reader/reader.go
index fbff2f9cb13..bc8a3cc483c 100644
--- a/internal/db/storage/blob/s3/reader/reader.go
+++ b/internal/db/storage/blob/s3/reader/reader.go
@@ -20,7 +20,6 @@ import (
"bytes"
"context"
"strconv"
- "sync"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
@@ -28,11 +27,12 @@ import (
ctxio "github.com/vdaas/vald/internal/db/storage/blob/s3/reader/io"
"github.com/vdaas/vald/internal/db/storage/blob/s3/sdk/s3"
"github.com/vdaas/vald/internal/db/storage/blob/s3/sdk/s3/s3iface"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/io"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/safety"
+ "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
type reader struct {
diff --git a/internal/db/storage/blob/s3/reader/reader_test.go b/internal/db/storage/blob/s3/reader/reader_test.go
index 43e7a0d9521..0fa9d48a88c 100644
--- a/internal/db/storage/blob/s3/reader/reader_test.go
+++ b/internal/db/storage/blob/s3/reader/reader_test.go
@@ -21,7 +21,6 @@ import (
"context"
"os"
"reflect"
- "sync"
"sync/atomic"
"testing"
@@ -32,11 +31,12 @@ import (
ctxio "github.com/vdaas/vald/internal/db/storage/blob/s3/reader/io"
"github.com/vdaas/vald/internal/db/storage/blob/s3/sdk/s3"
"github.com/vdaas/vald/internal/db/storage/blob/s3/sdk/s3/s3iface"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/io"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/log/logger"
+ "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/goleak"
)
diff --git a/internal/db/storage/blob/s3/s3.go b/internal/db/storage/blob/s3/s3.go
index f48422a0082..02935d557fc 100644
--- a/internal/db/storage/blob/s3/s3.go
+++ b/internal/db/storage/blob/s3/s3.go
@@ -26,9 +26,9 @@ import (
"github.com/vdaas/vald/internal/db/storage/blob"
"github.com/vdaas/vald/internal/db/storage/blob/s3/reader"
"github.com/vdaas/vald/internal/db/storage/blob/s3/writer"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/io"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
type client struct {
diff --git a/internal/db/storage/blob/s3/s3_test.go b/internal/db/storage/blob/s3/s3_test.go
index 3e37575d462..d486f4ca88b 100644
--- a/internal/db/storage/blob/s3/s3_test.go
+++ b/internal/db/storage/blob/s3/s3_test.go
@@ -30,9 +30,9 @@ import (
"github.com/vdaas/vald/internal/db/storage/blob/s3/reader"
"github.com/vdaas/vald/internal/db/storage/blob/s3/sdk/s3/s3manager"
"github.com/vdaas/vald/internal/db/storage/blob/s3/writer"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/io"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/comparator"
"github.com/vdaas/vald/internal/test/goleak"
)
diff --git a/internal/db/storage/blob/s3/writer/option.go b/internal/db/storage/blob/s3/writer/option.go
index a1e7a685c56..73f8ea46b60 100644
--- a/internal/db/storage/blob/s3/writer/option.go
+++ b/internal/db/storage/blob/s3/writer/option.go
@@ -19,8 +19,8 @@ package writer
import (
"github.com/aws/aws-sdk-go/service/s3"
"github.com/aws/aws-sdk-go/service/s3/s3manager"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
// Option represents the functional option for writer.
diff --git a/internal/db/storage/blob/s3/writer/option_test.go b/internal/db/storage/blob/s3/writer/option_test.go
index 8db3c6bf1c2..a4b79c47023 100644
--- a/internal/db/storage/blob/s3/writer/option_test.go
+++ b/internal/db/storage/blob/s3/writer/option_test.go
@@ -22,8 +22,8 @@ import (
"github.com/aws/aws-sdk-go/service/s3"
"github.com/aws/aws-sdk-go/service/s3/s3manager"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/goleak"
)
diff --git a/internal/db/storage/blob/s3/writer/writer.go b/internal/db/storage/blob/s3/writer/writer.go
index c059b49c965..6b0f8cd0e93 100644
--- a/internal/db/storage/blob/s3/writer/writer.go
+++ b/internal/db/storage/blob/s3/writer/writer.go
@@ -19,16 +19,16 @@ package writer
import (
"context"
"reflect"
- "sync"
"github.com/aws/aws-sdk-go/aws"
"github.com/vdaas/vald/internal/db/storage/blob/s3/sdk/s3/s3iface"
"github.com/vdaas/vald/internal/db/storage/blob/s3/sdk/s3/s3manager"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/io"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/safety"
+ "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
type writer struct {
diff --git a/internal/db/storage/blob/s3/writer/writer_test.go b/internal/db/storage/blob/s3/writer/writer_test.go
index 5d6e6d624e7..1c7545a62ad 100644
--- a/internal/db/storage/blob/s3/writer/writer_test.go
+++ b/internal/db/storage/blob/s3/writer/writer_test.go
@@ -20,18 +20,18 @@ import (
"context"
"os"
"reflect"
- "sync"
"testing"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/vdaas/vald/internal/db/storage/blob/s3/sdk/s3/s3iface"
"github.com/vdaas/vald/internal/db/storage/blob/s3/sdk/s3/s3manager"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/io"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/log/logger"
+ "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/goleak"
)
diff --git a/internal/errgroup/group.go b/internal/errgroup/group.go
deleted file mode 100644
index f1071921ef8..00000000000
--- a/internal/errgroup/group.go
+++ /dev/null
@@ -1,202 +0,0 @@
-//
-// Copyright (C) 2019-2023 vdaas.org vald team
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// https://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-// Package errgroup provides server global wait group for graceful kill all goroutine
-package errgroup
-
-import (
- "context"
- "runtime"
- "sync"
- "sync/atomic"
-
- "github.com/vdaas/vald/internal/errors"
-)
-
-type Group interface {
- Go(func() error)
- Limitation(int)
- Wait() error
-}
-
-type group struct {
- egctx context.Context
- cancel context.CancelFunc
-
- wg sync.WaitGroup
-
- limitation chan struct{}
- enableLimitation atomic.Bool
- cancelOnce sync.Once
- mu sync.RWMutex
- emap map[string]struct{}
- errs []error
- err error
-}
-
-var (
- instance Group
- once sync.Once
-)
-
-func New(ctx context.Context) (Group, context.Context) {
- egctx, cancel := context.WithCancel(ctx)
- g := &group{
- egctx: egctx,
- emap: make(map[string]struct{}),
- cancel: cancel,
- }
- g.enableLimitation.Store(false)
- return g, egctx
-}
-
-func Init(ctx context.Context) (egctx context.Context) {
- egctx = ctx
- once.Do(func() {
- instance, egctx = New(ctx)
- })
- return
-}
-
-func Get() Group {
- if instance == nil {
- Init(context.Background())
- }
- return instance
-}
-
-func Go(f func() error) {
- instance.Go(f)
-}
-
-func (g *group) Limitation(limit int) {
- if limit > 0 {
- ch := make(chan struct{}, limit)
- g.closeLimitation()
- g.limitation = ch
- g.enableLimitation.Store(true)
- } else {
- g.enableLimitation.Store(false)
- }
-}
-
-func (g *group) closeLimitation() {
- if g.limitation != nil {
- for {
- select {
- case _, live := <-g.limitation:
- if !live {
- return
- }
- default:
- close(g.limitation)
- return
- }
- }
- }
-}
-
-func (g *group) Go(f func() error) {
- if f != nil {
- g.wg.Add(1)
- go func() {
- defer g.wg.Done()
- var err error
- if g.enableLimitation.Load() {
- select {
- case <-g.egctx.Done():
- err = g.egctx.Err()
- if !errors.Is(err, context.Canceled) &&
- !errors.Is(err, context.DeadlineExceeded) {
- g.mu.RLock()
- _, ok := g.emap[err.Error()]
- g.mu.RUnlock()
- if !ok {
- g.mu.Lock()
- g.errs = append(g.errs, err)
- g.emap[err.Error()] = struct{}{}
- g.mu.Unlock()
- }
- }
- g.doCancel()
- return
- case g.limitation <- struct{}{}:
- }
- err = f()
- select {
- case <-g.limitation:
- case <-g.egctx.Done():
- if err != nil {
- err = errors.Join(err, g.egctx.Err())
- }
- }
- } else {
- err = f()
- }
- if err != nil {
- if !errors.Is(err, context.Canceled) &&
- !errors.Is(err, context.DeadlineExceeded) {
- runtime.Gosched()
- g.mu.RLock()
- _, ok := g.emap[err.Error()]
- g.mu.RUnlock()
- if !ok {
- g.mu.Lock()
- g.errs = append(g.errs, err)
- g.emap[err.Error()] = struct{}{}
- g.mu.Unlock()
- }
- }
- g.doCancel()
- return
- }
- }()
- }
-}
-
-func (g *group) doCancel() {
- g.cancelOnce.Do(func() {
- if g.cancel != nil {
- g.cancel()
- }
- })
-}
-
-func Wait() error {
- return instance.Wait()
-}
-
-func (g *group) Wait() error {
- g.wg.Wait()
- g.doCancel()
- g.closeLimitation()
- g.enableLimitation.Store(false)
- g.mu.RLock()
- switch len(g.errs) {
- case 0:
- g.mu.RUnlock()
- return nil
- case 1:
- g.err = g.errs[0]
- default:
- g.err = g.errs[0]
- for _, err := range g.errs[1:] {
- g.err = errors.Join(g.err, err)
- }
- }
- g.mu.RUnlock()
- return g.err
-}
diff --git a/internal/errors/errors.go b/internal/errors/errors.go
index b9585230c92..d4647986f8e 100644
--- a/internal/errors/errors.go
+++ b/internal/errors/errors.go
@@ -23,7 +23,8 @@ import (
"reflect"
"runtime"
"strings"
- "sync"
+
+ "github.com/vdaas/vald/internal/sync"
)
var (
diff --git a/internal/file/file.go b/internal/file/file.go
index ec9e57c08d7..0d766878fde 100644
--- a/internal/file/file.go
+++ b/internal/file/file.go
@@ -26,13 +26,13 @@ import (
"time"
"github.com/kpango/fastime"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/io"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/slices"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
// Open opens the file with the given path, flag and permission.
diff --git a/internal/file/watch/option.go b/internal/file/watch/option.go
index 3cf89bf1095..43b509982ad 100644
--- a/internal/file/watch/option.go
+++ b/internal/file/watch/option.go
@@ -19,7 +19,7 @@ package watch
import (
"context"
- "github.com/vdaas/vald/internal/errgroup"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
type Option func(w *watch) error
diff --git a/internal/file/watch/option_test.go b/internal/file/watch/option_test.go
index 997737d95d4..8b5fb8ae8e9 100644
--- a/internal/file/watch/option_test.go
+++ b/internal/file/watch/option_test.go
@@ -21,8 +21,8 @@ import (
"reflect"
"testing"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/goleak"
)
diff --git a/internal/file/watch/watch.go b/internal/file/watch/watch.go
index fab40d2bc33..ca2723b669b 100644
--- a/internal/file/watch/watch.go
+++ b/internal/file/watch/watch.go
@@ -19,13 +19,13 @@ package watch
import (
"context"
"reflect"
- "sync"
"github.com/fsnotify/fsnotify"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/safety"
+ "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
// Watcher is an interface that represents a file monitor.
diff --git a/internal/file/watch/watch_test.go b/internal/file/watch/watch_test.go
index 3f3a34369c4..e7bb95d21d3 100644
--- a/internal/file/watch/watch_test.go
+++ b/internal/file/watch/watch_test.go
@@ -26,12 +26,12 @@ import (
"testing"
"github.com/fsnotify/fsnotify"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/file"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/log/logger"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/goleak"
)
diff --git a/internal/info/info.go b/internal/info/info.go
index 7baeae5d6e5..83543025575 100644
--- a/internal/info/info.go
+++ b/internal/info/info.go
@@ -22,12 +22,12 @@ import (
"reflect"
"runtime"
"strconv"
- "sync"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/slices"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync"
)
// Info represents an interface to get the runtime information.
diff --git a/internal/info/info_test.go b/internal/info/info_test.go
index 75f0174aa5a..16a2ba99b30 100644
--- a/internal/info/info_test.go
+++ b/internal/info/info_test.go
@@ -21,13 +21,13 @@ import (
"os"
"reflect"
"runtime"
- "sync"
"testing"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/log/logger"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync"
"github.com/vdaas/vald/internal/test/comparator"
"github.com/vdaas/vald/internal/test/goleak"
)
diff --git a/internal/info/option_test.go b/internal/info/option_test.go
index 99a6802f665..1a90462e691 100644
--- a/internal/info/option_test.go
+++ b/internal/info/option_test.go
@@ -16,10 +16,10 @@ package info
import (
"reflect"
"runtime"
- "sync"
"testing"
"github.com/vdaas/vald/internal/errors"
+ "github.com/vdaas/vald/internal/sync"
"github.com/vdaas/vald/internal/test/comparator"
"github.com/vdaas/vald/internal/test/goleak"
)
diff --git a/internal/io/copy.go b/internal/io/copy.go
index 8884063cec4..e22dbdb030b 100644
--- a/internal/io/copy.go
+++ b/internal/io/copy.go
@@ -21,10 +21,10 @@ import (
"bytes"
"io"
"math"
- "sync"
"sync/atomic"
"github.com/vdaas/vald/internal/errors"
+ "github.com/vdaas/vald/internal/sync"
)
var cio = NewCopier(0)
diff --git a/internal/io/copy_test.go b/internal/io/copy_test.go
index 72b4cd4e581..b88af60cf00 100644
--- a/internal/io/copy_test.go
+++ b/internal/io/copy_test.go
@@ -21,11 +21,11 @@ import (
"bytes"
"io"
"reflect"
- "sync"
"sync/atomic"
"testing"
"github.com/vdaas/vald/internal/errors"
+ "github.com/vdaas/vald/internal/sync"
"github.com/vdaas/vald/internal/test/goleak"
)
diff --git a/internal/io/io.go b/internal/io/io.go
index 0e39415328a..a302f5ad128 100644
--- a/internal/io/io.go
+++ b/internal/io/io.go
@@ -21,11 +21,11 @@ import (
"bytes"
"context"
"io"
- "sync"
"github.com/vdaas/vald/internal/conv"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/safety"
+ "github.com/vdaas/vald/internal/sync"
)
type (
diff --git a/internal/k8s/option.go b/internal/k8s/option.go
index 255c30a9358..6b5d93168a0 100644
--- a/internal/k8s/option.go
+++ b/internal/k8s/option.go
@@ -18,8 +18,8 @@
package k8s
import (
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/net"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"sigs.k8s.io/controller-runtime/pkg/manager"
)
diff --git a/internal/k8s/reconciler.go b/internal/k8s/reconciler.go
index a329232795f..f40892b81e2 100644
--- a/internal/k8s/reconciler.go
+++ b/internal/k8s/reconciler.go
@@ -21,10 +21,10 @@ import (
"context"
"reflect"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/net"
"github.com/vdaas/vald/internal/safety"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"k8s.io/apimachinery/pkg/runtime"
"sigs.k8s.io/controller-runtime/pkg/builder"
"sigs.k8s.io/controller-runtime/pkg/client"
diff --git a/internal/log/log.go b/internal/log/log.go
index 21bdd0129cf..8a9b69168ba 100644
--- a/internal/log/log.go
+++ b/internal/log/log.go
@@ -17,8 +17,6 @@
package log
import (
- "sync"
-
"github.com/vdaas/vald/internal/log/format"
"github.com/vdaas/vald/internal/log/glg"
"github.com/vdaas/vald/internal/log/level"
@@ -26,6 +24,7 @@ import (
"github.com/vdaas/vald/internal/log/nop"
"github.com/vdaas/vald/internal/log/retry"
"github.com/vdaas/vald/internal/log/zap"
+ "github.com/vdaas/vald/internal/sync"
)
var (
diff --git a/internal/log/log_test.go b/internal/log/log_test.go
index 6b8688f34a3..735f11ae9f2 100644
--- a/internal/log/log_test.go
+++ b/internal/log/log_test.go
@@ -18,7 +18,6 @@ package log
import (
"reflect"
- "sync"
"testing"
"github.com/vdaas/vald/internal/errors"
@@ -27,6 +26,7 @@ import (
logger "github.com/vdaas/vald/internal/log/logger"
"github.com/vdaas/vald/internal/log/mock"
"github.com/vdaas/vald/internal/log/nop"
+ "github.com/vdaas/vald/internal/sync"
"github.com/vdaas/vald/internal/test/goleak"
)
diff --git a/internal/net/dialer.go b/internal/net/dialer.go
index 692cc1e0586..960381b9e24 100644
--- a/internal/net/dialer.go
+++ b/internal/net/dialer.go
@@ -21,7 +21,6 @@ import (
"context"
"net"
"strconv"
- "sync"
"sync/atomic"
"syscall"
"time"
@@ -33,7 +32,8 @@ import (
"github.com/vdaas/vald/internal/net/control"
"github.com/vdaas/vald/internal/observability/trace"
"github.com/vdaas/vald/internal/safety"
- valdsync "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync"
+ sync "github.com/vdaas/vald/internal/sync"
"github.com/vdaas/vald/internal/tls"
)
@@ -60,7 +60,7 @@ type dialer struct {
ctrl control.SocketController
sockFlg control.SocketFlag
dialerDualStack bool
- addrs valdsync.Map[string, *addrInfo]
+ addrs sync.Map[string, *addrInfo]
der *net.Dialer
dialer func(ctx context.Context, network, addr string) (Conn, error)
}
diff --git a/internal/net/grpc/client.go b/internal/net/grpc/client.go
index 928e92ade5a..901ecc1d6ed 100644
--- a/internal/net/grpc/client.go
+++ b/internal/net/grpc/client.go
@@ -25,7 +25,6 @@ import (
"github.com/vdaas/vald/internal/backoff"
"github.com/vdaas/vald/internal/circuitbreaker"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/net"
@@ -35,9 +34,10 @@ import (
"github.com/vdaas/vald/internal/net/grpc/status"
"github.com/vdaas/vald/internal/observability/trace"
"github.com/vdaas/vald/internal/safety"
- "github.com/vdaas/vald/internal/singleflight"
+ "github.com/vdaas/vald/internal/sync/singleflight"
"github.com/vdaas/vald/internal/strings"
- valdsync "github.com/vdaas/vald/internal/sync"
+ sync "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"google.golang.org/grpc"
gbackoff "google.golang.org/grpc/backoff"
)
@@ -110,7 +110,7 @@ type gRPCClient struct {
gbo gbackoff.Config // grpc's original backoff configuration
mcd time.Duration // minimum connection timeout duration
group singleflight.Group[pool.Conn]
- crl valdsync.Map[string, bool] // connection request list
+ crl sync.Map[string, bool] // connection request list
ech <-chan error
monitorRunning atomic.Bool
@@ -424,7 +424,7 @@ func (g *gRPCClient) RangeConcurrent(ctx context.Context,
return g.Range(ctx, f)
}
eg, egctx := errgroup.New(sctx)
- eg.Limitation(concurrency)
+ eg.SetLimit(concurrency)
if g.conns.Len() == 0 {
return errors.ErrGRPCClientConnNotFound("*")
}
@@ -570,11 +570,11 @@ func (g *gRPCClient) OrderedRangeConcurrent(ctx context.Context,
if g.conns.Len() == 0 {
return errors.ErrGRPCClientConnNotFound("*")
}
- if concurrency < 2 {
+ if concurrency == 0 || concurrency == 1 {
return g.OrderedRange(ctx, orders, f)
}
eg, egctx := errgroup.New(sctx)
- eg.Limitation(concurrency)
+ eg.SetLimit(concurrency)
for _, order := range orders {
addr := order
eg.Go(safety.RecoverFunc(func() (err error) {
diff --git a/internal/net/grpc/grpcconns.go b/internal/net/grpc/grpcconns.go
index 955b83fed5b..4d19a994f7b 100644
--- a/internal/net/grpc/grpcconns.go
+++ b/internal/net/grpc/grpcconns.go
@@ -18,12 +18,12 @@
package grpc
import (
- "sync"
"sync/atomic"
"unsafe"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/net/grpc/pool"
+ "github.com/vdaas/vald/internal/sync"
)
type grpcConns struct {
diff --git a/internal/net/grpc/logger/logger.go b/internal/net/grpc/logger/logger.go
index d8b81aa8a4f..72b311eab47 100644
--- a/internal/net/grpc/logger/logger.go
+++ b/internal/net/grpc/logger/logger.go
@@ -16,9 +16,9 @@ package logger
import (
"os"
"strconv"
- "sync"
"github.com/vdaas/vald/internal/log"
+ "github.com/vdaas/vald/internal/sync"
glog "google.golang.org/grpc/grpclog"
)
diff --git a/internal/net/grpc/logger/logger_test.go b/internal/net/grpc/logger/logger_test.go
index 6fac492791a..be230770fca 100644
--- a/internal/net/grpc/logger/logger_test.go
+++ b/internal/net/grpc/logger/logger_test.go
@@ -17,10 +17,10 @@ import (
"os"
"os/exec"
"reflect"
- "sync"
"testing"
"github.com/vdaas/vald/internal/errors"
+ "github.com/vdaas/vald/internal/sync"
"github.com/vdaas/vald/internal/test/goleak"
"google.golang.org/grpc/grpclog"
)
diff --git a/internal/net/grpc/option.go b/internal/net/grpc/option.go
index 14b90e9cb68..12e7fd6db09 100644
--- a/internal/net/grpc/option.go
+++ b/internal/net/grpc/option.go
@@ -24,11 +24,11 @@ import (
"github.com/vdaas/vald/internal/backoff"
"github.com/vdaas/vald/internal/circuitbreaker"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/net"
"github.com/vdaas/vald/internal/net/grpc/interceptor/client/trace"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/timeutil"
"google.golang.org/grpc"
gbackoff "google.golang.org/grpc/backoff"
diff --git a/internal/net/grpc/pool/option.go b/internal/net/grpc/pool/option.go
index c544a6520dd..8126d195198 100644
--- a/internal/net/grpc/pool/option.go
+++ b/internal/net/grpc/pool/option.go
@@ -19,7 +19,7 @@ package pool
import (
"github.com/vdaas/vald/internal/backoff"
- "github.com/vdaas/vald/internal/errgroup"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/timeutil"
)
diff --git a/internal/net/grpc/pool/pool.go b/internal/net/grpc/pool/pool.go
index fba9f0d2678..942b8db6a98 100644
--- a/internal/net/grpc/pool/pool.go
+++ b/internal/net/grpc/pool/pool.go
@@ -22,18 +22,18 @@ import (
"fmt"
"math"
"strconv"
- "sync"
"sync/atomic"
"time"
"github.com/vdaas/vald/internal/backoff"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/net"
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/slices"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"google.golang.org/grpc"
"google.golang.org/grpc/connectivity"
"google.golang.org/grpc/credentials/insecure"
diff --git a/internal/net/grpc/pool/pool_bench_test.go b/internal/net/grpc/pool/pool_bench_test.go
index a8d7515c1f1..59a0a3afee0 100644
--- a/internal/net/grpc/pool/pool_bench_test.go
+++ b/internal/net/grpc/pool/pool_bench_test.go
@@ -19,7 +19,6 @@ package pool
import (
"context"
- "sync"
"testing"
"github.com/vdaas/vald/apis/grpc/v1/discoverer"
@@ -27,7 +26,8 @@ import (
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/log/level"
"github.com/vdaas/vald/internal/net"
- valdsync "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync"
+ sync "github.com/vdaas/vald/internal/sync"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)
@@ -134,7 +134,7 @@ func Benchmark_StaticDial(b *testing.B) {
b.Error(err)
}
- conns := new(valdsync.Map[string, *grpc.ClientConn])
+ conns := new(sync.Map[string, *grpc.ClientConn])
conns.Store(DefaultServerAddr, conn)
b.StopTimer()
@@ -191,7 +191,7 @@ func BenchmarkParallel_StaticDial(b *testing.B) {
b.Error(err)
}
- conns := new(valdsync.Map[string, *grpc.ClientConn])
+ conns := new(sync.Map[string, *grpc.ClientConn])
conns.Store(DefaultServerAddr, conn)
b.StopTimer()
diff --git a/internal/net/grpc/stream.go b/internal/net/grpc/stream.go
index dcafda62bb5..0ed745916d2 100644
--- a/internal/net/grpc/stream.go
+++ b/internal/net/grpc/stream.go
@@ -21,10 +21,8 @@ import (
"context"
"fmt"
"runtime"
- "sync"
"sync/atomic"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/io"
"github.com/vdaas/vald/internal/log"
@@ -34,6 +32,8 @@ import (
"github.com/vdaas/vald/internal/observability/trace"
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/slices"
+ "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"google.golang.org/grpc"
)
@@ -55,7 +55,7 @@ func BidirectionalStream[Q any, R any](ctx context.Context, stream ServerStream,
}()
eg, ctx := errgroup.New(ctx)
if concurrency > 0 {
- eg.Limitation(concurrency)
+ eg.SetLimit(concurrency)
}
var (
diff --git a/internal/net/http/client/client_test.go b/internal/net/http/client/client_test.go
index b248b72621e..ab43883056d 100644
--- a/internal/net/http/client/client_test.go
+++ b/internal/net/http/client/client_test.go
@@ -22,7 +22,6 @@ import (
"net/http"
"net/url"
"reflect"
- "sync"
"sync/atomic"
"testing"
@@ -32,6 +31,7 @@ import (
"github.com/vdaas/vald/internal/log/logger"
"github.com/vdaas/vald/internal/net"
htr "github.com/vdaas/vald/internal/net/http/transport"
+ "github.com/vdaas/vald/internal/sync"
"github.com/vdaas/vald/internal/test/comparator"
"github.com/vdaas/vald/internal/test/goleak"
"golang.org/x/net/http2"
diff --git a/internal/net/http/middleware/option.go b/internal/net/http/middleware/option.go
index cfb7750cc7f..150a2e7afec 100644
--- a/internal/net/http/middleware/option.go
+++ b/internal/net/http/middleware/option.go
@@ -20,7 +20,7 @@ package middleware
import (
"time"
- "github.com/vdaas/vald/internal/errgroup"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/timeutil"
)
diff --git a/internal/net/http/middleware/option_test.go b/internal/net/http/middleware/option_test.go
index 140c61b985d..eb132767c24 100644
--- a/internal/net/http/middleware/option_test.go
+++ b/internal/net/http/middleware/option_test.go
@@ -19,8 +19,8 @@ import (
"testing"
"time"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
func TestWithErrorGroup(t *testing.T) {
diff --git a/internal/net/http/middleware/timeout.go b/internal/net/http/middleware/timeout.go
index 001f9fe917d..28af2307e82 100644
--- a/internal/net/http/middleware/timeout.go
+++ b/internal/net/http/middleware/timeout.go
@@ -24,10 +24,10 @@ import (
"time"
"github.com/kpango/fastime"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/net/http/rest"
"github.com/vdaas/vald/internal/safety"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
type timeout struct {
diff --git a/internal/net/http/middleware/timeout_test.go b/internal/net/http/middleware/timeout_test.go
index 56e661717ef..2ad64f48e62 100644
--- a/internal/net/http/middleware/timeout_test.go
+++ b/internal/net/http/middleware/timeout_test.go
@@ -22,10 +22,10 @@ import (
"testing"
"time"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/net/http/rest"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
func TestNewTimeout(t *testing.T) {
diff --git a/internal/net/net.go b/internal/net/net.go
index 58cb705a76b..3108954d406 100644
--- a/internal/net/net.go
+++ b/internal/net/net.go
@@ -23,14 +23,14 @@ import (
"net"
"net/netip"
"strconv"
- "sync"
"syscall"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
type (
@@ -234,7 +234,7 @@ func ScanPorts(ctx context.Context, start, end uint16, host string) (ports []uin
return nil, err
}
eg, egctx := errgroup.New(ctx)
- eg.Limitation(int(rl.Max) / 2)
+ eg.SetLimit(int(rl.Max) / 2)
var mu sync.Mutex
diff --git a/internal/observability/metrics/agent/sidecar/sidecar.go b/internal/observability/metrics/agent/sidecar/sidecar.go
index 34ec7934ea2..684a5897cfe 100644
--- a/internal/observability/metrics/agent/sidecar/sidecar.go
+++ b/internal/observability/metrics/agent/sidecar/sidecar.go
@@ -15,11 +15,11 @@ package sidecar
import (
"context"
- "sync"
"time"
"github.com/vdaas/vald/internal/observability/attribute"
"github.com/vdaas/vald/internal/observability/metrics"
+ "github.com/vdaas/vald/internal/sync"
"github.com/vdaas/vald/pkg/agent/sidecar/service/observer"
"go.opentelemetry.io/otel/sdk/metric/aggregation"
"go.opentelemetry.io/otel/sdk/metric/view"
diff --git a/internal/observability/observability.go b/internal/observability/observability.go
index f80fcb92d2d..3df322bf51c 100644
--- a/internal/observability/observability.go
+++ b/internal/observability/observability.go
@@ -18,7 +18,6 @@ import (
"reflect"
"github.com/vdaas/vald/internal/config"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/observability/exporter"
@@ -30,6 +29,7 @@ import (
"github.com/vdaas/vald/internal/observability/metrics/runtime/goroutine"
"github.com/vdaas/vald/internal/observability/metrics/version"
"github.com/vdaas/vald/internal/observability/trace"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
type Observability interface {
diff --git a/internal/observability/option.go b/internal/observability/option.go
index aa9d1d5479a..e2246f578c8 100644
--- a/internal/observability/option.go
+++ b/internal/observability/option.go
@@ -14,11 +14,11 @@
package observability
import (
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/observability/exporter"
"github.com/vdaas/vald/internal/observability/metrics"
"github.com/vdaas/vald/internal/observability/trace"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
type Option func(*observability) error
diff --git a/internal/rand/rand.go b/internal/rand/rand.go
index e0235cb695d..38f7e5172fc 100644
--- a/internal/rand/rand.go
+++ b/internal/rand/rand.go
@@ -18,10 +18,10 @@
package rand
import (
- "sync"
"sync/atomic"
"github.com/kpango/fastime"
+ "github.com/vdaas/vald/internal/sync"
)
type rand struct {
diff --git a/internal/rand/rand_test.go b/internal/rand/rand_test.go
index a1cd8cc2fa1..dc4155770e3 100644
--- a/internal/rand/rand_test.go
+++ b/internal/rand/rand_test.go
@@ -15,11 +15,11 @@ package rand
import (
"fmt"
- "sync"
"sync/atomic"
"testing"
"github.com/vdaas/vald/internal/errors"
+ "github.com/vdaas/vald/internal/sync"
"github.com/vdaas/vald/internal/test/goleak"
)
diff --git a/internal/runner/runner.go b/internal/runner/runner.go
index fd6da03e7b2..56ab49efc59 100644
--- a/internal/runner/runner.go
+++ b/internal/runner/runner.go
@@ -26,7 +26,6 @@ import (
"github.com/vdaas/vald/internal/config"
"github.com/vdaas/vald/internal/conv"
"github.com/vdaas/vald/internal/encoding/json"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/info"
"github.com/vdaas/vald/internal/log"
@@ -34,6 +33,7 @@ import (
"github.com/vdaas/vald/internal/params"
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/timeutil/location"
ver "github.com/vdaas/vald/internal/version"
"go.uber.org/automaxprocs/maxprocs"
diff --git a/internal/servers/option.go b/internal/servers/option.go
index f6d1e88ca33..399a14cc7f4 100644
--- a/internal/servers/option.go
+++ b/internal/servers/option.go
@@ -20,8 +20,8 @@ package servers
import (
"time"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/servers/server"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/timeutil"
)
diff --git a/internal/servers/option_test.go b/internal/servers/option_test.go
index 46629861092..a80a4850e4e 100644
--- a/internal/servers/option_test.go
+++ b/internal/servers/option_test.go
@@ -19,9 +19,9 @@ import (
"testing"
"time"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/servers/server"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
func TestWithServer(t *testing.T) {
diff --git a/internal/servers/server/option.go b/internal/servers/server/option.go
index ac0e44053b2..7d94220ad2c 100644
--- a/internal/servers/server/option.go
+++ b/internal/servers/server/option.go
@@ -23,7 +23,6 @@ import (
"net/http"
"time"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/info"
"github.com/vdaas/vald/internal/log"
@@ -36,6 +35,7 @@ import (
"github.com/vdaas/vald/internal/net/grpc/interceptor/server/trace"
"github.com/vdaas/vald/internal/net/http/rest"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/timeutil"
)
diff --git a/internal/servers/server/option_test.go b/internal/servers/server/option_test.go
index 721603813cc..3d6de488804 100644
--- a/internal/servers/server/option_test.go
+++ b/internal/servers/server/option_test.go
@@ -20,10 +20,10 @@ import (
"testing"
"time"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/net"
"github.com/vdaas/vald/internal/net/grpc"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
func TestWithHost(t *testing.T) {
diff --git a/internal/servers/server/server.go b/internal/servers/server/server.go
index 8e32ea7debf..3b7a7939a15 100644
--- a/internal/servers/server/server.go
+++ b/internal/servers/server/server.go
@@ -24,11 +24,9 @@ import (
"os"
"reflect"
"strconv"
- "sync"
"syscall"
"time"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/net"
@@ -39,6 +37,8 @@ import (
glog "github.com/vdaas/vald/internal/net/grpc/logger"
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
type Server interface {
diff --git a/internal/servers/server/server_test.go b/internal/servers/server/server_test.go
index bedb6028c83..2b7e67d2caf 100644
--- a/internal/servers/server/server_test.go
+++ b/internal/servers/server/server_test.go
@@ -21,12 +21,12 @@ import (
"testing"
"time"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/log/logger"
"github.com/vdaas/vald/internal/net"
"github.com/vdaas/vald/internal/net/grpc"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
func TestServerMode_String(t *testing.T) {
diff --git a/internal/servers/servers.go b/internal/servers/servers.go
index 0416d174775..6dd625567a6 100644
--- a/internal/servers/servers.go
+++ b/internal/servers/servers.go
@@ -23,11 +23,11 @@ import (
"sort"
"time"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/servers/server"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
type Listener interface {
diff --git a/internal/servers/servers_test.go b/internal/servers/servers_test.go
index 3bf383844d8..5c3f9aa419f 100644
--- a/internal/servers/servers_test.go
+++ b/internal/servers/servers_test.go
@@ -19,9 +19,9 @@ import (
"testing"
"time"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/servers/server"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
func TestNew(t *testing.T) {
diff --git a/internal/singleflight/singleflight.go b/internal/singleflight/singleflight.go
deleted file mode 100644
index 94e72b149cc..00000000000
--- a/internal/singleflight/singleflight.go
+++ /dev/null
@@ -1,68 +0,0 @@
-//
-// Copyright (C) 2019-2023 vdaas.org vald team
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// https://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-// Package singleflight represents zero time caching.
-package singleflight
-
-import (
- "context"
- "sync"
- "sync/atomic"
-
- valdsync "github.com/vdaas/vald/internal/sync"
-)
-
-type call[V any] struct {
- wg sync.WaitGroup
- val V
- err error
- dups uint64
-}
-
-// Group represents interface for zero time cache.
-type Group[V any] interface {
- Do(ctx context.Context, key string, fn func() (V, error)) (v V, shared bool, err error)
-}
-
-type group[V any] struct {
- m valdsync.Map[string, *call[V]]
-}
-
-// New returns Group implementation.
-func New[V any]() Group[V] {
- return new(group[V])
-}
-
-// Do execute the given function and return the result.
-// It makes sure only one execution of the function for each given key.
-// If duplicate comes, the duplicated call with the same key will wait for the first caller return.
-// It returns the result and the error of the given function, and whether the result is shared from the first caller.
-func (g *group[V]) Do(_ context.Context, key string, fn func() (V, error)) (v V, shared bool, err error) {
- c, loaded := g.m.LoadOrStore(key, new(call[V]))
- if loaded {
- atomic.AddUint64(&c.dups, 1)
- c.wg.Wait()
- v, err = c.val, c.err
- return v, true, err
- }
- c.wg.Add(1)
- c.val, c.err = fn()
- c.wg.Done()
-
- g.m.LoadAndDelete(key)
-
- return c.val, atomic.LoadUint64(&c.dups) > 0, c.err
-}
diff --git a/internal/strings/strings.go b/internal/strings/strings.go
index da4a76f9df2..2031fdefe86 100644
--- a/internal/strings/strings.go
+++ b/internal/strings/strings.go
@@ -16,7 +16,8 @@ package strings
import (
"bytes"
"strings"
- "sync"
+
+ "github.com/vdaas/vald/internal/sync"
)
type (
diff --git a/internal/sync/alias.go b/internal/sync/alias.go
new file mode 100644
index 00000000000..c1766667cd9
--- /dev/null
+++ b/internal/sync/alias.go
@@ -0,0 +1,25 @@
+// Copyright (C) 2019-2023 vdaas.org vald team
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+package sync
+
+import "sync"
+
+type (
+ Mutex = sync.Mutex
+ RWMutex = sync.RWMutex
+ Once = sync.Once
+ WaitGroup = sync.WaitGroup
+ Cond = sync.Cond
+ Pool = sync.Pool
+)
diff --git a/internal/sync/errgroup/errgroup_test.go b/internal/sync/errgroup/errgroup_test.go
new file mode 100644
index 00000000000..be65578be8c
--- /dev/null
+++ b/internal/sync/errgroup/errgroup_test.go
@@ -0,0 +1,291 @@
+//
+// Copyright (c) 2009-2023 The Go Authors. All rights resered.
+// Modified by vdaas.org vald team
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+
+package errgroup_test
+
+import (
+ "context"
+ "fmt"
+ "net/http"
+ "os"
+ "sync/atomic"
+ "testing"
+ "time"
+
+ "github.com/vdaas/vald/internal/errors"
+ "github.com/vdaas/vald/internal/sync/errgroup"
+)
+
+var (
+ Web = fakeSearch("web")
+ Image = fakeSearch("image")
+ Video = fakeSearch("video")
+)
+
+type (
+ Result string
+ Search func(ctx context.Context, query string) (Result, error)
+)
+
+func fakeSearch(kind string) Search {
+ return func(_ context.Context, query string) (Result, error) {
+ return Result(fmt.Sprintf("%s result for %q", kind, query)), nil
+ }
+}
+
+// JustErrors illustrates the use of a Group in place of a sync.WaitGroup to
+// simplify goroutine counting and error handling. This example is derived from
+// the sync.WaitGroup example at https://golang.org/pkg/sync/#example_WaitGroup.
+func ExampleGroup_justErrors() {
+ g, _ := errgroup.New(context.Background())
+ urls := []string{
+ "http://www.golang.org/",
+ "http://www.google.com/",
+ "http://www.somestupidname.com/",
+ }
+ for _, url := range urls {
+ // Launch a goroutine to fetch the URL.
+ url := url // https://golang.org/doc/faq#closures_and_goroutines
+ g.Go(func() error {
+ // Fetch the URL.
+ resp, err := http.Get(url)
+ if err == nil {
+ resp.Body.Close()
+ }
+ return err
+ })
+ }
+ // Wait for all HTTP fetches to complete.
+ if err := g.Wait(); err == nil {
+ fmt.Println("Successfully fetched all URLs.")
+ }
+}
+
+// Parallel illustrates the use of a Group for synchronizing a simple parallel
+// task: the "Google Search 2.0" function from
+// https://talks.golang.org/2012/concurrency.slide#46, augmented with a Context
+// and error-handling.
+func ExampleGroup_parallel() {
+ Google := func(ctx context.Context, query string) ([]Result, error) {
+ g, ctx := errgroup.WithContext(ctx)
+
+ searches := []Search{Web, Image, Video}
+ results := make([]Result, len(searches))
+ for i, search := range searches {
+ i, search := i, search // https://golang.org/doc/faq#closures_and_goroutines
+ g.Go(func() error {
+ result, err := search(ctx, query)
+ if err == nil {
+ results[i] = result
+ }
+ return err
+ })
+ }
+ if err := g.Wait(); err != nil {
+ return nil, err
+ }
+ return results, nil
+ }
+
+ results, err := Google(context.Background(), "golang")
+ if err != nil {
+ fmt.Fprintln(os.Stderr, err)
+ return
+ }
+ for _, result := range results {
+ fmt.Println(result)
+ }
+
+ // Output:
+ // web result for "golang"
+ // image result for "golang"
+ // video result for "golang"
+}
+
+func TestZeroGroup(t *testing.T) {
+ err1 := errors.New("errgroup_test: 1")
+ err2 := errors.New("errgroup_test: 2")
+
+ cases := []struct {
+ errs []error
+ }{
+ {errs: []error{}},
+ {errs: []error{nil}},
+ {errs: []error{err1}},
+ {errs: []error{err1, nil}},
+ {errs: []error{err1, nil, err2}},
+ }
+
+ for _, tc := range cases {
+ g, _ := errgroup.New(context.Background())
+
+ var firstErr error
+ for i, err := range tc.errs {
+ err := err
+ g.Go(func() error { return err })
+
+ if firstErr == nil && err != nil {
+ firstErr = err
+ }
+
+ if gErr := g.Wait(); !errors.Is(gErr, firstErr) {
+ t.Errorf("after %T.Go(func() error { return err }) for err in %v\n"+
+ "g.Wait() = %v; want %v",
+ g, tc.errs[:i+1], err, firstErr)
+ }
+ }
+ }
+}
+
+func TestWithContext(t *testing.T) {
+ errDoom := errors.New("group_test: doomed")
+
+ cases := []struct {
+ errs []error
+ want error
+ }{
+ {want: nil},
+ {errs: []error{nil}, want: nil},
+ {errs: []error{errDoom}, want: errDoom},
+ {errs: []error{errDoom, nil}, want: errDoom},
+ }
+
+ for _, tc := range cases {
+ g, ctx := errgroup.WithContext(context.Background())
+
+ for _, err := range tc.errs {
+ err := err
+ g.Go(func() error { return err })
+ }
+
+ if err := g.Wait(); err != tc.want {
+ t.Errorf("after %T.Go(func() error { return err }) for err in %v\n"+
+ "g.Wait() = %v; want %v",
+ g, tc.errs, err, tc.want)
+ }
+
+ canceled := false
+ select {
+ case <-ctx.Done():
+ canceled = true
+ default:
+ }
+ if !canceled {
+ t.Errorf("after %T.Go(func() error { return err }) for err in %v\n"+
+ "ctx.Done() was not closed",
+ g, tc.errs)
+ }
+ }
+}
+
+func TestTryGo(t *testing.T) {
+ g, _ := errgroup.New(context.Background())
+ n := 42
+ g.SetLimit(42)
+ ch := make(chan struct{})
+ fn := func() error {
+ ch <- struct{}{}
+ return nil
+ }
+ for i := 0; i < n; i++ {
+ if !g.TryGo(fn) {
+ t.Fatalf("TryGo should succeed but got fail at %d-th call.", i)
+ }
+ }
+ if g.TryGo(fn) {
+ t.Fatalf("TryGo is expected to fail but succeeded.")
+ }
+ go func() {
+ for i := 0; i < n; i++ {
+ <-ch
+ }
+ }()
+ g.Wait()
+
+ if !g.TryGo(fn) {
+ t.Fatalf("TryGo should success but got fail after all goroutines.")
+ }
+ go func() { <-ch }()
+ g.Wait()
+
+ // Switch limit.
+ g.SetLimit(1)
+ if !g.TryGo(fn) {
+ t.Fatalf("TryGo should success but got failed.")
+ }
+ if g.TryGo(fn) {
+ t.Fatalf("TryGo should fail but succeeded.")
+ }
+ go func() { <-ch }()
+ g.Wait()
+
+ // Block all calls.
+ g.SetLimit(0)
+ for i := 0; i < 1<<10; i++ {
+ if g.TryGo(fn) {
+ t.Fatalf("TryGo should fail but got succeded.")
+ }
+ }
+ g.Wait()
+}
+
+func TestGoLimit(t *testing.T) {
+ const limit = 10
+
+ g, _ := errgroup.New(context.Background())
+ g.SetLimit(limit)
+ var active int32
+ for i := 0; i <= 1<<10; i++ {
+ g.Go(func() error {
+ n := atomic.AddInt32(&active, 1)
+ if n > limit {
+ return fmt.Errorf("saw %d active goroutines; want ≤ %d", n, limit)
+ }
+ time.Sleep(1 * time.Microsecond) // Give other goroutines a chance to increment active.
+ atomic.AddInt32(&active, -1)
+ return nil
+ })
+ }
+ if err := g.Wait(); err != nil {
+ t.Fatal(err)
+ }
+}
+
+func BenchmarkGo(b *testing.B) {
+ fn := func() {}
+ g, _ := errgroup.New(context.Background())
+ b.ResetTimer()
+ b.ReportAllocs()
+ for i := 0; i < b.N; i++ {
+ g.Go(func() error { fn(); return nil })
+ }
+ g.Wait()
+}
diff --git a/internal/sync/errgroup/group.go b/internal/sync/errgroup/group.go
new file mode 100644
index 00000000000..7a4850c051f
--- /dev/null
+++ b/internal/sync/errgroup/group.go
@@ -0,0 +1,220 @@
+//
+// Copyright (C) 2019-2023 vdaas.org vald team
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+// Package errgroup provides server global wait group for graceful kill all goroutine
+package errgroup
+
+import (
+ "context"
+ "runtime"
+
+ "github.com/vdaas/vald/internal/sync"
+
+ "github.com/vdaas/vald/internal/errors"
+ "github.com/vdaas/vald/internal/sync/semaphore"
+)
+
+// A Group is a collection of goroutines working on subtasks that are part of
+// the same overall task.
+//
+// A zero Group is valid, has no limit on the number of active goroutines,
+// and does not cancel on error.
+type Group interface {
+ Go(func() error)
+ SetLimit(limit int)
+ TryGo(func() error) bool
+ Wait() error
+}
+
+type group struct {
+ egctx context.Context
+ cancel context.CancelCauseFunc
+
+ wg sync.WaitGroup
+
+ sem *semaphore.Weighted
+
+ cancelOnce sync.Once
+ mu sync.RWMutex
+ emap map[string]struct{}
+ errs []error
+}
+
+var (
+ instance Group
+ once sync.Once
+)
+
+func New(ctx context.Context) (Group, context.Context) {
+ g := &group{emap: make(map[string]struct{})}
+ g.egctx, g.cancel = context.WithCancelCause(ctx)
+ return g, g.egctx
+}
+
+// WithContext returns a new Group and an associated Context derived from ctx.
+//
+// The derived Context is canceled the first time a function passed to Go
+// returns a non-nil error or the first time Wait returns, whichever occurs
+// first.
+func WithContext(ctx context.Context) (Group, context.Context) {
+ return New(ctx)
+}
+
+func Init(ctx context.Context) (egctx context.Context) {
+ egctx = ctx
+ once.Do(func() {
+ instance, egctx = New(ctx)
+ })
+ return
+}
+
+func Get() Group {
+ if instance == nil {
+ Init(context.Background())
+ }
+ return instance
+}
+
+func Go(f func() error) {
+ instance.Go(f)
+}
+
+func TryGo(f func() error) bool {
+ return instance.TryGo(f)
+}
+
+// SetLimit limits the number of active goroutines in this group to at most n.
+// A negative value indicates no limit.
+//
+// Any subsequent call to the Go method will block until it can add an active
+// goroutine without exceeding the configured limit.
+//
+// The limit must not be modified while any goroutines in the group are active.
+func (g *group) SetLimit(limit int) {
+ if limit < 0 {
+ g.sem = nil
+ return
+ }
+
+ if g.sem == nil {
+ g.sem = semaphore.NewWeighted(int64(limit))
+ } else {
+ g.sem.Resize(int64(limit))
+ }
+}
+
+// Go calls the given function in a new goroutine.
+// It blocks until the new goroutine can be added without the number of
+// active goroutines in the group exceeding the configured limit.
+//
+// The first call to return a non-nil error cancels the group's context, if the
+// group was created by calling WithContext. The error will be returned by Wait.
+func (g *group) Go(f func() error) {
+ if f == nil {
+ return
+ }
+ if g.sem != nil {
+ err := g.sem.Acquire(g.egctx, 1)
+ if err != nil {
+ if !errors.Is(err, context.Canceled) &&
+ !errors.Is(err, context.DeadlineExceeded) {
+ g.appendErr(err)
+ }
+ return
+ }
+ }
+ g.run(f)
+}
+
+// TryGo calls the given function in a new goroutine only if the number of
+// active goroutines in the group is currently below the configured limit.
+//
+// The return value reports whether the goroutine was started.
+func (g *group) TryGo(f func() error) bool {
+ if f == nil {
+ return false
+ }
+ if g.sem != nil && !g.sem.TryAcquire(1) {
+ return false
+ }
+ g.run(f)
+ return true
+}
+
+func (g *group) run(f func() error) {
+ g.wg.Add(1)
+ go func() {
+ defer g.done()
+ err := f()
+ if err != nil {
+ if !errors.Is(err, context.Canceled) &&
+ !errors.Is(err, context.DeadlineExceeded) {
+ runtime.Gosched()
+ g.appendErr(err)
+ }
+ g.doCancel(err)
+ return
+ }
+ }()
+}
+
+func (g *group) appendErr(err error) {
+ g.mu.RLock()
+ _, ok := g.emap[err.Error()]
+ g.mu.RUnlock()
+ if !ok {
+ g.mu.Lock()
+ g.errs = append(g.errs, err)
+ g.emap[err.Error()] = struct{}{}
+ g.mu.Unlock()
+ }
+}
+
+func (g *group) done() {
+ defer g.wg.Done()
+ if g.sem != nil {
+ g.sem.Release(1)
+ }
+}
+
+func (g *group) doCancel(err error) {
+ g.cancelOnce.Do(func() {
+ if g.cancel != nil {
+ g.cancel(err)
+ }
+ })
+}
+
+func Wait() error {
+ return instance.Wait()
+}
+
+// Wait blocks until all function calls from the Go method have returned, then
+// returns the first non-nil error (if any) from them.
+func (g *group) Wait() (err error) {
+ g.wg.Wait()
+ g.doCancel(context.Canceled)
+ g.mu.RLock()
+ defer g.mu.RUnlock()
+ switch len(g.errs) {
+ case 0:
+ return nil
+ case 1:
+ return g.errs[0]
+ default:
+ return errors.Join(g.errs...)
+ }
+}
diff --git a/internal/errgroup/group_test.go b/internal/sync/errgroup/group_test.go
similarity index 86%
rename from internal/errgroup/group_test.go
rename to internal/sync/errgroup/group_test.go
index f4d89cc29fc..8b656d4785d 100644
--- a/internal/errgroup/group_test.go
+++ b/internal/sync/errgroup/group_test.go
@@ -21,7 +21,6 @@ import (
"context"
"reflect"
"runtime"
- "sync"
"sync/atomic"
"testing"
"time"
@@ -29,6 +28,8 @@ import (
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/log/logger"
+ "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/semaphore"
"github.com/vdaas/vald/internal/test/goleak"
)
@@ -54,9 +55,7 @@ func TestNew(t *testing.T) {
afterFunc func(*testing.T, args)
}
defaultCheckFunc := func(w want, got Group, got1 context.Context) error {
- if got, want := got.(*group), w.want.(*group); !reflect.DeepEqual(got.emap, want.emap) &&
- !reflect.DeepEqual(got.enableLimitation, want.enableLimitation) &&
- got.cancel != nil {
+ if got, want := got.(*group), w.want.(*group); !reflect.DeepEqual(got.emap, want.emap) && got.cancel != nil {
return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want)
}
if !reflect.DeepEqual(got1, w.want1) {
@@ -67,7 +66,7 @@ func TestNew(t *testing.T) {
tests := []test{
func() test {
ctx := context.Background()
- egctx, cancel := context.WithCancel(ctx)
+ egctx, cancel := context.WithCancelCause(ctx)
return test{
name: "returns (g, ctx)",
@@ -78,11 +77,7 @@ func TestNew(t *testing.T) {
want: &group{
egctx: egctx,
cancel: cancel,
- enableLimitation: func() (el atomic.Bool) {
- el.Store(false)
- return
- }(),
- emap: make(map[string]struct{}),
+ emap: make(map[string]struct{}),
},
want1: egctx,
},
@@ -142,7 +137,7 @@ func TestInit(t *testing.T) {
tests := []test{
func() test {
ctx := context.Background()
- egctx, cancel := context.WithCancel(ctx)
+ egctx, cancel := context.WithCancelCause(ctx)
return test{
name: "returns egctx when once.Do is called",
@@ -154,7 +149,7 @@ func TestInit(t *testing.T) {
},
afterFunc: func(t *testing.T, a args) {
t.Helper()
- cancel()
+ cancel(context.Canceled)
defaultBeforeFunc(a)
},
}
@@ -217,7 +212,7 @@ func TestGet(t *testing.T) {
tests := []test{
func() test {
ctx := context.Background()
- egctx, cancel := context.WithCancel(ctx)
+ egctx, cancel := context.WithCancelCause(ctx)
return test{
name: "returns instance when instance is nil",
@@ -302,7 +297,6 @@ func TestGo(t *testing.T) {
beforeFunc: func(t *testing.T, _ args) {
t.Helper()
g := new(group)
- g.enableLimitation.Store(false)
instance = g
},
checkFunc: func(got Group) error {
@@ -341,13 +335,12 @@ func TestGo(t *testing.T) {
}
}
-func Test_group_Limitation(t *testing.T) {
+func Test_group_SetLimit(t *testing.T) {
type args struct {
limit int
}
type fields struct {
- limitation chan struct{}
- enableLimitation atomic.Bool
+ sem *semaphore.Weighted
}
type want struct {
want Group
@@ -363,27 +356,29 @@ func Test_group_Limitation(t *testing.T) {
}
defaultCheckFunc := func(w want, g Group) error {
got, want := g.(*group), w.want.(*group)
- if !reflect.DeepEqual(got.enableLimitation, want.enableLimitation) {
- return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want)
- }
- if got.limitation != nil && want.limitation != nil {
- return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", got, w.want)
+ if (got.sem == nil) != (want.sem == nil) {
+ return errors.Errorf("got: \"%#v\",\n\t\t\twant: \"%#v\"", got, w.want)
}
return nil
}
tests := []test{
{
- name: "set disable when limit is 0",
+ name: "set disable when limit is -1",
+ args: args{
+ limit: -1,
+ },
+ want: want{
+ want: &group{},
+ },
+ },
+ {
+ name: "set enable but block all acquireings when limit is 0",
args: args{
limit: 0,
},
want: want{
want: &group{
- enableLimitation: func() atomic.Bool {
- var el atomic.Bool
- el.Store(false)
- return el
- }(),
+ sem: semaphore.NewWeighted(0),
},
},
},
@@ -393,16 +388,10 @@ func Test_group_Limitation(t *testing.T) {
args: args{
limit: 1,
},
- fields: fields{
- limitation: make(chan struct{}, 1),
- },
+ fields: fields{},
want: want{
want: &group{
- enableLimitation: func() atomic.Bool {
- var el atomic.Bool
- el.Store(true)
- return el
- }(),
+ sem: semaphore.NewWeighted(1),
},
},
},
@@ -421,12 +410,9 @@ func Test_group_Limitation(t *testing.T) {
if test.checkFunc == nil {
checkFunc = defaultCheckFunc
}
- g := &group{
- limitation: test.fields.limitation,
- enableLimitation: test.fields.enableLimitation,
- }
+ g := &group{}
- g.Limitation(test.args.limit)
+ g.SetLimit(test.args.limit)
if err := checkFunc(test.want, g); err != nil {
tt.Errorf("error = %v", err)
}
@@ -439,11 +425,10 @@ func Test_group_Go(t *testing.T) {
f func() error
}
type fields struct {
- egctx context.Context
- cancel context.CancelFunc
- limitation chan struct{}
- enableLimitation atomic.Bool
- emap map[string]struct{}
+ egctx context.Context
+ cancel context.CancelCauseFunc
+ sem *semaphore.Weighted
+ emap map[string]struct{}
}
type test struct {
name string
@@ -460,7 +445,7 @@ func Test_group_Go(t *testing.T) {
func() test {
var calledCnt int32
- egctx, cancel := context.WithCancel(context.Background())
+ egctx, cancel := context.WithCancelCause(context.Background())
limit := 3
@@ -473,12 +458,8 @@ func Test_group_Go(t *testing.T) {
},
},
fields: fields{
- egctx: egctx,
- limitation: make(chan struct{}, limit),
- enableLimitation: func() (el atomic.Bool) {
- el.Store(true)
- return
- }(),
+ egctx: egctx,
+ sem: semaphore.NewWeighted(int64(limit)),
},
beforeFunc: func(t *testing.T, _ args, g Group) {
t.Helper()
@@ -489,10 +470,9 @@ func Test_group_Go(t *testing.T) {
})
}
time.Sleep(time.Second)
+ cancel(context.Canceled)
},
checkFunc: func(got Group) error {
- cancel()
-
if err := got.Wait(); err != nil {
return err
}
@@ -508,7 +488,7 @@ func Test_group_Go(t *testing.T) {
func() test {
var calledCnt int32
- egctx, cancel := context.WithCancel(context.Background())
+ egctx, cancel := context.WithCancelCause(context.Background())
return test{
name: "f is called but f returns error and previous process also returns error",
@@ -521,11 +501,7 @@ func Test_group_Go(t *testing.T) {
fields: fields{
egctx: egctx,
cancel: cancel,
- enableLimitation: func() (el atomic.Bool) {
- el.Store(false)
- return
- }(),
- emap: make(map[string]struct{}),
+ emap: make(map[string]struct{}),
},
beforeFunc: func(t *testing.T, a args, g Group) {
t.Helper()
@@ -569,11 +545,10 @@ func Test_group_Go(t *testing.T) {
}
g := &group{
- egctx: test.fields.egctx,
- cancel: test.fields.cancel,
- limitation: test.fields.limitation,
- enableLimitation: test.fields.enableLimitation,
- emap: test.fields.emap,
+ egctx: test.fields.egctx,
+ cancel: test.fields.cancel,
+ sem: test.fields.sem,
+ emap: test.fields.emap,
}
if test.beforeFunc != nil {
@@ -590,7 +565,7 @@ func Test_group_Go(t *testing.T) {
func Test_group_doCancel(t *testing.T) {
type fields struct {
- cancel context.CancelFunc
+ cancel context.CancelCauseFunc
}
type test struct {
name string
@@ -609,7 +584,7 @@ func Test_group_doCancel(t *testing.T) {
return test{
name: "g.cancel is called when g.cancel is not nil",
fields: fields{
- cancel: func() {
+ cancel: func(err error) {
called = true
},
},
@@ -640,7 +615,7 @@ func Test_group_doCancel(t *testing.T) {
cancel: test.fields.cancel,
}
- g.doCancel()
+ g.doCancel(context.Canceled)
if err := checkFunc(); err != nil {
tt.Errorf("error = %v", err)
}
@@ -704,9 +679,8 @@ func TestWait(t *testing.T) {
func Test_group_Wait(t *testing.T) {
type fields struct {
- limitation chan struct{}
- enableLimitation atomic.Bool
- errs []error
+ sem *semaphore.Weighted
+ errs []error
}
type want struct {
err error
@@ -729,13 +703,8 @@ func Test_group_Wait(t *testing.T) {
func() test {
var num int32
return test{
- name: "returns nil after all goroutne returns",
- fields: fields{
- enableLimitation: func() (el atomic.Bool) {
- el.Store(false)
- return
- }(),
- },
+ name: "returns nil after all goroutne returns",
+ fields: fields{},
beforeFunc: func(t *testing.T, g Group) {
t.Helper()
g.Go(func() error {
@@ -782,9 +751,8 @@ func Test_group_Wait(t *testing.T) {
checkFunc = defaultCheckFunc
}
g := &group{
- limitation: test.fields.limitation,
- errs: test.fields.errs,
- enableLimitation: test.fields.enableLimitation,
+ sem: test.fields.sem,
+ errs: test.fields.errs,
}
if test.beforeFunc != nil {
@@ -801,10 +769,10 @@ func Test_group_Wait(t *testing.T) {
// NOT IMPLEMENTED BELOW
//
-// func Test_group_closeLimitation(t *testing.T) {
+// func Test_group_semClose(t *testing.T) {
// type fields struct {
// egctx context.Context
-// cancel context.CancelFunc
+// cancel context.CancelCauseFunc
// limitation chan struct{}
// enableLimitation atomic.Bool
// emap map[string]struct{}
@@ -901,7 +869,7 @@ func Test_group_Wait(t *testing.T) {
// err: test.fields.err,
// }
//
-// g.closeLimitation()
+// g.semClose()
// if err := checkFunc(test.want); err != nil {
// tt.Errorf("error = %v", err)
// }
diff --git a/internal/sync/semaphore/semaphore.go b/internal/sync/semaphore/semaphore.go
new file mode 100644
index 00000000000..6a17a493a1d
--- /dev/null
+++ b/internal/sync/semaphore/semaphore.go
@@ -0,0 +1,173 @@
+//
+// Copyright (c) 2009-2023 The Go Authors. All rights resered.
+// Modified by vdaas.org vald team
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+
+// Package semaphore provides a weighted semaphore implementation.
+package semaphore // import "golang.org/x/sync/semaphore"
+
+import (
+ "container/list"
+ "context"
+
+ "github.com/vdaas/vald/internal/sync"
+)
+
+type waiter struct {
+ n int64
+ ready chan<- struct{} // Closed when semaphore acquired.
+}
+
+// NewWeighted creates a new weighted semaphore with the given
+// maximum combined weight for concurrent access.
+func NewWeighted(n int64) *Weighted {
+ w := &Weighted{size: n}
+ return w
+}
+
+// Weighted provides a way to bound concurrent access to a resource.
+// The callers can request access with a given weight.
+type Weighted struct {
+ size int64
+ cur int64
+ mu sync.Mutex
+ waiters list.List
+}
+
+// Acquire acquires the semaphore with a weight of n, blocking until resources
+// are available or ctx is done. On success, returns nil. On failure, returns
+// ctx.Err() and leaves the semaphore unchanged.
+//
+// If ctx is already done, Acquire may still succeed without blocking.
+func (s *Weighted) Acquire(ctx context.Context, n int64) error {
+ s.mu.Lock()
+ if s.size-s.cur >= n && s.waiters.Len() == 0 {
+ s.cur += n
+ s.mu.Unlock()
+ return nil
+ }
+
+ if n > s.size {
+ // Don't make other Acquire calls block on one that's doomed to fail.
+ s.mu.Unlock()
+ <-ctx.Done()
+ return ctx.Err()
+ }
+
+ ready := make(chan struct{})
+ w := waiter{n: n, ready: ready}
+ elem := s.waiters.PushBack(w)
+ s.mu.Unlock()
+
+ select {
+ case <-ctx.Done():
+ err := ctx.Err()
+ s.mu.Lock()
+ select {
+ case <-ready:
+ // Acquired the semaphore after we were canceled. Rather than trying to
+ // fix up the queue, just pretend we didn't notice the cancelation.
+ err = nil
+ default:
+ isFront := s.waiters.Front() == elem
+ s.waiters.Remove(elem)
+ // If we're at the front and there're extra tokens left, notify other waiters.
+ if isFront && s.size > s.cur {
+ s.notifyWaiters()
+ }
+ }
+ s.mu.Unlock()
+ return err
+
+ case <-ready:
+ return nil
+ }
+}
+
+// TryAcquire acquires the semaphore with a weight of n without blocking.
+// On success, returns true. On failure, returns false and leaves the semaphore unchanged.
+func (s *Weighted) TryAcquire(n int64) bool {
+ s.mu.Lock()
+ success := s.size-s.cur >= n && s.waiters.Len() == 0
+ if success {
+ s.cur += n
+ }
+ s.mu.Unlock()
+ return success
+}
+
+// Release releases the semaphore with a weight of n.
+func (s *Weighted) Release(n int64) {
+ s.mu.Lock()
+ s.cur -= n
+ if s.cur < 0 {
+ s.mu.Unlock()
+ panic("semaphore: released more than held")
+ }
+ s.notifyWaiters()
+ s.mu.Unlock()
+}
+
+func (s *Weighted) Resize(n int64) {
+ if n < 0 {
+ n = 0
+ }
+ s.mu.Lock()
+ s.size = n
+ s.mu.Unlock()
+}
+
+func (s *Weighted) notifyWaiters() {
+ for {
+ next := s.waiters.Front()
+ if next == nil {
+ break // No more waiters blocked.
+ }
+
+ w := next.Value.(waiter)
+ if s.size-s.cur < w.n {
+ // 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
+ // blocked.
+ //
+ // Consider a semaphore used as a read-write lock, with N tokens, N
+ // readers, and one writer. Each reader can Acquire(1) to obtain a read
+ // lock. The writer can Acquire(N) to obtain a write lock, excluding all
+ // of the readers. If we allow the readers to jump ahead in the queue,
+ // the writer will starve — there is always one token available for every
+ // reader.
+ break
+ }
+
+ s.cur += w.n
+ s.waiters.Remove(next)
+ close(w.ready)
+ }
+}
diff --git a/internal/sync/semaphore/semaphore_bench_test.go b/internal/sync/semaphore/semaphore_bench_test.go
new file mode 100644
index 00000000000..c1f00634e73
--- /dev/null
+++ b/internal/sync/semaphore/semaphore_bench_test.go
@@ -0,0 +1,159 @@
+//
+// Copyright (c) 2009-2023 The Go Authors. All rights resered.
+// Modified by vdaas.org vald team
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+
+//go:build go1.7
+// +build go1.7
+
+package semaphore_test
+
+import (
+ "context"
+ "fmt"
+ "testing"
+
+ "golang.org/x/sync/semaphore"
+)
+
+// weighted is an interface matching a subset of *Weighted. It allows
+// alternate implementations for testing and benchmarking.
+type weighted interface {
+ Acquire(context.Context, int64) error
+ TryAcquire(int64) bool
+ Release(int64)
+}
+
+// semChan implements Weighted using a channel for
+// comparing against the condition variable-based implementation.
+type semChan chan struct{}
+
+func newSemChan(n int64) semChan {
+ return semChan(make(chan struct{}, n))
+}
+
+func (s semChan) Acquire(_ context.Context, n int64) error {
+ for i := int64(0); i < n; i++ {
+ s <- struct{}{}
+ }
+ return nil
+}
+
+func (s semChan) TryAcquire(n int64) bool {
+ if int64(len(s))+n > int64(cap(s)) {
+ return false
+ }
+
+ for i := int64(0); i < n; i++ {
+ s <- struct{}{}
+ }
+ return true
+}
+
+func (s semChan) Release(n int64) {
+ for i := int64(0); i < n; i++ {
+ <-s
+ }
+}
+
+// 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) {
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ for j := 0; j < N; j++ {
+ sem.Acquire(context.Background(), size)
+ }
+ for j := 0; j < N; j++ {
+ sem.Release(size)
+ }
+ }
+}
+
+// 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) {
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ for j := 0; j < N; j++ {
+ if !sem.TryAcquire(size) {
+ b.Fatalf("TryAcquire(%v) = false, want true", size)
+ }
+ }
+ for j := 0; j < N; j++ {
+ sem.Release(size)
+ }
+ }
+}
+
+func BenchmarkNewSeq(b *testing.B) {
+ for _, cap := range []int64{1, 128} {
+ b.Run(fmt.Sprintf("Weighted-%d", cap), func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ _ = semaphore.NewWeighted(cap)
+ }
+ })
+ b.Run(fmt.Sprintf("semChan-%d", cap), func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ _ = newSemChan(cap)
+ }
+ })
+ }
+}
+
+func BenchmarkAcquireSeq(b *testing.B) {
+ for _, c := range []struct {
+ cap, size int64
+ N int
+ }{
+ {1, 1, 1},
+ {2, 1, 1},
+ {16, 1, 1},
+ {128, 1, 1},
+ {2, 2, 1},
+ {16, 2, 8},
+ {128, 2, 64},
+ {2, 1, 2},
+ {16, 8, 2},
+ {128, 64, 2},
+ } {
+ for _, w := range []struct {
+ name string
+ w weighted
+ }{
+ {"Weighted", semaphore.NewWeighted(c.cap)},
+ {"semChan", newSemChan(c.cap)},
+ } {
+ b.Run(fmt.Sprintf("%s-acquire-%d-%d-%d", w.name, c.cap, c.size, c.N), func(b *testing.B) {
+ acquireN(b, w.w, c.size, c.N)
+ })
+ b.Run(fmt.Sprintf("%s-tryAcquire-%d-%d-%d", w.name, c.cap, c.size, c.N), func(b *testing.B) {
+ tryAcquireN(b, w.w, c.size, c.N)
+ })
+ }
+ }
+}
diff --git a/internal/sync/semaphore/semaphore_example_test.go b/internal/sync/semaphore/semaphore_example_test.go
new file mode 100644
index 00000000000..c31eeffc065
--- /dev/null
+++ b/internal/sync/semaphore/semaphore_example_test.go
@@ -0,0 +1,111 @@
+//
+// Copyright (c) 2009-2023 The Go Authors. All rights resered.
+// Modified by vdaas.org vald team
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+
+package semaphore_test
+
+import (
+ "context"
+ "fmt"
+ "log"
+ "runtime"
+
+ "golang.org/x/sync/semaphore"
+)
+
+// Example_workerPool demonstrates how to use a semaphore to limit the number of
+// goroutines working on parallel tasks.
+//
+// This use of a semaphore mimics a typical “worker pool” pattern, but without
+// the need to explicitly shut down idle workers when the work is done.
+func Example_workerPool() {
+ ctx := context.TODO()
+
+ var (
+ maxWorkers = runtime.GOMAXPROCS(0)
+ sem = semaphore.NewWeighted(int64(maxWorkers))
+ out = make([]int, 32)
+ )
+
+ // Compute the output using up to maxWorkers goroutines at a time.
+ for i := range out {
+ // When maxWorkers goroutines are in flight, Acquire blocks until one of the
+ // workers finishes.
+ if err := sem.Acquire(ctx, 1); err != nil {
+ log.Printf("Failed to acquire semaphore: %v", err)
+ break
+ }
+
+ go func(i int) {
+ defer sem.Release(1)
+ out[i] = collatzSteps(i + 1)
+ }(i)
+ }
+
+ // Acquire all of the tokens to wait for any remaining workers to finish.
+ //
+ // If you are already waiting for the workers by some other means (such as an
+ // errgroup.Group), you can omit this final Acquire call.
+ if err := sem.Acquire(ctx, int64(maxWorkers)); err != nil {
+ log.Printf("Failed to acquire semaphore: %v", err)
+ }
+
+ fmt.Println(out)
+
+ // Output:
+ // [0 1 7 2 5 8 16 3 19 6 14 9 9 17 17 4 12 20 20 7 7 15 15 10 23 10 111 18 18 18 106 5]
+}
+
+// collatzSteps computes the number of steps to reach 1 under the Collatz
+// conjecture. (See https://en.wikipedia.org/wiki/Collatz_conjecture.)
+func collatzSteps(n int) (steps int) {
+ if n <= 0 {
+ panic("nonpositive input")
+ }
+
+ for ; n > 1; steps++ {
+ if steps < 0 {
+ panic("too many steps")
+ }
+
+ if n%2 == 0 {
+ n /= 2
+ continue
+ }
+
+ const maxInt = int(^uint(0) >> 1)
+ if n > (maxInt-1)/3 {
+ panic("overflow")
+ }
+ n = 3*n + 1
+ }
+
+ return steps
+}
diff --git a/internal/sync/semaphore/semaphore_test.go b/internal/sync/semaphore/semaphore_test.go
new file mode 100644
index 00000000000..e5c7ab54b8e
--- /dev/null
+++ b/internal/sync/semaphore/semaphore_test.go
@@ -0,0 +1,229 @@
+//
+// Copyright (c) 2009-2023 The Go Authors. All rights resered.
+// Modified by vdaas.org vald team
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+
+package semaphore_test
+
+import (
+ "context"
+ "math/rand"
+ "runtime"
+ "testing"
+ "time"
+
+ "github.com/vdaas/vald/internal/sync"
+ "golang.org/x/sync/errgroup"
+ "golang.org/x/sync/semaphore"
+)
+
+const maxSleep = 1 * time.Millisecond
+
+func HammerWeighted(sem *semaphore.Weighted, n int64, loops int) {
+ for i := 0; i < loops; i++ {
+ sem.Acquire(context.Background(), n)
+ time.Sleep(time.Duration(rand.Int63n(int64(maxSleep/time.Nanosecond))) * time.Nanosecond)
+ sem.Release(n)
+ }
+}
+
+func TestWeighted(t *testing.T) {
+ t.Parallel()
+
+ n := runtime.GOMAXPROCS(0)
+ loops := 10000 / n
+ sem := semaphore.NewWeighted(int64(n))
+ var wg sync.WaitGroup
+ wg.Add(n)
+ for i := 0; i < n; i++ {
+ i := i
+ go func() {
+ defer wg.Done()
+ HammerWeighted(sem, int64(i), loops)
+ }()
+ }
+ wg.Wait()
+}
+
+func TestWeightedPanic(t *testing.T) {
+ t.Parallel()
+
+ defer func() {
+ if recover() == nil {
+ t.Fatal("release of an unacquired weighted semaphore did not panic")
+ }
+ }()
+ w := semaphore.NewWeighted(1)
+ w.Release(1)
+}
+
+func TestWeightedTryAcquire(t *testing.T) {
+ t.Parallel()
+
+ ctx := context.Background()
+ sem := semaphore.NewWeighted(2)
+ tries := []bool{}
+ sem.Acquire(ctx, 1)
+ tries = append(tries, sem.TryAcquire(1))
+ tries = append(tries, sem.TryAcquire(1))
+
+ sem.Release(2)
+
+ tries = append(tries, sem.TryAcquire(1))
+ sem.Acquire(ctx, 1)
+ tries = append(tries, sem.TryAcquire(1))
+
+ want := []bool{true, false, true, false}
+ for i := range tries {
+ if tries[i] != want[i] {
+ t.Errorf("tries[%d]: got %t, want %t", i, tries[i], want[i])
+ }
+ }
+}
+
+func TestWeightedAcquire(t *testing.T) {
+ t.Parallel()
+
+ ctx := context.Background()
+ sem := semaphore.NewWeighted(2)
+ tryAcquire := func(n int64) bool {
+ ctx, cancel := context.WithTimeout(ctx, 10*time.Millisecond)
+ defer cancel()
+ return sem.Acquire(ctx, n) == nil
+ }
+
+ tries := []bool{}
+ sem.Acquire(ctx, 1)
+ tries = append(tries, tryAcquire(1))
+ tries = append(tries, tryAcquire(1))
+
+ sem.Release(2)
+
+ tries = append(tries, tryAcquire(1))
+ sem.Acquire(ctx, 1)
+ tries = append(tries, tryAcquire(1))
+
+ want := []bool{true, false, true, false}
+ for i := range tries {
+ if tries[i] != want[i] {
+ t.Errorf("tries[%d]: got %t, want %t", i, tries[i], want[i])
+ }
+ }
+}
+
+func TestWeightedDoesntBlockIfTooBig(t *testing.T) {
+ t.Parallel()
+
+ const n = 2
+ sem := semaphore.NewWeighted(n)
+ {
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+ go sem.Acquire(ctx, n+1)
+ }
+
+ g, ctx := errgroup.WithContext(context.Background())
+ for i := n * 3; i > 0; i-- {
+ g.Go(func() error {
+ err := sem.Acquire(ctx, 1)
+ if err == nil {
+ time.Sleep(1 * time.Millisecond)
+ sem.Release(1)
+ }
+ return err
+ })
+ }
+ if err := g.Wait(); err != nil {
+ t.Errorf("semaphore.NewWeighted(%v) failed to AcquireCtx(_, 1) with AcquireCtx(_, %v) pending", n, n+1)
+ }
+}
+
+// TestLargeAcquireDoesntStarve times out if a large call to Acquire starves.
+// Merely returning from the test function indicates success.
+func TestLargeAcquireDoesntStarve(t *testing.T) {
+ t.Parallel()
+
+ ctx := context.Background()
+ n := int64(runtime.GOMAXPROCS(0))
+ sem := semaphore.NewWeighted(n)
+ running := true
+
+ var wg sync.WaitGroup
+ wg.Add(int(n))
+ for i := n; i > 0; i-- {
+ sem.Acquire(ctx, 1)
+ go func() {
+ defer func() {
+ sem.Release(1)
+ wg.Done()
+ }()
+ for running {
+ time.Sleep(1 * time.Millisecond)
+ sem.Release(1)
+ sem.Acquire(ctx, 1)
+ }
+ }()
+ }
+
+ sem.Acquire(ctx, n)
+ running = false
+ sem.Release(n)
+ wg.Wait()
+}
+
+// translated from https://github.com/zhiqiangxu/util/blob/master/mutex/crwmutex_test.go#L43
+func TestAllocCancelDoesntStarve(t *testing.T) {
+ sem := semaphore.NewWeighted(10)
+
+ // Block off a portion of the semaphore so that Acquire(_, 10) can eventually succeed.
+ sem.Acquire(context.Background(), 1)
+
+ // In the background, Acquire(_, 10).
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+ go func() {
+ sem.Acquire(ctx, 10)
+ }()
+
+ // Wait until the Acquire(_, 10) call blocks.
+ for sem.TryAcquire(1) {
+ sem.Release(1)
+ runtime.Gosched()
+ }
+
+ // Now try to grab a read lock, and simultaneously unblock the Acquire(_, 10) call.
+ // Both Acquire calls should unblock and return, in either order.
+ go cancel()
+
+ err := sem.Acquire(context.Background(), 1)
+ if err != nil {
+ t.Fatalf("Acquire(_, 1) failed unexpectedly: %v", err)
+ }
+ sem.Release(1)
+}
diff --git a/internal/sync/singleflight/singleflight.go b/internal/sync/singleflight/singleflight.go
new file mode 100644
index 00000000000..35284122023
--- /dev/null
+++ b/internal/sync/singleflight/singleflight.go
@@ -0,0 +1,250 @@
+//
+// Copyright (c) 2009-2023 The Go Authors. All rights resered.
+// Modified by vdaas.org vald team
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+
+// Package singleflight provides a duplicate function call suppression
+// mechanism.
+package singleflight // import "golang.org/x/sync/singleflight"
+
+import (
+ "bytes"
+ "context"
+ "errors"
+ "fmt"
+ "runtime/debug"
+ "sync/atomic"
+
+ "github.com/vdaas/vald/internal/sync"
+ sync "github.com/vdaas/vald/internal/sync"
+)
+
+// errGoexit indicates the runtime.Goexit was called in
+// the user given function.
+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 {
+ value interface{}
+ stack []byte
+}
+
+// Error implements error interface.
+func (p *panicError) Error() string {
+ 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 {
+ wg sync.WaitGroup
+ flg atomic.Bool
+
+ // These fields are written once before the WaitGroup is done
+ // and are only read after the WaitGroup is done.
+ val V
+ err error
+
+ // These fields are read and written with the singleflight
+ // mutex held before the WaitGroup is done, and are read but
+ // not written after the WaitGroup is done.
+ dups uint64
+ chans []chan<- Result[V]
+
+ chmu sync.RWMutex
+}
+
+func (c call[V]) appendChans(chs ...chan<- Result[V]) {
+ c.chmu.Lock()
+ if len(c.chans) == 0 {
+ c.chans = make([]chan<- Result[V], 0, len(chs))
+ }
+ c.chans = append(c.chans, chs...)
+ c.chmu.Unlock()
+}
+
+// Group represents interface for zero time cache.
+type Group[V any] interface {
+ Do(ctx context.Context, key string, fn func(context.Context) (V, error)) (v V, shared bool, err error)
+ DoChan(ctx context.Context, key string, fn func(context.Context) (V, error)) <-chan Result[V]
+ Forget(key string)
+}
+
+// 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 {
+ m sync.Map[string, *call[V]]
+}
+
+// Result holds the results of Do, so they can be passed
+// on a channel.
+type Result[V any] struct {
+ Val V
+ Err error
+ Shared bool
+}
+
+// New returns Group implementation.
+func New[V any]() Group[V] {
+ return new(group[V])
+}
+
+// Do executes and returns the results of the given function, making
+// sure that only one execution is in-flight for a given key at a
+// time. If a duplicate comes in, the duplicate caller waits for the
+// 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) {
+ c, loaded := g.m.LoadOrStore(key, new(call[V]))
+ if loaded {
+ atomic.AddUint64(&c.dups, 1)
+ for !c.flg.Load() {
+ select {
+ case <-ctx.Done():
+ err = ctx.Err()
+ return
+ default:
+ }
+ }
+ v, err = c.val, c.err
+ return v, true, err
+ }
+ g.doCall(ctx, c, key, fn)
+ c.flg.Store(true)
+ g.m.LoadAndDelete(key)
+ return c.val, atomic.LoadUint64(&c.dups) > 0, c.err
+}
+
+// DoChan is like Do but returns a channel that will receive the
+// results when they are ready.
+//
+// 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] {
+ ch := make(chan Result[V], 1)
+ c, loaded := g.m.LoadOrStore(key, new(call[V]))
+ if loaded {
+ c.appendChans(ch)
+ atomic.AddUint64(&c.dups, 1)
+ return ch
+ }
+ c.appendChans(ch)
+ go g.doCall(ctx, c, key, fn)
+
+ return ch
+}
+
+// doCall handles the single call for a key.
+func (g *group[V]) doCall(ctx context.Context, c *call[V], key string, fn func(ctx context.Context) (V, error)) {
+ normalReturn := false
+ recovered := false
+
+ // use double-defer to distinguish panic from runtime.Goexit,
+ // more details see https://golang.org/cl/134395
+ defer func() {
+ // the given function invoked runtime.Goexit
+ if !normalReturn && !recovered {
+ c.err = errGoexit
+ }
+
+ g.Forget(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()
+ if len(c.chans) > 0 {
+ c.chmu.RUnlock()
+ go panic(e)
+ select {} // Keep this goroutine around so that it will appear in the crash dump.
+ } else {
+ c.chmu.RUnlock()
+ panic(e)
+ }
+ } else if c.err == errGoexit {
+ // Already in the process of goexit, no need to call again
+ } else {
+ // Normal return
+ c.chmu.RLock()
+ defer c.chmu.RUnlock()
+ for _, ch := range c.chans {
+ select {
+ case <-ctx.Done():
+ return
+ case ch <- Result[V]{
+ Val: c.val,
+ Err: c.err,
+ Shared: atomic.LoadUint64(&c.dups) > 0,
+ }:
+ }
+ }
+ }
+ }()
+
+ func() {
+ defer func() {
+ if !normalReturn {
+ // Ideally, we would wait to take a stack trace until we've determined
+ // whether this is a panic or a runtime.Goexit.
+ //
+ // Unfortunately, the only way we can distinguish the two is to see
+ // whether the recover stopped the goroutine from terminating, and by
+ // the time we know that, the part of the stack trace relevant to the
+ // panic has been discarded.
+ if r := recover(); r != nil {
+ c.err = newPanicError(r)
+ }
+ }
+ }()
+
+ c.val, c.err = fn(ctx)
+ normalReturn = true
+ }()
+
+ if !normalReturn {
+ recovered = true
+ }
+}
+
+// Forget tells the singleflight to forget about a key. Future calls
+// 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) {
+ g.m.LoadAndDelete(key)
+}
diff --git a/internal/singleflight/singleflight_test.go b/internal/sync/singleflight/singleflight_test.go
similarity index 96%
rename from internal/singleflight/singleflight_test.go
rename to internal/sync/singleflight/singleflight_test.go
index b283db915f2..63e7588120f 100644
--- a/internal/singleflight/singleflight_test.go
+++ b/internal/sync/singleflight/singleflight_test.go
@@ -1,5 +1,3 @@
-//go:build !race
-
//
// Copyright (C) 2019-2023 vdaas.org vald team
//
@@ -22,12 +20,12 @@ package singleflight
import (
"context"
"reflect"
- "sync"
"sync/atomic"
"testing"
"time"
"github.com/vdaas/vald/internal/errors"
+ "github.com/vdaas/vald/internal/sync"
"github.com/vdaas/vald/internal/test/goleak"
)
@@ -84,7 +82,7 @@ func Test_group_Do(t *testing.T) {
type args[V any] struct {
ctx context.Context
key string
- fn func() (V, error)
+ fn func(context.Context) (V, error)
}
type want[V any] struct {
wantV V
@@ -109,7 +107,7 @@ func Test_group_Do(t *testing.T) {
// the unparam lint rule is disabled here because we need to match the interface to singleflight implementation.
// if this rule is not disabled, if will warns that the error will always return null.
//nolint:unparam
- fn1 := func() (string, error) {
+ fn1 := func(context.Context) (string, error) {
atomic.AddUint32(&cnt1, 1)
return "res_1", nil
}
@@ -121,7 +119,7 @@ func Test_group_Do(t *testing.T) {
// the unparam lint rule is disabled here because we need to match the interface to singleflight implementation.
// if this rule is not disabled, if will warns that the error will always return null.
//nolint:unparam
- fn2 := func() (string, error) {
+ fn2 := func(context.Context) (string, error) {
atomic.AddUint32(&cnt2, 1)
return "res_2", nil
}
@@ -185,7 +183,7 @@ func Test_group_Do(t *testing.T) {
// the unparam lint rule is disabled here because we need to match the interface to singleflight implementation.
// if this rule is not disabled, if will warns that the error will always return null.
//nolint:unparam
- fn1 := func() (string, error) {
+ fn1 := func(context.Context) (string, error) {
atomic.AddUint32(&cnt1, 1)
time.Sleep(time.Millisecond * 500)
return "res_1", nil
@@ -197,7 +195,7 @@ func Test_group_Do(t *testing.T) {
// the unparam lint rule is disabled here because we need to match the interface to singleflight implementation.
// if this rule is not disabled, if will warns that the error will always return null.
//nolint:unparam
- fn2 := func() (string, error) {
+ fn2 := func(context.Context) (string, error) {
atomic.AddUint32(&cnt2, 1)
return "res_2", nil
}
diff --git a/internal/test/comparator/comparators.go b/internal/test/comparator/comparators.go
index dcfcf7fb06d..085f7903261 100644
--- a/internal/test/comparator/comparators.go
+++ b/internal/test/comparator/comparators.go
@@ -15,9 +15,9 @@ package comparator
import (
"reflect"
- "sync"
"github.com/vdaas/vald/internal/errors"
+ "github.com/vdaas/vald/internal/sync"
)
var (
diff --git a/internal/timeutil/time_test.go b/internal/timeutil/time_test.go
index 577ba2a6a95..3f343cd46d0 100644
--- a/internal/timeutil/time_test.go
+++ b/internal/timeutil/time_test.go
@@ -80,6 +80,12 @@ func TestParse(t *testing.T) {
want: 0,
wantErr: true,
},
+ {
+ name: "returns 0 and incorrect string error when t is minus value",
+ t: "-1",
+ want: 0,
+ wantErr: true,
+ },
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
diff --git a/internal/worker/queue.go b/internal/worker/queue.go
index 12fb5fc7a1c..ccdc5ef02f5 100644
--- a/internal/worker/queue.go
+++ b/internal/worker/queue.go
@@ -23,9 +23,9 @@ import (
"sync/atomic"
"time"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/safety"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
// Queue represents the interface of queue.
diff --git a/internal/worker/queue_option.go b/internal/worker/queue_option.go
index 38c031bfc33..069c06e5ca9 100644
--- a/internal/worker/queue_option.go
+++ b/internal/worker/queue_option.go
@@ -18,7 +18,7 @@
package worker
import (
- "github.com/vdaas/vald/internal/errgroup"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/timeutil"
)
diff --git a/internal/worker/queue_option_test.go b/internal/worker/queue_option_test.go
index 52e82b0a32c..fb1e13aa403 100644
--- a/internal/worker/queue_option_test.go
+++ b/internal/worker/queue_option_test.go
@@ -22,8 +22,8 @@ import (
"testing"
"time"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/goleak"
)
diff --git a/internal/worker/queue_test.go b/internal/worker/queue_test.go
index a767c94e0aa..539ff2b11fa 100644
--- a/internal/worker/queue_test.go
+++ b/internal/worker/queue_test.go
@@ -25,8 +25,8 @@ import (
"time"
"github.com/google/go-cmp/cmp"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/goleak"
)
diff --git a/internal/worker/worker.go b/internal/worker/worker.go
index 3118903071d..fad9060e895 100644
--- a/internal/worker/worker.go
+++ b/internal/worker/worker.go
@@ -22,11 +22,11 @@ import (
"reflect"
"sync/atomic"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/observability/trace"
"github.com/vdaas/vald/internal/safety"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
// JobFunc represents the function of a job that works in the worker.
@@ -133,7 +133,7 @@ func (w *worker) startJobLoop(ctx context.Context) <-chan error {
w.eg.Go(safety.RecoverFunc(func() (err error) {
defer close(ech)
eg, ctx := errgroup.New(ctx)
- eg.Limitation(w.limitation)
+ eg.SetLimit(w.limitation)
limitation := make(chan struct{}, w.limitation)
defer close(limitation)
diff --git a/internal/worker/worker_option.go b/internal/worker/worker_option.go
index b105b82b094..3ec117f7e3b 100644
--- a/internal/worker/worker_option.go
+++ b/internal/worker/worker_option.go
@@ -18,7 +18,7 @@
package worker
import (
- "github.com/vdaas/vald/internal/errgroup"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
type WorkerOption func(w *worker) error
diff --git a/internal/worker/worker_test.go b/internal/worker/worker_test.go
index 0e0e9fe18ae..575e70aa21d 100644
--- a/internal/worker/worker_test.go
+++ b/internal/worker/worker_test.go
@@ -24,10 +24,10 @@ import (
"testing"
"time"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/log/logger"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/comparator"
"github.com/vdaas/vald/internal/test/goleak"
)
diff --git a/pkg/agent/core/ngt/handler/grpc/handler.go b/pkg/agent/core/ngt/handler/grpc/handler.go
index ef041a3e251..f8b84a70bbb 100644
--- a/pkg/agent/core/ngt/handler/grpc/handler.go
+++ b/pkg/agent/core/ngt/handler/grpc/handler.go
@@ -23,9 +23,9 @@ import (
agent "github.com/vdaas/vald/apis/grpc/v1/agent/core"
"github.com/vdaas/vald/apis/grpc/v1/payload"
"github.com/vdaas/vald/apis/grpc/v1/vald"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/log"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/pkg/agent/core/ngt/service"
)
diff --git a/pkg/agent/core/ngt/handler/grpc/handler_test.go b/pkg/agent/core/ngt/handler/grpc/handler_test.go
index 17e8b6de693..266d69f87f6 100644
--- a/pkg/agent/core/ngt/handler/grpc/handler_test.go
+++ b/pkg/agent/core/ngt/handler/grpc/handler_test.go
@@ -23,10 +23,10 @@ import (
"github.com/vdaas/vald/apis/grpc/v1/payload"
"github.com/vdaas/vald/internal/config"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/info"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/log/logger"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/data/request"
"github.com/vdaas/vald/internal/test/data/vector"
"github.com/vdaas/vald/internal/test/goleak"
diff --git a/pkg/agent/core/ngt/handler/grpc/index_test.go b/pkg/agent/core/ngt/handler/grpc/index_test.go
index 66776c3e6fb..a1ffc119010 100644
--- a/pkg/agent/core/ngt/handler/grpc/index_test.go
+++ b/pkg/agent/core/ngt/handler/grpc/index_test.go
@@ -17,19 +17,19 @@ import (
"context"
"os"
"reflect"
- "sync"
"testing"
"time"
"github.com/vdaas/vald/apis/grpc/v1/payload"
"github.com/vdaas/vald/internal/config"
"github.com/vdaas/vald/internal/core/algorithm/ngt"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/file"
"github.com/vdaas/vald/internal/net"
"github.com/vdaas/vald/internal/net/grpc/codes"
"github.com/vdaas/vald/internal/net/grpc/status"
+ "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/comparator"
"github.com/vdaas/vald/internal/test/data/request"
"github.com/vdaas/vald/internal/test/data/vector"
diff --git a/pkg/agent/core/ngt/handler/grpc/insert_test.go b/pkg/agent/core/ngt/handler/grpc/insert_test.go
index 3bc376223af..757b03aac03 100644
--- a/pkg/agent/core/ngt/handler/grpc/insert_test.go
+++ b/pkg/agent/core/ngt/handler/grpc/insert_test.go
@@ -23,7 +23,6 @@ import (
"github.com/vdaas/vald/apis/grpc/v1/payload"
"github.com/vdaas/vald/internal/config"
"github.com/vdaas/vald/internal/core/algorithm/ngt"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/io"
"github.com/vdaas/vald/internal/net"
@@ -31,6 +30,7 @@ import (
"github.com/vdaas/vald/internal/net/grpc/errdetails"
"github.com/vdaas/vald/internal/net/grpc/status"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/data/request"
"github.com/vdaas/vald/internal/test/data/vector"
"github.com/vdaas/vald/internal/test/mock"
diff --git a/pkg/agent/core/ngt/handler/grpc/linear_search.go b/pkg/agent/core/ngt/handler/grpc/linear_search.go
index f26c48b5b35..554fb9d07fc 100644
--- a/pkg/agent/core/ngt/handler/grpc/linear_search.go
+++ b/pkg/agent/core/ngt/handler/grpc/linear_search.go
@@ -16,7 +16,6 @@ package grpc
import (
"context"
"fmt"
- "sync"
"github.com/vdaas/vald/apis/grpc/v1/payload"
"github.com/vdaas/vald/apis/grpc/v1/vald"
@@ -30,6 +29,7 @@ import (
"github.com/vdaas/vald/internal/observability/trace"
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync"
"go.opentelemetry.io/otel/attribute"
)
diff --git a/pkg/agent/core/ngt/handler/grpc/object_test.go b/pkg/agent/core/ngt/handler/grpc/object_test.go
index 356558583d1..327f440f06c 100644
--- a/pkg/agent/core/ngt/handler/grpc/object_test.go
+++ b/pkg/agent/core/ngt/handler/grpc/object_test.go
@@ -22,11 +22,11 @@ import (
"github.com/vdaas/vald/internal/config"
"github.com/vdaas/vald/internal/conv"
"github.com/vdaas/vald/internal/core/algorithm/ngt"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/net"
"github.com/vdaas/vald/internal/net/grpc/codes"
"github.com/vdaas/vald/internal/net/grpc/status"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/data/request"
"github.com/vdaas/vald/internal/test/data/vector"
"github.com/vdaas/vald/pkg/agent/core/ngt/service"
diff --git a/pkg/agent/core/ngt/handler/grpc/option.go b/pkg/agent/core/ngt/handler/grpc/option.go
index 10f08130ad3..165a5433d24 100644
--- a/pkg/agent/core/ngt/handler/grpc/option.go
+++ b/pkg/agent/core/ngt/handler/grpc/option.go
@@ -21,10 +21,10 @@ import (
"os"
"runtime"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/net"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/pkg/agent/core/ngt/service"
)
diff --git a/pkg/agent/core/ngt/handler/grpc/option_test.go b/pkg/agent/core/ngt/handler/grpc/option_test.go
index 9a2e39f2b37..c6c4d8652a3 100644
--- a/pkg/agent/core/ngt/handler/grpc/option_test.go
+++ b/pkg/agent/core/ngt/handler/grpc/option_test.go
@@ -22,8 +22,8 @@ import (
"testing"
"github.com/vdaas/vald/internal/config"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/pkg/agent/core/ngt/service"
)
diff --git a/pkg/agent/core/ngt/handler/grpc/remove_test.go b/pkg/agent/core/ngt/handler/grpc/remove_test.go
index 308087420f7..2b924b3a00d 100644
--- a/pkg/agent/core/ngt/handler/grpc/remove_test.go
+++ b/pkg/agent/core/ngt/handler/grpc/remove_test.go
@@ -22,10 +22,10 @@ import (
"github.com/vdaas/vald/internal/config"
"github.com/vdaas/vald/internal/conv"
"github.com/vdaas/vald/internal/core/algorithm/ngt"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/net/grpc/codes"
"github.com/vdaas/vald/internal/net/grpc/status"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/data/request"
"github.com/vdaas/vald/internal/test/data/vector"
)
diff --git a/pkg/agent/core/ngt/handler/grpc/search.go b/pkg/agent/core/ngt/handler/grpc/search.go
index 2a9c9d6fdcd..c6941f15dcf 100644
--- a/pkg/agent/core/ngt/handler/grpc/search.go
+++ b/pkg/agent/core/ngt/handler/grpc/search.go
@@ -16,7 +16,6 @@ package grpc
import (
"context"
"fmt"
- "sync"
"github.com/vdaas/vald/apis/grpc/v1/payload"
"github.com/vdaas/vald/apis/grpc/v1/vald"
@@ -30,6 +29,7 @@ import (
"github.com/vdaas/vald/internal/observability/trace"
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync"
"github.com/vdaas/vald/pkg/agent/core/ngt/model"
"go.opentelemetry.io/otel/attribute"
)
diff --git a/pkg/agent/core/ngt/handler/grpc/search_test.go b/pkg/agent/core/ngt/handler/grpc/search_test.go
index d42cb2c754d..b70f123c319 100644
--- a/pkg/agent/core/ngt/handler/grpc/search_test.go
+++ b/pkg/agent/core/ngt/handler/grpc/search_test.go
@@ -23,10 +23,10 @@ import (
"github.com/vdaas/vald/internal/config"
"github.com/vdaas/vald/internal/conv"
"github.com/vdaas/vald/internal/core/algorithm/ngt"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/net/grpc/codes"
"github.com/vdaas/vald/internal/net/grpc/status"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/data/request"
"github.com/vdaas/vald/internal/test/data/vector"
"github.com/vdaas/vald/pkg/agent/core/ngt/service"
diff --git a/pkg/agent/core/ngt/handler/grpc/update_test.go b/pkg/agent/core/ngt/handler/grpc/update_test.go
index 11935a2e9be..c0967d23cd0 100644
--- a/pkg/agent/core/ngt/handler/grpc/update_test.go
+++ b/pkg/agent/core/ngt/handler/grpc/update_test.go
@@ -22,10 +22,10 @@ import (
"github.com/vdaas/vald/internal/config"
"github.com/vdaas/vald/internal/conv"
"github.com/vdaas/vald/internal/core/algorithm/ngt"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/net/grpc/codes"
"github.com/vdaas/vald/internal/net/grpc/status"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/data/request"
"github.com/vdaas/vald/internal/test/data/vector"
)
diff --git a/pkg/agent/core/ngt/handler/grpc/upsert.go b/pkg/agent/core/ngt/handler/grpc/upsert.go
index e94849d1ff7..41c6990186a 100644
--- a/pkg/agent/core/ngt/handler/grpc/upsert.go
+++ b/pkg/agent/core/ngt/handler/grpc/upsert.go
@@ -16,7 +16,6 @@ package grpc
import (
"context"
"fmt"
- "sync"
"github.com/vdaas/vald/apis/grpc/v1/payload"
"github.com/vdaas/vald/apis/grpc/v1/vald"
@@ -30,6 +29,7 @@ import (
"github.com/vdaas/vald/internal/observability/trace"
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync"
)
func (s *server) Upsert(ctx context.Context, req *payload.Upsert_Request) (loc *payload.Object_Location, err error) {
diff --git a/pkg/agent/core/ngt/handler/grpc/upsert_test.go b/pkg/agent/core/ngt/handler/grpc/upsert_test.go
index 8f067d86494..a9b2ce37bf4 100644
--- a/pkg/agent/core/ngt/handler/grpc/upsert_test.go
+++ b/pkg/agent/core/ngt/handler/grpc/upsert_test.go
@@ -22,10 +22,10 @@ import (
"github.com/vdaas/vald/internal/config"
"github.com/vdaas/vald/internal/conv"
"github.com/vdaas/vald/internal/core/algorithm/ngt"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/net/grpc/codes"
"github.com/vdaas/vald/internal/net/grpc/status"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/data/request"
"github.com/vdaas/vald/internal/test/data/vector"
)
diff --git a/pkg/agent/core/ngt/router/option.go b/pkg/agent/core/ngt/router/option.go
index 3b437c028b5..6b62d72e567 100644
--- a/pkg/agent/core/ngt/router/option.go
+++ b/pkg/agent/core/ngt/router/option.go
@@ -18,7 +18,7 @@
package router
import (
- "github.com/vdaas/vald/internal/errgroup"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/pkg/agent/core/ngt/handler/rest"
)
diff --git a/pkg/agent/core/ngt/router/option_test.go b/pkg/agent/core/ngt/router/option_test.go
index 91076571be9..b48dc902b39 100644
--- a/pkg/agent/core/ngt/router/option_test.go
+++ b/pkg/agent/core/ngt/router/option_test.go
@@ -21,8 +21,8 @@ import (
"reflect"
"testing"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/goleak"
"github.com/vdaas/vald/pkg/agent/core/ngt/handler/rest"
)
diff --git a/pkg/agent/core/ngt/router/router.go b/pkg/agent/core/ngt/router/router.go
index 582e6431ed3..7b10891e883 100644
--- a/pkg/agent/core/ngt/router/router.go
+++ b/pkg/agent/core/ngt/router/router.go
@@ -20,9 +20,9 @@ package router
import (
"net/http"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/net/http/middleware"
"github.com/vdaas/vald/internal/net/http/routing"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/pkg/agent/core/ngt/handler/rest"
)
diff --git a/pkg/agent/core/ngt/router/router_test.go b/pkg/agent/core/ngt/router/router_test.go
index f892ee707de..d576da84cd3 100644
--- a/pkg/agent/core/ngt/router/router_test.go
+++ b/pkg/agent/core/ngt/router/router_test.go
@@ -22,9 +22,9 @@ import (
"testing"
"github.com/gorilla/mux"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/net/http/routing"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/goleak"
"github.com/vdaas/vald/pkg/agent/core/ngt/handler/rest"
)
diff --git a/pkg/agent/core/ngt/service/kvs/kvs.go b/pkg/agent/core/ngt/service/kvs/kvs.go
index 281a831a446..1aaf0697635 100644
--- a/pkg/agent/core/ngt/service/kvs/kvs.go
+++ b/pkg/agent/core/ngt/service/kvs/kvs.go
@@ -18,12 +18,12 @@ package kvs
import (
"context"
- "sync"
"sync/atomic"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/safety"
- valdsync "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync"
+ sync "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/zeebo/xxh3"
)
@@ -52,8 +52,8 @@ type ValueStructUo struct {
type bidi struct {
concurrency int
l uint64
- ou [slen]*valdsync.Map[uint32, valueStructOu]
- uo [slen]*valdsync.Map[string, ValueStructUo]
+ ou [slen]*sync.Map[uint32, valueStructOu]
+ uo [slen]*sync.Map[string, ValueStructUo]
eg errgroup.Group
}
@@ -76,8 +76,8 @@ func New(opts ...Option) BidiMap {
opt(b)
}
for i := range b.ou {
- b.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- b.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ b.ou[i] = new(sync.Map[uint32, valueStructOu])
+ b.uo[i] = new(sync.Map[string, ValueStructUo])
}
if b.eg == nil {
@@ -85,7 +85,7 @@ func New(opts ...Option) BidiMap {
}
if b.concurrency > 0 {
- b.eg.Limitation(b.concurrency)
+ b.eg.SetLimit(b.concurrency)
}
return b
diff --git a/pkg/agent/core/ngt/service/kvs/kvs_test.go b/pkg/agent/core/ngt/service/kvs/kvs_test.go
index 60d811ac9f9..8467c8d1113 100644
--- a/pkg/agent/core/ngt/service/kvs/kvs_test.go
+++ b/pkg/agent/core/ngt/service/kvs/kvs_test.go
@@ -21,13 +21,13 @@ import (
"math"
"reflect"
"runtime"
- "sync"
"sync/atomic"
"testing"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
- valdsync "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync"
+ sync "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/goleak"
)
@@ -52,12 +52,12 @@ func TestNew(t *testing.T) {
tests := []test{
func() test {
var (
- wantOu [slen]*valdsync.Map[uint32, valueStructOu]
- wantUo [slen]*valdsync.Map[string, ValueStructUo]
+ wantOu [slen]*sync.Map[uint32, valueStructOu]
+ wantUo [slen]*sync.Map[string, ValueStructUo]
)
for i := 0; i < slen; i++ {
- wantOu[i] = new(valdsync.Map[uint32, valueStructOu])
- wantUo[i] = new(valdsync.Map[string, ValueStructUo])
+ wantOu[i] = new(sync.Map[uint32, valueStructOu])
+ wantUo[i] = new(sync.Map[string, ValueStructUo])
}
return test{
name: "return the bidi struct",
@@ -104,8 +104,8 @@ func Test_bidi_Get(t *testing.T) {
key string
}
type fields struct {
- ou [slen]*valdsync.Map[uint32, valueStructOu]
- uo [slen]*valdsync.Map[string, ValueStructUo]
+ ou [slen]*sync.Map[uint32, valueStructOu]
+ uo [slen]*sync.Map[string, ValueStructUo]
l uint64
}
type want struct {
@@ -144,8 +144,8 @@ func Test_bidi_Get(t *testing.T) {
l: 0,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -177,8 +177,8 @@ func Test_bidi_Get(t *testing.T) {
l: 100,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -210,8 +210,8 @@ func Test_bidi_Get(t *testing.T) {
l: math.MaxUint64,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -243,8 +243,8 @@ func Test_bidi_Get(t *testing.T) {
l: 0,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -276,8 +276,8 @@ func Test_bidi_Get(t *testing.T) {
l: 0,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -307,8 +307,8 @@ func Test_bidi_Get(t *testing.T) {
l: 0,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -370,8 +370,8 @@ func Test_bidi_GetInverse(t *testing.T) {
val uint32
}
type fields struct {
- ou [slen]*valdsync.Map[uint32, valueStructOu]
- uo [slen]*valdsync.Map[string, ValueStructUo]
+ ou [slen]*sync.Map[uint32, valueStructOu]
+ uo [slen]*sync.Map[string, ValueStructUo]
l uint64
}
type want struct {
@@ -410,8 +410,8 @@ func Test_bidi_GetInverse(t *testing.T) {
l: 0,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -443,8 +443,8 @@ func Test_bidi_GetInverse(t *testing.T) {
l: 100,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -476,8 +476,8 @@ func Test_bidi_GetInverse(t *testing.T) {
l: math.MaxUint64,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -509,8 +509,8 @@ func Test_bidi_GetInverse(t *testing.T) {
l: 0,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -542,8 +542,8 @@ func Test_bidi_GetInverse(t *testing.T) {
l: 0,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -573,8 +573,8 @@ func Test_bidi_GetInverse(t *testing.T) {
l: 0,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -639,8 +639,8 @@ func Test_bidi_Set(t *testing.T) {
ts int64
}
type fields struct {
- ou [slen]*valdsync.Map[uint32, valueStructOu]
- uo [slen]*valdsync.Map[string, ValueStructUo]
+ ou [slen]*sync.Map[uint32, valueStructOu]
+ uo [slen]*sync.Map[string, ValueStructUo]
l uint64
}
type want struct {
@@ -687,8 +687,8 @@ func Test_bidi_Set(t *testing.T) {
l: 0,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -718,8 +718,8 @@ func Test_bidi_Set(t *testing.T) {
l: 100,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -749,8 +749,8 @@ func Test_bidi_Set(t *testing.T) {
l: math.MaxUint64,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -780,8 +780,8 @@ func Test_bidi_Set(t *testing.T) {
l: 0,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -820,8 +820,8 @@ func Test_bidi_Set(t *testing.T) {
l: 0,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
key := "45637ec4-c85f-11ea-87d0"
@@ -845,8 +845,8 @@ func Test_bidi_Set(t *testing.T) {
l: 0,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var val uint32 = 14438
@@ -869,8 +869,8 @@ func Test_bidi_Set(t *testing.T) {
l: 0,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
return test{
@@ -922,8 +922,8 @@ func Test_bidi_Delete(t *testing.T) {
key string
}
type fields struct {
- ou [slen]*valdsync.Map[uint32, valueStructOu]
- uo [slen]*valdsync.Map[string, ValueStructUo]
+ ou [slen]*sync.Map[uint32, valueStructOu]
+ uo [slen]*sync.Map[string, ValueStructUo]
l uint64
}
type want struct {
@@ -955,8 +955,8 @@ func Test_bidi_Delete(t *testing.T) {
l: 0,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -1002,8 +1002,8 @@ func Test_bidi_Delete(t *testing.T) {
l: 100,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -1049,8 +1049,8 @@ func Test_bidi_Delete(t *testing.T) {
l: math.MaxUint64,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -1096,8 +1096,8 @@ func Test_bidi_Delete(t *testing.T) {
l: 0,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -1140,8 +1140,8 @@ func Test_bidi_Delete(t *testing.T) {
l: 0,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -1203,8 +1203,8 @@ func Test_bidi_DeleteInverse(t *testing.T) {
val uint32
}
type fields struct {
- ou [slen]*valdsync.Map[uint32, valueStructOu]
- uo [slen]*valdsync.Map[string, ValueStructUo]
+ ou [slen]*sync.Map[uint32, valueStructOu]
+ uo [slen]*sync.Map[string, ValueStructUo]
l uint64
}
type want struct {
@@ -1236,8 +1236,8 @@ func Test_bidi_DeleteInverse(t *testing.T) {
l: 0,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -1283,8 +1283,8 @@ func Test_bidi_DeleteInverse(t *testing.T) {
l: 100,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -1330,8 +1330,8 @@ func Test_bidi_DeleteInverse(t *testing.T) {
l: math.MaxUint64,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -1377,8 +1377,8 @@ func Test_bidi_DeleteInverse(t *testing.T) {
l: 0,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -1421,8 +1421,8 @@ func Test_bidi_DeleteInverse(t *testing.T) {
l: 0,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -1485,8 +1485,8 @@ func Test_bidi_Range(t *testing.T) {
f func(string, uint32, int64) bool
}
type fields struct {
- ou [slen]*valdsync.Map[uint32, valueStructOu]
- uo [slen]*valdsync.Map[string, ValueStructUo]
+ ou [slen]*sync.Map[uint32, valueStructOu]
+ uo [slen]*sync.Map[string, ValueStructUo]
l uint64
}
type want struct {
@@ -1511,8 +1511,8 @@ func Test_bidi_Range(t *testing.T) {
l: 0,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -1563,8 +1563,8 @@ func Test_bidi_Range(t *testing.T) {
l: 100,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -1615,8 +1615,8 @@ func Test_bidi_Range(t *testing.T) {
l: math.MaxUint64,
}
for i := 0; i < slen; i++ {
- fields.ou[i] = new(valdsync.Map[uint32, valueStructOu])
- fields.uo[i] = new(valdsync.Map[string, ValueStructUo])
+ fields.ou[i] = new(sync.Map[uint32, valueStructOu])
+ fields.uo[i] = new(sync.Map[string, ValueStructUo])
}
var (
@@ -1700,8 +1700,8 @@ func Test_bidi_Range(t *testing.T) {
func Test_bidi_Len(t *testing.T) {
t.Parallel()
type fields struct {
- ou [slen]*valdsync.Map[uint32, valueStructOu]
- uo [slen]*valdsync.Map[string, ValueStructUo]
+ ou [slen]*sync.Map[uint32, valueStructOu]
+ uo [slen]*sync.Map[string, ValueStructUo]
l uint64
}
type want struct {
diff --git a/pkg/agent/core/ngt/service/kvs/option.go b/pkg/agent/core/ngt/service/kvs/option.go
index 30eb68724de..b2a9d3dd473 100644
--- a/pkg/agent/core/ngt/service/kvs/option.go
+++ b/pkg/agent/core/ngt/service/kvs/option.go
@@ -19,7 +19,7 @@ package kvs
import (
"runtime"
- "github.com/vdaas/vald/internal/errgroup"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
// Option represents the functional option for bidi.
diff --git a/pkg/agent/core/ngt/service/ngt.go b/pkg/agent/core/ngt/service/ngt.go
index 56377b38a34..0f83e140d94 100644
--- a/pkg/agent/core/ngt/service/ngt.go
+++ b/pkg/agent/core/ngt/service/ngt.go
@@ -27,14 +27,12 @@ import (
"path/filepath"
"reflect"
"runtime"
- "sync"
"sync/atomic"
"time"
"github.com/vdaas/vald/internal/config"
"github.com/vdaas/vald/internal/conv"
core "github.com/vdaas/vald/internal/core/algorithm/ngt"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/file"
"github.com/vdaas/vald/internal/log"
@@ -42,6 +40,8 @@ import (
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/slices"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/pkg/agent/core/ngt/model"
"github.com/vdaas/vald/pkg/agent/core/ngt/service/kvs"
"github.com/vdaas/vald/pkg/agent/core/ngt/service/vqueue"
diff --git a/pkg/agent/core/ngt/service/ngt_test.go b/pkg/agent/core/ngt/service/ngt_test.go
index ab7fa069873..ea3c4f4c1a2 100644
--- a/pkg/agent/core/ngt/service/ngt_test.go
+++ b/pkg/agent/core/ngt/service/ngt_test.go
@@ -24,7 +24,6 @@ import (
"math"
"os"
"path/filepath"
- "sync"
"sync/atomic"
"testing"
"time"
@@ -34,12 +33,13 @@ import (
"github.com/vdaas/vald/internal/client/v1/client/vald"
"github.com/vdaas/vald/internal/config"
core "github.com/vdaas/vald/internal/core/algorithm/ngt"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/file"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
testdata "github.com/vdaas/vald/internal/test"
"github.com/vdaas/vald/internal/test/data/vector"
"github.com/vdaas/vald/internal/test/goleak"
diff --git a/pkg/agent/core/ngt/service/option.go b/pkg/agent/core/ngt/service/option.go
index 1d0fcfb3163..1dc4a8c574b 100644
--- a/pkg/agent/core/ngt/service/option.go
+++ b/pkg/agent/core/ngt/service/option.go
@@ -23,10 +23,10 @@ import (
"time"
core "github.com/vdaas/vald/internal/core/algorithm/ngt"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/file"
"github.com/vdaas/vald/internal/rand"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/timeutil"
)
diff --git a/pkg/agent/core/ngt/service/option_test.go b/pkg/agent/core/ngt/service/option_test.go
index 326264012d5..dbea1fff566 100644
--- a/pkg/agent/core/ngt/service/option_test.go
+++ b/pkg/agent/core/ngt/service/option_test.go
@@ -22,8 +22,8 @@ import (
"testing"
"time"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/goleak"
)
diff --git a/pkg/agent/core/ngt/service/vqueue/queue.go b/pkg/agent/core/ngt/service/vqueue/queue.go
index a63fcd1f2ec..ac3e7c41334 100644
--- a/pkg/agent/core/ngt/service/vqueue/queue.go
+++ b/pkg/agent/core/ngt/service/vqueue/queue.go
@@ -26,7 +26,7 @@ import (
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/slices"
- valdsync "github.com/vdaas/vald/internal/sync"
+ sync "github.com/vdaas/vald/internal/sync"
)
// Queue represents vector queue cache interface
@@ -43,7 +43,7 @@ type Queue interface {
}
type vqueue struct {
- il, dl valdsync.Map[string, *index]
+ il, dl sync.Map[string, *index]
ic, dc uint64
}
diff --git a/pkg/agent/core/ngt/usecase/agentd.go b/pkg/agent/core/ngt/usecase/agentd.go
index 2e198edea48..99a877d3182 100644
--- a/pkg/agent/core/ngt/usecase/agentd.go
+++ b/pkg/agent/core/ngt/usecase/agentd.go
@@ -22,7 +22,6 @@ import (
agent "github.com/vdaas/vald/apis/grpc/v1/agent/core"
vald "github.com/vdaas/vald/apis/grpc/v1/vald"
iconf "github.com/vdaas/vald/internal/config"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/net/grpc"
"github.com/vdaas/vald/internal/observability"
ngtmetrics "github.com/vdaas/vald/internal/observability/metrics/agent/core/ngt"
@@ -31,6 +30,7 @@ import (
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/servers/server"
"github.com/vdaas/vald/internal/servers/starter"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/pkg/agent/core/ngt/config"
handler "github.com/vdaas/vald/pkg/agent/core/ngt/handler/grpc"
"github.com/vdaas/vald/pkg/agent/core/ngt/handler/rest"
diff --git a/pkg/agent/sidecar/service/observer/observer.go b/pkg/agent/sidecar/service/observer/observer.go
index d7d60e1df0c..301ba59af63 100644
--- a/pkg/agent/sidecar/service/observer/observer.go
+++ b/pkg/agent/sidecar/service/observer/observer.go
@@ -24,11 +24,9 @@ import (
"os"
"path/filepath"
"reflect"
- "sync"
"syscall"
"time"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/file"
"github.com/vdaas/vald/internal/file/watch"
@@ -37,6 +35,8 @@ import (
"github.com/vdaas/vald/internal/observability/attribute"
"github.com/vdaas/vald/internal/observability/trace"
"github.com/vdaas/vald/internal/safety"
+ "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/pkg/agent/internal/metadata"
"github.com/vdaas/vald/pkg/agent/sidecar/service/storage"
)
diff --git a/pkg/agent/sidecar/service/observer/option.go b/pkg/agent/sidecar/service/observer/option.go
index 9c69d41a4f3..9e0a1cbd93c 100644
--- a/pkg/agent/sidecar/service/observer/option.go
+++ b/pkg/agent/sidecar/service/observer/option.go
@@ -18,8 +18,8 @@
package observer
import (
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/file"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/timeutil"
"github.com/vdaas/vald/pkg/agent/internal/metadata"
"github.com/vdaas/vald/pkg/agent/sidecar/service/storage"
diff --git a/pkg/agent/sidecar/service/restorer/option.go b/pkg/agent/sidecar/service/restorer/option.go
index 5d6d8cb63de..7215d571198 100644
--- a/pkg/agent/sidecar/service/restorer/option.go
+++ b/pkg/agent/sidecar/service/restorer/option.go
@@ -19,7 +19,7 @@ package restorer
import (
"github.com/vdaas/vald/internal/backoff"
- "github.com/vdaas/vald/internal/errgroup"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/pkg/agent/sidecar/service/storage"
)
diff --git a/pkg/agent/sidecar/service/restorer/restorer.go b/pkg/agent/sidecar/service/restorer/restorer.go
index ea2d6739c39..d3af05ad8a7 100644
--- a/pkg/agent/sidecar/service/restorer/restorer.go
+++ b/pkg/agent/sidecar/service/restorer/restorer.go
@@ -26,7 +26,6 @@ import (
"syscall"
"github.com/vdaas/vald/internal/backoff"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/file"
"github.com/vdaas/vald/internal/io"
@@ -34,6 +33,7 @@ import (
"github.com/vdaas/vald/internal/observability/trace"
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/pkg/agent/sidecar/service/storage"
)
diff --git a/pkg/agent/sidecar/service/storage/option.go b/pkg/agent/sidecar/service/storage/option.go
index 9e722a25164..d78e1e232db 100644
--- a/pkg/agent/sidecar/service/storage/option.go
+++ b/pkg/agent/sidecar/service/storage/option.go
@@ -22,7 +22,7 @@ import (
"github.com/vdaas/vald/internal/db/storage/blob/cloudstorage/urlopener"
"github.com/vdaas/vald/internal/db/storage/blob/s3"
"github.com/vdaas/vald/internal/db/storage/blob/s3/session"
- "github.com/vdaas/vald/internal/errgroup"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
type Option func(b *bs) error
diff --git a/pkg/agent/sidecar/service/storage/storage.go b/pkg/agent/sidecar/service/storage/storage.go
index 56b53031de5..5bcda32517f 100644
--- a/pkg/agent/sidecar/service/storage/storage.go
+++ b/pkg/agent/sidecar/service/storage/storage.go
@@ -28,9 +28,9 @@ import (
"github.com/vdaas/vald/internal/db/storage/blob/cloudstorage/urlopener"
"github.com/vdaas/vald/internal/db/storage/blob/s3"
"github.com/vdaas/vald/internal/db/storage/blob/s3/session"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/io"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
type Storage interface {
diff --git a/pkg/agent/sidecar/usecase/initcontainer/initcontainer.go b/pkg/agent/sidecar/usecase/initcontainer/initcontainer.go
index e670914921a..e153df6801a 100644
--- a/pkg/agent/sidecar/usecase/initcontainer/initcontainer.go
+++ b/pkg/agent/sidecar/usecase/initcontainer/initcontainer.go
@@ -25,7 +25,6 @@ import (
"github.com/vdaas/vald/internal/db/storage/blob/cloudstorage/urlopener"
"github.com/vdaas/vald/internal/db/storage/blob/s3"
"github.com/vdaas/vald/internal/db/storage/blob/s3/session"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/io"
"github.com/vdaas/vald/internal/log"
@@ -37,6 +36,7 @@ import (
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/servers/server"
"github.com/vdaas/vald/internal/servers/starter"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/pkg/agent/sidecar/config"
handler "github.com/vdaas/vald/pkg/agent/sidecar/handler/grpc"
"github.com/vdaas/vald/pkg/agent/sidecar/handler/rest"
diff --git a/pkg/agent/sidecar/usecase/sidecar/sidecar.go b/pkg/agent/sidecar/usecase/sidecar/sidecar.go
index 2a4bb9b2bf5..9bcdfe9cee2 100644
--- a/pkg/agent/sidecar/usecase/sidecar/sidecar.go
+++ b/pkg/agent/sidecar/usecase/sidecar/sidecar.go
@@ -25,7 +25,6 @@ import (
"github.com/vdaas/vald/internal/db/storage/blob/cloudstorage/urlopener"
"github.com/vdaas/vald/internal/db/storage/blob/s3"
"github.com/vdaas/vald/internal/db/storage/blob/s3/session"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/net"
"github.com/vdaas/vald/internal/net/grpc"
@@ -36,6 +35,7 @@ import (
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/servers/server"
"github.com/vdaas/vald/internal/servers/starter"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/pkg/agent/sidecar/config"
handler "github.com/vdaas/vald/pkg/agent/sidecar/handler/grpc"
"github.com/vdaas/vald/pkg/agent/sidecar/handler/rest"
diff --git a/pkg/discoverer/k8s/handler/grpc/handler.go b/pkg/discoverer/k8s/handler/grpc/handler.go
index da5344bd892..03250da98d4 100644
--- a/pkg/discoverer/k8s/handler/grpc/handler.go
+++ b/pkg/discoverer/k8s/handler/grpc/handler.go
@@ -28,7 +28,7 @@ import (
"github.com/vdaas/vald/internal/net/grpc/errdetails"
"github.com/vdaas/vald/internal/net/grpc/status"
"github.com/vdaas/vald/internal/observability/trace"
- "github.com/vdaas/vald/internal/singleflight"
+ "github.com/vdaas/vald/internal/sync/singleflight"
"github.com/vdaas/vald/internal/strings"
"github.com/vdaas/vald/pkg/discoverer/k8s/service"
)
diff --git a/pkg/discoverer/k8s/router/option.go b/pkg/discoverer/k8s/router/option.go
index 6565c6409b9..7eb7bfef693 100644
--- a/pkg/discoverer/k8s/router/option.go
+++ b/pkg/discoverer/k8s/router/option.go
@@ -18,7 +18,7 @@
package router
import (
- "github.com/vdaas/vald/internal/errgroup"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/pkg/discoverer/k8s/handler/rest"
)
diff --git a/pkg/discoverer/k8s/router/router.go b/pkg/discoverer/k8s/router/router.go
index 8503a504dbb..c3f727be1cf 100644
--- a/pkg/discoverer/k8s/router/router.go
+++ b/pkg/discoverer/k8s/router/router.go
@@ -20,9 +20,9 @@ package router
import (
"net/http"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/net/http/middleware"
"github.com/vdaas/vald/internal/net/http/routing"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/pkg/discoverer/k8s/handler/rest"
)
diff --git a/pkg/discoverer/k8s/service/discover.go b/pkg/discoverer/k8s/service/discover.go
index c6450f5e4a0..6c829c47229 100644
--- a/pkg/discoverer/k8s/service/discover.go
+++ b/pkg/discoverer/k8s/service/discover.go
@@ -20,13 +20,11 @@ package service
import (
"context"
"reflect"
- "sync"
"sync/atomic"
"time"
"github.com/vdaas/vald/apis/grpc/v1/payload"
"github.com/vdaas/vald/internal/config"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/k8s"
mnode "github.com/vdaas/vald/internal/k8s/metrics/node"
@@ -37,7 +35,9 @@ import (
"github.com/vdaas/vald/internal/net"
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/slices"
- valdsync "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync"
+ sync "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
type Discoverer interface {
@@ -48,10 +48,10 @@ type Discoverer interface {
type discoverer struct {
maxPods int
- nodes valdsync.Map[string, *node.Node]
- nodeMetrics valdsync.Map[string, mnode.Node]
- pods valdsync.Map[string, *[]pod.Pod]
- podMetrics valdsync.Map[string, mpod.Pod]
+ nodes sync.Map[string, *node.Node]
+ nodeMetrics sync.Map[string, mnode.Node]
+ pods sync.Map[string, *[]pod.Pod]
+ podMetrics sync.Map[string, mpod.Pod]
podsByNode atomic.Value
podsByNamespace atomic.Value
podsByName atomic.Value
diff --git a/pkg/discoverer/k8s/service/option.go b/pkg/discoverer/k8s/service/option.go
index 635bdd2f544..8174679d297 100644
--- a/pkg/discoverer/k8s/service/option.go
+++ b/pkg/discoverer/k8s/service/option.go
@@ -20,8 +20,8 @@ package service
import (
"time"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/net"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/timeutil"
)
diff --git a/pkg/discoverer/k8s/usecase/discovered.go b/pkg/discoverer/k8s/usecase/discovered.go
index fa0f0326389..9d564fa17dd 100644
--- a/pkg/discoverer/k8s/usecase/discovered.go
+++ b/pkg/discoverer/k8s/usecase/discovered.go
@@ -21,7 +21,6 @@ import (
"github.com/vdaas/vald/apis/grpc/v1/discoverer"
iconf "github.com/vdaas/vald/internal/config"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/net"
"github.com/vdaas/vald/internal/net/grpc"
@@ -32,6 +31,7 @@ import (
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/servers/server"
"github.com/vdaas/vald/internal/servers/starter"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/pkg/discoverer/k8s/config"
handler "github.com/vdaas/vald/pkg/discoverer/k8s/handler/grpc"
"github.com/vdaas/vald/pkg/discoverer/k8s/handler/rest"
diff --git a/pkg/gateway/filter/handler/grpc/handler.go b/pkg/gateway/filter/handler/grpc/handler.go
index 1edba3227dc..45ccf9da5a4 100644
--- a/pkg/gateway/filter/handler/grpc/handler.go
+++ b/pkg/gateway/filter/handler/grpc/handler.go
@@ -21,7 +21,6 @@ import (
"context"
"fmt"
"strconv"
- "sync"
"github.com/vdaas/vald/apis/grpc/v1/payload"
"github.com/vdaas/vald/apis/grpc/v1/vald"
@@ -29,7 +28,6 @@ import (
"github.com/vdaas/vald/internal/client/v1/client/filter/ingress"
client "github.com/vdaas/vald/internal/client/v1/client/vald"
"github.com/vdaas/vald/internal/core/algorithm"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/info"
"github.com/vdaas/vald/internal/log"
@@ -39,6 +37,8 @@ import (
"github.com/vdaas/vald/internal/net/grpc/status"
"github.com/vdaas/vald/internal/observability/trace"
"github.com/vdaas/vald/internal/safety"
+ "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
type server struct {
diff --git a/pkg/gateway/filter/handler/grpc/option.go b/pkg/gateway/filter/handler/grpc/option.go
index a0bd58a4e3b..f2694c09666 100644
--- a/pkg/gateway/filter/handler/grpc/option.go
+++ b/pkg/gateway/filter/handler/grpc/option.go
@@ -24,9 +24,9 @@ import (
"github.com/vdaas/vald/internal/client/v1/client/filter/egress"
"github.com/vdaas/vald/internal/client/v1/client/filter/ingress"
"github.com/vdaas/vald/internal/client/v1/client/vald"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/net"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
type Option func(*server)
diff --git a/pkg/gateway/filter/usecase/vald.go b/pkg/gateway/filter/usecase/vald.go
index 447671b99bf..88fa49372e9 100644
--- a/pkg/gateway/filter/usecase/vald.go
+++ b/pkg/gateway/filter/usecase/vald.go
@@ -23,7 +23,6 @@ import (
"github.com/vdaas/vald/internal/client/v1/client/filter/egress"
"github.com/vdaas/vald/internal/client/v1/client/filter/ingress"
client "github.com/vdaas/vald/internal/client/v1/client/vald"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/net/grpc"
"github.com/vdaas/vald/internal/observability"
@@ -34,6 +33,7 @@ import (
"github.com/vdaas/vald/internal/servers/server"
"github.com/vdaas/vald/internal/servers/starter"
"github.com/vdaas/vald/internal/slices"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/pkg/gateway/filter/config"
handler "github.com/vdaas/vald/pkg/gateway/filter/handler/grpc"
"github.com/vdaas/vald/pkg/gateway/filter/handler/rest"
diff --git a/pkg/gateway/lb/handler/grpc/aggregation.go b/pkg/gateway/lb/handler/grpc/aggregation.go
index 3779201327b..4b94c558983 100644
--- a/pkg/gateway/lb/handler/grpc/aggregation.go
+++ b/pkg/gateway/lb/handler/grpc/aggregation.go
@@ -18,13 +18,11 @@ import (
"fmt"
"math"
"math/big"
- "sync"
"sync/atomic"
"time"
"github.com/vdaas/vald/apis/grpc/v1/payload"
"github.com/vdaas/vald/apis/grpc/v1/vald"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/info"
"github.com/vdaas/vald/internal/log"
@@ -35,7 +33,9 @@ import (
"github.com/vdaas/vald/internal/observability/trace"
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/slices"
- valdsync "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync"
+ sync "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
type Aggregator interface {
@@ -366,7 +366,7 @@ type valdStdAggr struct {
dch chan DistPayload
closed atomic.Bool
maxDist atomic.Value
- visited valdsync.Map[string, any]
+ visited sync.Map[string, any]
result []*payload.Object_Distance
cancel context.CancelFunc
}
@@ -496,7 +496,7 @@ type valdPairingHeapAggr struct {
num int
ph *PairingHeap
mu sync.Mutex
- visited valdsync.Map[string, any]
+ visited sync.Map[string, any]
result []*payload.Object_Distance
}
diff --git a/pkg/gateway/lb/handler/grpc/handler.go b/pkg/gateway/lb/handler/grpc/handler.go
index 30f14f00052..2f25951b132 100644
--- a/pkg/gateway/lb/handler/grpc/handler.go
+++ b/pkg/gateway/lb/handler/grpc/handler.go
@@ -21,7 +21,6 @@ import (
"context"
"fmt"
"strconv"
- "sync"
"sync/atomic"
"time"
@@ -29,7 +28,6 @@ import (
"github.com/vdaas/vald/apis/grpc/v1/vald"
"github.com/vdaas/vald/internal/conv"
"github.com/vdaas/vald/internal/core/algorithm"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/info"
"github.com/vdaas/vald/internal/log"
@@ -42,6 +40,8 @@ import (
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/slices"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/pkg/gateway/lb/service"
)
@@ -1484,7 +1484,7 @@ func (s *server) MultiInsert(ctx context.Context, reqs *payload.Insert_MultiRequ
lmu sync.Mutex
)
eg, ectx := errgroup.New(ctx)
- eg.Limitation(s.multiConcurrency)
+ eg.SetLimit(s.multiConcurrency)
locs = &payload.Object_Locations{
Locations: make([]*payload.Object_Location, len(reqs.GetRequests())),
}
@@ -2021,7 +2021,7 @@ func (s *server) MultiUpdate(ctx context.Context, reqs *payload.Update_MultiRequ
lmu sync.Mutex
)
eg, ectx := errgroup.New(ctx)
- eg.Limitation(s.multiConcurrency)
+ eg.SetLimit(s.multiConcurrency)
locs = &payload.Object_Locations{
Locations: make([]*payload.Object_Location, len(reqs.GetRequests())),
}
@@ -2370,7 +2370,7 @@ func (s *server) MultiUpsert(ctx context.Context, reqs *payload.Upsert_MultiRequ
lmu sync.Mutex
)
eg, ectx := errgroup.New(ctx)
- eg.Limitation(s.multiConcurrency)
+ eg.SetLimit(s.multiConcurrency)
locs = &payload.Object_Locations{
Locations: make([]*payload.Object_Location, len(reqs.GetRequests())),
}
@@ -2674,7 +2674,7 @@ func (s *server) MultiRemove(ctx context.Context, reqs *payload.Remove_MultiRequ
lmu sync.Mutex
)
eg, ectx := errgroup.New(ctx)
- eg.Limitation(s.multiConcurrency)
+ eg.SetLimit(s.multiConcurrency)
locs = &payload.Object_Locations{
Locations: make([]*payload.Object_Location, len(reqs.GetRequests())),
}
diff --git a/pkg/gateway/lb/handler/grpc/option.go b/pkg/gateway/lb/handler/grpc/option.go
index d1a5d01e930..cbb0ef7f6cb 100644
--- a/pkg/gateway/lb/handler/grpc/option.go
+++ b/pkg/gateway/lb/handler/grpc/option.go
@@ -22,9 +22,9 @@ import (
"runtime"
"time"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/net"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/timeutil"
"github.com/vdaas/vald/pkg/gateway/lb/service"
)
diff --git a/pkg/gateway/lb/handler/grpc/search_benchmark_test.go b/pkg/gateway/lb/handler/grpc/search_benchmark_test.go
index 91029300878..834d9827192 100644
--- a/pkg/gateway/lb/handler/grpc/search_benchmark_test.go
+++ b/pkg/gateway/lb/handler/grpc/search_benchmark_test.go
@@ -18,15 +18,15 @@ import (
"flag"
"fmt"
"runtime"
- "sync"
"sync/atomic"
"testing"
"time"
"github.com/vdaas/vald/apis/grpc/v1/payload"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/rand"
"github.com/vdaas/vald/internal/slices"
+ "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/data/strings"
)
@@ -116,7 +116,7 @@ func doSearchWithAggregator(ctx context.Context, k, concurrency int, anew func(n
f func(ctx context.Context) *payload.Search_Response,
) (res *payload.Search_Response, err error) {
eg, ectx := errgroup.New(ctx)
- eg.Limitation(concurrency)
+ eg.SetLimit(concurrency)
aggr := anew(k, concurrency)
aggr.Start(ectx)
for i := 0; i < concurrency; i++ {
diff --git a/pkg/gateway/lb/service/gateway.go b/pkg/gateway/lb/service/gateway.go
index 1b046637e6d..ac42581a88e 100644
--- a/pkg/gateway/lb/service/gateway.go
+++ b/pkg/gateway/lb/service/gateway.go
@@ -24,11 +24,11 @@ import (
"github.com/vdaas/vald/apis/grpc/v1/vald"
"github.com/vdaas/vald/internal/client/v1/client/discoverer"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/net/grpc"
"github.com/vdaas/vald/internal/observability/trace"
- valdsync "github.com/vdaas/vald/internal/sync"
+ sync "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
type Gateway interface {
@@ -102,7 +102,7 @@ func (g *gateway) DoMulti(ctx context.Context, num int,
} else {
limit = uint32(num)
}
- var visited valdsync.Map[string, any]
+ var visited sync.Map[string, any]
err = g.client.GetClient().OrderedRange(sctx, addrs, func(ictx context.Context,
addr string,
conn *grpc.ClientConn,
diff --git a/pkg/gateway/lb/service/option.go b/pkg/gateway/lb/service/option.go
index c88d2107d95..988e7fa7322 100644
--- a/pkg/gateway/lb/service/option.go
+++ b/pkg/gateway/lb/service/option.go
@@ -19,7 +19,7 @@ package service
import (
"github.com/vdaas/vald/internal/client/v1/client/discoverer"
- "github.com/vdaas/vald/internal/errgroup"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
type Option func(g *gateway) error
diff --git a/pkg/gateway/lb/usecase/vald.go b/pkg/gateway/lb/usecase/vald.go
index baa08e94d93..e5b8abce48d 100644
--- a/pkg/gateway/lb/usecase/vald.go
+++ b/pkg/gateway/lb/usecase/vald.go
@@ -22,7 +22,6 @@ import (
"github.com/vdaas/vald/apis/grpc/v1/vald"
"github.com/vdaas/vald/internal/client/v1/client/discoverer"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/net/grpc"
"github.com/vdaas/vald/internal/observability"
backoffmetrics "github.com/vdaas/vald/internal/observability/metrics/backoff"
@@ -31,6 +30,7 @@ import (
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/servers/server"
"github.com/vdaas/vald/internal/servers/starter"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/pkg/gateway/lb/config"
handler "github.com/vdaas/vald/pkg/gateway/lb/handler/grpc"
"github.com/vdaas/vald/pkg/gateway/lb/handler/rest"
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/service/indexer.go b/pkg/manager/index/service/indexer.go
index 365db870c6f..93909facd3c 100644
--- a/pkg/manager/index/service/indexer.go
+++ b/pkg/manager/index/service/indexer.go
@@ -27,7 +27,6 @@ import (
agent "github.com/vdaas/vald/apis/grpc/v1/agent/core"
"github.com/vdaas/vald/apis/grpc/v1/payload"
"github.com/vdaas/vald/internal/client/v1/client/discoverer"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/net/grpc"
@@ -35,7 +34,8 @@ import (
"github.com/vdaas/vald/internal/net/grpc/status"
"github.com/vdaas/vald/internal/observability/trace"
"github.com/vdaas/vald/internal/safety"
- valdsync "github.com/vdaas/vald/internal/sync"
+ sync "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
)
type Indexer interface {
@@ -43,6 +43,7 @@ type Indexer interface {
NumberOfUUIDs() uint32
NumberOfUncommittedUUIDs() uint32
IsIndexing() bool
+ LoadIndexDetail() *payload.Info_Index_Detail
}
type index struct {
@@ -54,9 +55,9 @@ type index struct {
saveIndexDurationLimit time.Duration
saveIndexWaitDuration time.Duration
saveIndexTargetAddrCh chan string
- schMap valdsync.Map[string, any]
+ schMap sync.Map[string, any]
concurrency int
- indexInfos valdsync.Map[string, *payload.Info_Index_Count]
+ indexInfos sync.Map[string, *payload.Info_Index_Count]
indexing atomic.Value // bool
minUncommitted uint32
uuidsCount uint32
@@ -121,7 +122,9 @@ func (idx *index) Start(ctx context.Context) (<-chan error, error) {
ech <- err
case err = <-sech:
ech <- err
- case <-it.C:
+ case <-it.C: // index duration ticker
+ // execute CreateIndex. This execution ignores low index agent,
+ // and does not immediately execute SaveIndex.
err = idx.execute(grpc.WithGRPCMethod(ctx, "core.v1.Agent/CreateIndex"), true, false)
if err != nil {
ech <- err
@@ -129,7 +132,9 @@ func (idx *index) Start(ctx context.Context) (<-chan error, error) {
err = nil
}
it.Reset(idx.indexDuration)
- case <-itl.C:
+ case <-itl.C: // index duration limit ticker
+ // execute CreateIndex. This execution always executes CreateIndex regardless of the state of the uncommitted index,
+ // but does not immediately execute SaveIndex.
err = idx.execute(grpc.WithGRPCMethod(ctx, "core.v1.Agent/CreateIndex"), false, false)
if err != nil {
ech <- err
@@ -137,7 +142,9 @@ func (idx *index) Start(ctx context.Context) (<-chan error, error) {
err = nil
}
itl.Reset(idx.indexDurationLimit)
- case <-stl.C:
+ case <-stl.C: // save index duration limit ticker
+ // execute CreateIndex. This execution always executes CreateIndex regardless of the state of the uncommitted index,
+ // and immediately execute SaveIndex using CreateAndSaveIndex operation.
err = idx.execute(grpc.WithGRPCMethod(ctx, "core.v1.Agent/CreateAndSaveIndex"), false, true)
if err != nil {
ech <- err
@@ -162,12 +169,12 @@ func (idx *index) Start(ctx context.Context) (<-chan error, error) {
select {
case <-ctx.Done():
return
- case addr := <-idx.saveIndexTargetAddrCh:
- idx.schMap.Delete(addr)
+ case addr := <-idx.saveIndexTargetAddrCh: // this channel value send from execute func after thier CreateIndex operation when argument immediateSaving=false.
_, 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...)
})
+ idx.schMap.Delete(addr) // unlock duplicate signal sending.
if err != nil {
log.Warnf("an error occurred while calling SaveIndex of %s: %s", addr, err)
select {
@@ -198,7 +205,7 @@ func (idx *index) execute(ctx context.Context, enableLowIndexSkip, immediateSavi
idx.indexing.Store(true)
defer idx.indexing.Store(false)
addrs := idx.client.GetAddrs(ctx)
- err = idx.client.GetClient().OrderedRangeConcurrent(ctx, addrs,
+ return errors.Join(idx.client.GetClient().OrderedRangeConcurrent(ctx, addrs,
idx.concurrency,
func(ctx context.Context,
addr string, conn *grpc.ClientConn, copts ...grpc.CallOption,
@@ -227,7 +234,7 @@ func (idx *index) execute(ctx context.Context, enableLowIndexSkip, immediateSavi
log.Warnf("an error occurred while calling CreateIndex of %s: %s", addr, err)
return err
}
- _, ok := idx.schMap.Load(addr)
+ _, ok := idx.schMap.Load(addr) // prevent duplicate save index signal.
if !ok {
select {
case <-ctx.Done():
@@ -249,11 +256,7 @@ func (idx *index) execute(ctx context.Context, enableLowIndexSkip, immediateSavi
}
idx.waitForNextSaving(ctx)
return nil
- })
- if err != nil {
- return err
- }
- return idx.loadInfos(ctx)
+ }), idx.loadInfos(ctx))
}
func (idx *index) waitForNextSaving(ctx context.Context) {
@@ -276,7 +279,7 @@ func (idx *index) loadInfos(ctx context.Context) (err error) {
}()
var u, ucu uint32
- var infoMap valdsync.Map[string, *payload.Info_Index_Count]
+ var infoMap sync.Map[string, *payload.Info_Index_Count]
err = idx.client.GetClient().RangeConcurrent(ctx, len(idx.client.GetAddrs(ctx)),
func(ctx context.Context,
addr string, conn *grpc.ClientConn, copts ...grpc.CallOption,
@@ -328,3 +331,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/option.go b/pkg/manager/index/service/option.go
index a675c656efa..d10f86dbfed 100644
--- a/pkg/manager/index/service/option.go
+++ b/pkg/manager/index/service/option.go
@@ -19,7 +19,7 @@ package service
import (
"github.com/vdaas/vald/internal/client/v1/client/discoverer"
- "github.com/vdaas/vald/internal/errgroup"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/timeutil"
)
diff --git a/pkg/manager/index/usecase/indexer.go b/pkg/manager/index/usecase/indexer.go
index 11aa90054d4..9619bddec19 100644
--- a/pkg/manager/index/usecase/indexer.go
+++ b/pkg/manager/index/usecase/indexer.go
@@ -22,7 +22,6 @@ import (
"github.com/vdaas/vald/apis/grpc/v1/manager/index"
"github.com/vdaas/vald/internal/client/v1/client/discoverer"
iconf "github.com/vdaas/vald/internal/config"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/net/grpc"
"github.com/vdaas/vald/internal/observability"
backoffmetrics "github.com/vdaas/vald/internal/observability/metrics/backoff"
@@ -32,6 +31,7 @@ import (
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/servers/server"
"github.com/vdaas/vald/internal/servers/starter"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/pkg/manager/index/config"
handler "github.com/vdaas/vald/pkg/manager/index/handler/grpc"
"github.com/vdaas/vald/pkg/manager/index/handler/rest"
diff --git a/pkg/tools/cli/loadtest/service/loader.go b/pkg/tools/cli/loadtest/service/loader.go
index 216aa72a47a..be1adf71974 100644
--- a/pkg/tools/cli/loadtest/service/loader.go
+++ b/pkg/tools/cli/loadtest/service/loader.go
@@ -22,11 +22,11 @@ import (
"time"
"github.com/vdaas/vald/apis/grpc/v1/payload"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/net/grpc"
"github.com/vdaas/vald/internal/safety"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/pkg/tools/cli/loadtest/assets"
"github.com/vdaas/vald/pkg/tools/cli/loadtest/config"
)
@@ -217,7 +217,7 @@ func (l *loader) do(ctx context.Context, f func(interface{}, error), notify func
}))
err = eg.Wait()
case config.Insert, config.Search:
- eg.Limitation(l.concurrency)
+ eg.SetLimit(l.concurrency)
for {
r := l.dataProvider()
diff --git a/pkg/tools/cli/loadtest/service/loader_option.go b/pkg/tools/cli/loadtest/service/loader_option.go
index e96fc944e41..0ac342d2ad3 100644
--- a/pkg/tools/cli/loadtest/service/loader_option.go
+++ b/pkg/tools/cli/loadtest/service/loader_option.go
@@ -14,9 +14,9 @@
package service
import (
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/net/grpc"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/timeutil"
"github.com/vdaas/vald/pkg/tools/cli/loadtest/config"
)
diff --git a/pkg/tools/cli/loadtest/usecase/load.go b/pkg/tools/cli/loadtest/usecase/load.go
index dc67c02c0d3..501a45f0bb6 100644
--- a/pkg/tools/cli/loadtest/usecase/load.go
+++ b/pkg/tools/cli/loadtest/usecase/load.go
@@ -19,12 +19,12 @@ package usecase
import (
"context"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/log"
"github.com/vdaas/vald/internal/net/grpc"
"github.com/vdaas/vald/internal/runner"
"github.com/vdaas/vald/internal/safety"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/pkg/tools/cli/loadtest/config"
"github.com/vdaas/vald/pkg/tools/cli/loadtest/service"
)
diff --git a/tests/e2e/operation/stream.go b/tests/e2e/operation/stream.go
index a090900bb06..7feeffe4494 100644
--- a/tests/e2e/operation/stream.go
+++ b/tests/e2e/operation/stream.go
@@ -19,7 +19,6 @@ import (
"context"
"reflect"
"strconv"
- "sync"
"testing"
"github.com/vdaas/vald/apis/grpc/v1/payload"
@@ -29,6 +28,7 @@ import (
"github.com/vdaas/vald/internal/net/grpc/errdetails"
"github.com/vdaas/vald/internal/net/grpc/status"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync"
)
type (
diff --git a/tests/e2e/pkg/agent/core/ngt/service/ngt_e2s_test.go b/tests/e2e/pkg/agent/core/ngt/service/ngt_e2s_test.go
index e4c5e7d8324..d16f47bcdad 100644
--- a/tests/e2e/pkg/agent/core/ngt/service/ngt_e2s_test.go
+++ b/tests/e2e/pkg/agent/core/ngt/service/ngt_e2s_test.go
@@ -20,12 +20,12 @@ package service
import (
"context"
"strconv"
- "sync"
"testing"
"time"
"github.com/vdaas/vald/internal/config"
"github.com/vdaas/vald/internal/errors"
+ "github.com/vdaas/vald/internal/sync"
"github.com/vdaas/vald/pkg/agent/core/ngt/service"
)
diff --git a/tests/performance/max_vector_dim_test.go b/tests/performance/max_vector_dim_test.go
index 03c6e72a587..93bd3bb9c63 100644
--- a/tests/performance/max_vector_dim_test.go
+++ b/tests/performance/max_vector_dim_test.go
@@ -18,7 +18,6 @@ import (
"context"
"os"
"strconv"
- "sync"
"testing"
"time"
@@ -26,10 +25,11 @@ import (
"github.com/vdaas/vald/internal/config"
"github.com/vdaas/vald/internal/core/algorithm"
"github.com/vdaas/vald/internal/core/algorithm/ngt"
- "github.com/vdaas/vald/internal/errgroup"
"github.com/vdaas/vald/internal/errors"
"github.com/vdaas/vald/internal/safety"
"github.com/vdaas/vald/internal/strings"
+ "github.com/vdaas/vald/internal/sync"
+ "github.com/vdaas/vald/internal/sync/errgroup"
"github.com/vdaas/vald/internal/test/data/vector"
"github.com/vdaas/vald/pkg/agent/core/ngt/handler/grpc"
"github.com/vdaas/vald/pkg/agent/core/ngt/service"
diff --git a/versions/HELM_VERSION b/versions/HELM_VERSION
index 10d3e4ccb11..2ffba3ce657 100644
--- a/versions/HELM_VERSION
+++ b/versions/HELM_VERSION
@@ -1 +1 @@
-v3.12.1
+v3.12.2
diff --git a/versions/JAEGER_OPERATOR_VERSION b/versions/JAEGER_OPERATOR_VERSION
index b8c7fd6aca7..64f878193d4 100644
--- a/versions/JAEGER_OPERATOR_VERSION
+++ b/versions/JAEGER_OPERATOR_VERSION
@@ -1 +1 @@
-2.46.1
+2.46.2
diff --git a/versions/KUBECTL_VERSION b/versions/KUBECTL_VERSION
index 6c6ba5f810b..6f6fa3c2702 100644
--- a/versions/KUBECTL_VERSION
+++ b/versions/KUBECTL_VERSION
@@ -1 +1 @@
-v1.27.3
\ No newline at end of file
+v1.27.4
\ No newline at end of file
diff --git a/versions/NGT_VERSION b/versions/NGT_VERSION
index a14da2902b1..7ec1d6db408 100644
--- a/versions/NGT_VERSION
+++ b/versions/NGT_VERSION
@@ -1 +1 @@
-2.0.16
+2.1.0
diff --git a/versions/PROMETHEUS_STACK_VERSION b/versions/PROMETHEUS_STACK_VERSION
index b48484e16a4..7ff0d17a9a7 100644
--- a/versions/PROMETHEUS_STACK_VERSION
+++ b/versions/PROMETHEUS_STACK_VERSION
@@ -1 +1 @@
-47.6.1
+48.2.0
diff --git a/versions/YQ_VERSION b/versions/YQ_VERSION
index d8b501ab260..7606f2caad4 100644
--- a/versions/YQ_VERSION
+++ b/versions/YQ_VERSION
@@ -1 +1 @@
-v4.34.1
+v4.34.2