mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-29 18:38:44 +08:00
issue: #34252 pr: #34394 #35072 #35084 Signed-off-by: Wei Liu <wei.liu@zilliz.com> Co-authored-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
bfd8758152
commit
e2542a1bf5
33
Makefile
33
Makefile
@ -60,6 +60,14 @@ INSTALL_GOFUMPT := $(findstring $(GOFUMPT_VERSION),$(GOFUMPT_OUTPUT))
|
||||
GOTESTSUM_VERSION := 1.11.0
|
||||
GOTESTSUM_OUTPUT := $(shell $(INSTALL_PATH)/gotestsum --version 2>/dev/null)
|
||||
INSTALL_GOTESTSUM := $(findstring $(GOTESTSUM_VERSION),$(GOTESTSUM_OUTPUT))
|
||||
# protoc-gen-go
|
||||
PROTOC_GEN_GO_VERSION := 1.33.0
|
||||
PROTOC_GEN_GO_OUTPUT := $(shell print | $(INSTALL_PATH)/protoc-gen-go --version 2>/dev/null)
|
||||
INSTALL_PROTOC_GEN_GO := $(findstring $(PROTOC_GEN_GO_VERSION),$(PROTOC_GEN_GO_OUTPUT))
|
||||
# protoc-gen-go-grpc
|
||||
PROTOC_GEN_GO_GRPC_VERSION := 1.3.0
|
||||
PROTOC_GEN_GO_GRPC_OUTPUT := $(shell print | $(INSTALL_PATH)/protoc-gen-go-grpc --version 2>/dev/null)
|
||||
INSTALL_PROTOC_GEN_GO_GRPC := $(findstring $(PROTOC_GEN_GO_GRPC_VERSION),$(PROTOC_GEN_GO_GRPC_OUTPUT))
|
||||
|
||||
index_engine = knowhere
|
||||
|
||||
@ -105,6 +113,19 @@ getdeps:
|
||||
echo "gotestsum v$(GOTESTSUM_VERSION) already installed";\
|
||||
fi
|
||||
|
||||
get-proto-deps:
|
||||
@mkdir -p $(INSTALL_PATH) # make sure directory exists
|
||||
@if [ -z "$(INSTALL_PROTOC_GEN_GO)" ]; then \
|
||||
echo "install protoc-gen-go $(PROTOC_GEN_GO_VERSION) to $(INSTALL_PATH)" && GOBIN=$(INSTALL_PATH) go install google.golang.org/protobuf/cmd/protoc-gen-go@v$(PROTOC_GEN_GO_VERSION); \
|
||||
else \
|
||||
echo "protoc-gen-go@v$(PROTOC_GEN_GO_VERSION) already installed";\
|
||||
fi
|
||||
@if [ -z "$(INSTALL_PROTOC_GEN_GO_GRPC)" ]; then \
|
||||
echo "install protoc-gen-go-grpc $(PROTOC_GEN_GO_GRPC_VERSION) to $(INSTALL_PATH)" && GOBIN=$(INSTALL_PATH) go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v$(PROTOC_GEN_GO_GRPC_VERSION); \
|
||||
else \
|
||||
echo "protoc-gen-go-grpc@v$(PROTOC_GEN_GO_GRPC_VERSION) already installed";\
|
||||
fi
|
||||
|
||||
tools/bin/revive: tools/check/go.mod
|
||||
cd tools/check; \
|
||||
$(GO) build -pgo=$(PGO_PATH)/default.pgo -o ../bin/revive github.com/mgechev/revive
|
||||
@ -218,17 +239,13 @@ build-3rdparty:
|
||||
@echo "Build 3rdparty ..."
|
||||
@(env bash $(PWD)/scripts/3rdparty_build.sh -o ${use_opendal})
|
||||
|
||||
generated-proto-without-cpp: download-milvus-proto
|
||||
generated-proto-without-cpp: download-milvus-proto get-proto-deps
|
||||
@echo "Generate proto ..."
|
||||
@mkdir -p ${GOPATH}/bin
|
||||
@which protoc-gen-go 1>/dev/null || (echo "Installing protoc-gen-go" && cd /tmp && go install github.com/golang/protobuf/protoc-gen-go@v1.3.2)
|
||||
@(env bash $(PWD)/scripts/generate_proto.sh)
|
||||
@(env bash $(PWD)/scripts/generate_proto.sh ${INSTALL_PATH})
|
||||
|
||||
generated-proto: download-milvus-proto build-3rdparty
|
||||
generated-proto: download-milvus-proto build-3rdparty get-proto-deps
|
||||
@echo "Generate proto ..."
|
||||
@mkdir -p ${GOPATH}/bin
|
||||
@which protoc-gen-go 1>/dev/null || (echo "Installing protoc-gen-go" && cd /tmp && go install github.com/golang/protobuf/protoc-gen-go@v1.3.2)
|
||||
@(env bash $(PWD)/scripts/generate_proto.sh)
|
||||
@(env bash $(PWD)/scripts/generate_proto.sh ${INSTALL_PATH})
|
||||
|
||||
build-cpp: generated-proto
|
||||
@echo "Building Milvus cpp library ..."
|
||||
|
@ -23,9 +23,9 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/gogo/status"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
|
@ -17,7 +17,7 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/golang/protobuf/proto"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
|
@ -21,10 +21,10 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/samber/lo"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"github.com/stretchr/testify/suite"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
|
@ -5,10 +5,8 @@ go 1.21
|
||||
require (
|
||||
github.com/blang/semver/v4 v4.0.0
|
||||
github.com/cockroachdb/errors v1.9.1
|
||||
github.com/gogo/status v1.1.0
|
||||
github.com/golang/protobuf v1.5.4
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
|
||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.4.9
|
||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.4.10-0.20240821072125-950375c251c1
|
||||
github.com/milvus-io/milvus/pkg v0.0.2-0.20240317152703-17b4938985f3
|
||||
github.com/quasilyte/go-ruleguard/dsl v0.3.22
|
||||
github.com/samber/lo v1.27.0
|
||||
@ -16,6 +14,7 @@ require (
|
||||
github.com/tidwall/gjson v1.17.1
|
||||
go.uber.org/atomic v1.10.0
|
||||
google.golang.org/grpc v1.57.1
|
||||
google.golang.org/protobuf v1.33.0
|
||||
)
|
||||
|
||||
require (
|
||||
@ -39,8 +38,8 @@ require (
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-ole/go-ole v1.2.6 // indirect
|
||||
github.com/godbus/dbus/v5 v5.0.4 // indirect
|
||||
github.com/gogo/googleapis v1.4.1 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/google/btree v1.1.2 // indirect
|
||||
github.com/gorilla/websocket v1.4.2 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
|
||||
@ -117,7 +116,6 @@ require (
|
||||
google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
|
||||
google.golang.org/protobuf v1.33.0 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/ini.v1 v1.62.0 // indirect
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
|
||||
|
@ -198,7 +198,6 @@ github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/E
|
||||
github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA=
|
||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=
|
||||
github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0=
|
||||
github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
@ -206,7 +205,6 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV
|
||||
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/gogo/status v1.1.0 h1:+eIkrewn5q6b30y+g/BJINVVdi2xH7je5MPJ3ZPK3JA=
|
||||
github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM=
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
@ -402,8 +400,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfr
|
||||
github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8=
|
||||
github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc=
|
||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.4.9 h1:GhdkA7L4hE/TpUc6CzC9QufoaaF7StLRnISLsXexVLo=
|
||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.4.9/go.mod h1:1OIl0v5PQeNxIJhCvY+K55CBUOYDZevw9g9380u1Wek=
|
||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.4.10-0.20240821072125-950375c251c1 h1:2SVCzfGzDhmvT5FbAC38cil2MAY3awPUQFGsB87y7io=
|
||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.4.10-0.20240821072125-950375c251c1/go.mod h1:/6UT4zZl6awVeXLeE7UGDWZvXj3IWkRsh3mqsn0DiAs=
|
||||
github.com/milvus-io/milvus/pkg v0.0.2-0.20240317152703-17b4938985f3 h1:ZBpRWhBa7FTFxW4YYVv9AUESoW1Xyb3KNXTzTqfkZmw=
|
||||
github.com/milvus-io/milvus/pkg v0.0.2-0.20240317152703-17b4938985f3/go.mod h1:jQ2BUZny1COsgv1Qbcv8dmbppW+V9J/c4YQZNb3EOm8=
|
||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||
|
@ -302,6 +302,61 @@ func (_c *MilvusServiceServer_AlterIndex_Call) RunAndReturn(run func(context.Con
|
||||
return _c
|
||||
}
|
||||
|
||||
// BackupRBAC provides a mock function with given fields: _a0, _a1
|
||||
func (_m *MilvusServiceServer) BackupRBAC(_a0 context.Context, _a1 *milvuspb.BackupRBACMetaRequest) (*milvuspb.BackupRBACMetaResponse, error) {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
var r0 *milvuspb.BackupRBACMetaResponse
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.BackupRBACMetaRequest) (*milvuspb.BackupRBACMetaResponse, error)); ok {
|
||||
return rf(_a0, _a1)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.BackupRBACMetaRequest) *milvuspb.BackupRBACMetaResponse); ok {
|
||||
r0 = rf(_a0, _a1)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*milvuspb.BackupRBACMetaResponse)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.BackupRBACMetaRequest) error); ok {
|
||||
r1 = rf(_a0, _a1)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// MilvusServiceServer_BackupRBAC_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BackupRBAC'
|
||||
type MilvusServiceServer_BackupRBAC_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// BackupRBAC is a helper method to define mock.On call
|
||||
// - _a0 context.Context
|
||||
// - _a1 *milvuspb.BackupRBACMetaRequest
|
||||
func (_e *MilvusServiceServer_Expecter) BackupRBAC(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_BackupRBAC_Call {
|
||||
return &MilvusServiceServer_BackupRBAC_Call{Call: _e.mock.On("BackupRBAC", _a0, _a1)}
|
||||
}
|
||||
|
||||
func (_c *MilvusServiceServer_BackupRBAC_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.BackupRBACMetaRequest)) *MilvusServiceServer_BackupRBAC_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(*milvuspb.BackupRBACMetaRequest))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MilvusServiceServer_BackupRBAC_Call) Return(_a0 *milvuspb.BackupRBACMetaResponse, _a1 error) *MilvusServiceServer_BackupRBAC_Call {
|
||||
_c.Call.Return(_a0, _a1)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MilvusServiceServer_BackupRBAC_Call) RunAndReturn(run func(context.Context, *milvuspb.BackupRBACMetaRequest) (*milvuspb.BackupRBACMetaResponse, error)) *MilvusServiceServer_BackupRBAC_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// CalcDistance provides a mock function with given fields: _a0, _a1
|
||||
func (_m *MilvusServiceServer) CalcDistance(_a0 context.Context, _a1 *milvuspb.CalcDistanceRequest) (*milvuspb.CalcDistanceResults, error) {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
@ -4152,6 +4207,61 @@ func (_c *MilvusServiceServer_ReplicateMessage_Call) RunAndReturn(run func(conte
|
||||
return _c
|
||||
}
|
||||
|
||||
// RestoreRBAC provides a mock function with given fields: _a0, _a1
|
||||
func (_m *MilvusServiceServer) RestoreRBAC(_a0 context.Context, _a1 *milvuspb.RestoreRBACMetaRequest) (*commonpb.Status, error) {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
||||
var r0 *commonpb.Status
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.RestoreRBACMetaRequest) (*commonpb.Status, error)); ok {
|
||||
return rf(_a0, _a1)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.RestoreRBACMetaRequest) *commonpb.Status); ok {
|
||||
r0 = rf(_a0, _a1)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*commonpb.Status)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.RestoreRBACMetaRequest) error); ok {
|
||||
r1 = rf(_a0, _a1)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// MilvusServiceServer_RestoreRBAC_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RestoreRBAC'
|
||||
type MilvusServiceServer_RestoreRBAC_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// RestoreRBAC is a helper method to define mock.On call
|
||||
// - _a0 context.Context
|
||||
// - _a1 *milvuspb.RestoreRBACMetaRequest
|
||||
func (_e *MilvusServiceServer_Expecter) RestoreRBAC(_a0 interface{}, _a1 interface{}) *MilvusServiceServer_RestoreRBAC_Call {
|
||||
return &MilvusServiceServer_RestoreRBAC_Call{Call: _e.mock.On("RestoreRBAC", _a0, _a1)}
|
||||
}
|
||||
|
||||
func (_c *MilvusServiceServer_RestoreRBAC_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.RestoreRBACMetaRequest)) *MilvusServiceServer_RestoreRBAC_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(*milvuspb.RestoreRBACMetaRequest))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MilvusServiceServer_RestoreRBAC_Call) Return(_a0 *commonpb.Status, _a1 error) *MilvusServiceServer_RestoreRBAC_Call {
|
||||
_c.Call.Return(_a0, _a1)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *MilvusServiceServer_RestoreRBAC_Call) RunAndReturn(run func(context.Context, *milvuspb.RestoreRBACMetaRequest) (*commonpb.Status, error)) *MilvusServiceServer_RestoreRBAC_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// Search provides a mock function with given fields: _a0, _a1
|
||||
func (_m *MilvusServiceServer) Search(_a0 context.Context, _a1 *milvuspb.SearchRequest) (*milvuspb.SearchResults, error) {
|
||||
ret := _m.Called(_a0, _a1)
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"encoding/json"
|
||||
"strconv"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
|
@ -12,9 +12,9 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
clientv3 "go.etcd.io/etcd/client/v3"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
etcdkv "github.com/milvus-io/milvus/internal/kv/etcd"
|
||||
@ -528,40 +528,40 @@ func (c *mck) unmarshalTask(taskID int64, t string) (string, []int64, []int64, e
|
||||
|
||||
switch header.Base.MsgType {
|
||||
case commonpb.MsgType_LoadCollection:
|
||||
loadReq := querypb.LoadCollectionRequest{}
|
||||
err = proto.Unmarshal([]byte(t), &loadReq)
|
||||
loadReq := &querypb.LoadCollectionRequest{}
|
||||
err = proto.Unmarshal([]byte(t), loadReq)
|
||||
if err != nil {
|
||||
return errReturn(taskID, "LoadCollectionRequest", err)
|
||||
}
|
||||
log.Info("LoadCollection", zap.String("detail", fmt.Sprintf("+%v", loadReq)))
|
||||
return "LoadCollection", emptyInt64(), emptyInt64(), nil
|
||||
case commonpb.MsgType_LoadPartitions:
|
||||
loadReq := querypb.LoadPartitionsRequest{}
|
||||
err = proto.Unmarshal([]byte(t), &loadReq)
|
||||
loadReq := &querypb.LoadPartitionsRequest{}
|
||||
err = proto.Unmarshal([]byte(t), loadReq)
|
||||
if err != nil {
|
||||
return errReturn(taskID, "LoadPartitionsRequest", err)
|
||||
}
|
||||
log.Info("LoadPartitions", zap.String("detail", fmt.Sprintf("+%v", loadReq)))
|
||||
return "LoadPartitions", loadReq.PartitionIDs, emptyInt64(), nil
|
||||
case commonpb.MsgType_ReleaseCollection:
|
||||
loadReq := querypb.ReleaseCollectionRequest{}
|
||||
err = proto.Unmarshal([]byte(t), &loadReq)
|
||||
loadReq := &querypb.ReleaseCollectionRequest{}
|
||||
err = proto.Unmarshal([]byte(t), loadReq)
|
||||
if err != nil {
|
||||
return errReturn(taskID, "ReleaseCollectionRequest", err)
|
||||
}
|
||||
log.Info("ReleaseCollection", zap.String("detail", fmt.Sprintf("+%v", loadReq)))
|
||||
return "ReleaseCollection", emptyInt64(), emptyInt64(), nil
|
||||
case commonpb.MsgType_ReleasePartitions:
|
||||
loadReq := querypb.ReleasePartitionsRequest{}
|
||||
err = proto.Unmarshal([]byte(t), &loadReq)
|
||||
loadReq := &querypb.ReleasePartitionsRequest{}
|
||||
err = proto.Unmarshal([]byte(t), loadReq)
|
||||
if err != nil {
|
||||
return errReturn(taskID, "ReleasePartitionsRequest", err)
|
||||
}
|
||||
log.Info("ReleasePartitions", zap.String("detail", fmt.Sprintf("+%v", loadReq)))
|
||||
return "ReleasePartitions", loadReq.PartitionIDs, emptyInt64(), nil
|
||||
case commonpb.MsgType_LoadSegments:
|
||||
loadReq := querypb.LoadSegmentsRequest{}
|
||||
err = proto.Unmarshal([]byte(t), &loadReq)
|
||||
loadReq := &querypb.LoadSegmentsRequest{}
|
||||
err = proto.Unmarshal([]byte(t), loadReq)
|
||||
if err != nil {
|
||||
return errReturn(taskID, "LoadSegmentsRequest", err)
|
||||
}
|
||||
@ -584,16 +584,16 @@ func (c *mck) unmarshalTask(taskID int64, t string) (string, []int64, []int64, e
|
||||
log.Info("LoadSegments", zap.String("detail", fmt.Sprintf("+%v", loadReq)))
|
||||
return "LoadSegments", removeRepeatElement(partitionIDs), removeRepeatElement(segmentIDs), nil
|
||||
case commonpb.MsgType_ReleaseSegments:
|
||||
loadReq := querypb.ReleaseSegmentsRequest{}
|
||||
err = proto.Unmarshal([]byte(t), &loadReq)
|
||||
loadReq := &querypb.ReleaseSegmentsRequest{}
|
||||
err = proto.Unmarshal([]byte(t), loadReq)
|
||||
if err != nil {
|
||||
return errReturn(taskID, "ReleaseSegmentsRequest", err)
|
||||
}
|
||||
log.Info("ReleaseSegments", zap.String("detail", fmt.Sprintf("+%v", loadReq)))
|
||||
return "ReleaseSegments", loadReq.PartitionIDs, loadReq.SegmentIDs, nil
|
||||
case commonpb.MsgType_WatchDmChannels:
|
||||
loadReq := querypb.WatchDmChannelsRequest{}
|
||||
err = proto.Unmarshal([]byte(t), &loadReq)
|
||||
loadReq := &querypb.WatchDmChannelsRequest{}
|
||||
err = proto.Unmarshal([]byte(t), loadReq)
|
||||
if err != nil {
|
||||
return errReturn(taskID, "WatchDmChannelsRequest", err)
|
||||
}
|
||||
@ -619,16 +619,16 @@ func (c *mck) unmarshalTask(taskID int64, t string) (string, []int64, []int64, e
|
||||
log.Warn("legacy WatchQueryChannels type found, ignore")
|
||||
return "WatchQueryChannels", emptyInt64(), emptyInt64(), nil
|
||||
case commonpb.MsgType_LoadBalanceSegments:
|
||||
loadReq := querypb.LoadBalanceRequest{}
|
||||
err = proto.Unmarshal([]byte(t), &loadReq)
|
||||
loadReq := &querypb.LoadBalanceRequest{}
|
||||
err = proto.Unmarshal([]byte(t), loadReq)
|
||||
if err != nil {
|
||||
return errReturn(taskID, "LoadBalanceRequest", err)
|
||||
}
|
||||
log.Info("LoadBalanceSegments", zap.String("detail", fmt.Sprintf("+%v", loadReq)))
|
||||
return "LoadBalanceSegments", emptyInt64(), loadReq.SealedSegmentIDs, nil
|
||||
case commonpb.MsgType_HandoffSegments:
|
||||
handoffReq := querypb.HandoffSegmentsRequest{}
|
||||
err = proto.Unmarshal([]byte(t), &handoffReq)
|
||||
handoffReq := &querypb.HandoffSegmentsRequest{}
|
||||
err = proto.Unmarshal([]byte(t), handoffReq)
|
||||
if err != nil {
|
||||
return errReturn(taskID, "HandoffSegmentsRequest", err)
|
||||
}
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
etcdkv "github.com/milvus-io/milvus/internal/kv/etcd"
|
||||
"github.com/milvus-io/milvus/internal/proto/datapb"
|
||||
|
@ -3,8 +3,6 @@ package backend
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus/cmd/tools/migration/console"
|
||||
)
|
||||
|
||||
@ -14,32 +12,6 @@ const (
|
||||
BackupHeaderVersionV1 BackupHeaderVersion = iota
|
||||
)
|
||||
|
||||
// BackupHeader stores etcd backup header information
|
||||
type BackupHeader struct {
|
||||
// Version number for backup format
|
||||
Version BackupHeaderVersion `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
|
||||
// instance name, as rootPath for key prefix
|
||||
Instance string `protobuf:"bytes,2,opt,name=instance,proto3" json:"instance,omitempty"`
|
||||
// MetaPath used in keys
|
||||
MetaPath string `protobuf:"bytes,3,opt,name=meta_path,proto3" json:"meta_path,omitempty"`
|
||||
// Entries record number of key-value in backup
|
||||
Entries int64 `protobuf:"varint,4,opt,name=entries,proto3" json:"entries,omitempty"`
|
||||
// Component is the backup target
|
||||
Component string `protobuf:"bytes,5,opt,name=component,proto3" json:"component,omitempty"`
|
||||
// Extra property reserved
|
||||
Extra []byte `protobuf:"bytes,6,opt,name=extra,proto3" json:"-"`
|
||||
}
|
||||
|
||||
func (v *BackupHeader) Reset() {
|
||||
*v = BackupHeader{}
|
||||
}
|
||||
|
||||
func (v *BackupHeader) String() string {
|
||||
return proto.CompactTextString(v)
|
||||
}
|
||||
|
||||
func (v *BackupHeader) ProtoMessage() {}
|
||||
|
||||
type BackupHeaderExtra struct {
|
||||
EntryIncludeRootPath bool `json:"entry_include_root_path"`
|
||||
}
|
||||
|
203
cmd/tools/migration/backend/backup_header.pb.go
Normal file
203
cmd/tools/migration/backend/backup_header.pb.go
Normal file
@ -0,0 +1,203 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v3.21.4
|
||||
// source: backup_header.proto
|
||||
|
||||
package backend
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type BackupHeader struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Version number for backup format
|
||||
Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
|
||||
// instance name, as rootPath for key prefix
|
||||
Instance string `protobuf:"bytes,2,opt,name=instance,proto3" json:"instance,omitempty"`
|
||||
// MetaPath used in keys
|
||||
MetaPath string `protobuf:"bytes,3,opt,name=meta_path,json=metaPath,proto3" json:"meta_path,omitempty"`
|
||||
// Entries record number of key-value in backup
|
||||
Entries int64 `protobuf:"varint,4,opt,name=entries,proto3" json:"entries,omitempty"`
|
||||
// Component is the backup target
|
||||
Component string `protobuf:"bytes,5,opt,name=component,proto3" json:"component,omitempty"`
|
||||
// Extra property reserved
|
||||
Extra []byte `protobuf:"bytes,6,opt,name=extra,proto3" json:"extra,omitempty"`
|
||||
}
|
||||
|
||||
func (x *BackupHeader) Reset() {
|
||||
*x = BackupHeader{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_backup_header_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *BackupHeader) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*BackupHeader) ProtoMessage() {}
|
||||
|
||||
func (x *BackupHeader) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_backup_header_proto_msgTypes[0]
|
||||
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 BackupHeader.ProtoReflect.Descriptor instead.
|
||||
func (*BackupHeader) Descriptor() ([]byte, []int) {
|
||||
return file_backup_header_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *BackupHeader) GetVersion() int32 {
|
||||
if x != nil {
|
||||
return x.Version
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *BackupHeader) GetInstance() string {
|
||||
if x != nil {
|
||||
return x.Instance
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *BackupHeader) GetMetaPath() string {
|
||||
if x != nil {
|
||||
return x.MetaPath
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *BackupHeader) GetEntries() int64 {
|
||||
if x != nil {
|
||||
return x.Entries
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *BackupHeader) GetComponent() string {
|
||||
if x != nil {
|
||||
return x.Component
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *BackupHeader) GetExtra() []byte {
|
||||
if x != nil {
|
||||
return x.Extra
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_backup_header_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_backup_header_proto_rawDesc = []byte{
|
||||
0x0a, 0x13, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x28, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6d, 0x64, 0x2e, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x6d, 0x69,
|
||||
0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x22,
|
||||
0xaf, 0x01, 0x0a, 0x0c, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e,
|
||||
0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e,
|
||||
0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70,
|
||||
0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x50,
|
||||
0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65,
|
||||
0x78, 0x74, 0x72, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72,
|
||||
0x61, 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
||||
0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2d, 0x69, 0x6f, 0x2f, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73,
|
||||
0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
|
||||
0x63, 0x6d, 0x64, 0x2f, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_backup_header_proto_rawDescOnce sync.Once
|
||||
file_backup_header_proto_rawDescData = file_backup_header_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_backup_header_proto_rawDescGZIP() []byte {
|
||||
file_backup_header_proto_rawDescOnce.Do(func() {
|
||||
file_backup_header_proto_rawDescData = protoimpl.X.CompressGZIP(file_backup_header_proto_rawDescData)
|
||||
})
|
||||
return file_backup_header_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_backup_header_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_backup_header_proto_goTypes = []interface{}{
|
||||
(*BackupHeader)(nil), // 0: milvus.proto.cmd.tools.migration.backend.BackupHeader
|
||||
}
|
||||
var file_backup_header_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] 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
|
||||
}
|
||||
|
||||
func init() { file_backup_header_proto_init() }
|
||||
func file_backup_header_proto_init() {
|
||||
if File_backup_header_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_backup_header_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*BackupHeader); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_backup_header_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_backup_header_proto_goTypes,
|
||||
DependencyIndexes: file_backup_header_proto_depIdxs,
|
||||
MessageInfos: file_backup_header_proto_msgTypes,
|
||||
}.Build()
|
||||
File_backup_header_proto = out.File
|
||||
file_backup_header_proto_rawDesc = nil
|
||||
file_backup_header_proto_goTypes = nil
|
||||
file_backup_header_proto_depIdxs = nil
|
||||
}
|
22
cmd/tools/migration/backend/backup_header.proto
Normal file
22
cmd/tools/migration/backend/backup_header.proto
Normal file
@ -0,0 +1,22 @@
|
||||
syntax = "proto3";
|
||||
package milvus.proto.cmd.tools.migration.backend;
|
||||
|
||||
|
||||
option go_package = "github.com/milvus-io/milvus/internal/proto/cmd/tools/migration/backend";
|
||||
|
||||
|
||||
|
||||
message BackupHeader {
|
||||
// Version number for backup format
|
||||
int32 version = 1;
|
||||
// instance name, as rootPath for key prefix
|
||||
string instance = 2;
|
||||
// MetaPath used in keys
|
||||
string meta_path = 3;
|
||||
// Entries record number of key-value in backup
|
||||
int64 entries = 4;
|
||||
// Component is the backup target
|
||||
string component = 5;
|
||||
// Extra property reserved
|
||||
bytes extra = 6;
|
||||
}
|
@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
)
|
||||
|
@ -5,11 +5,12 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"google.golang.org/protobuf/encoding/prototext"
|
||||
)
|
||||
|
||||
func TestBackupCodec_Serialize(t *testing.T) {
|
||||
header := &BackupHeader{
|
||||
Version: BackupHeaderVersionV1,
|
||||
Version: int32(BackupHeaderVersionV1),
|
||||
Instance: "/by-dev",
|
||||
MetaPath: "meta",
|
||||
Entries: 0,
|
||||
@ -26,6 +27,6 @@ func TestBackupCodec_Serialize(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
gotHeader, gotEntries, err := codec.DeSerialize(file)
|
||||
assert.NoError(t, err)
|
||||
assert.True(t, reflect.DeepEqual(header, gotHeader))
|
||||
assert.Equal(t, prototext.Format(header), prototext.Format(gotHeader))
|
||||
assert.True(t, reflect.DeepEqual(kvs, gotEntries))
|
||||
}
|
||||
|
@ -7,8 +7,8 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
clientv3 "go.etcd.io/etcd/client/v3"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus/cmd/tools/migration/configs"
|
||||
"github.com/milvus-io/milvus/cmd/tools/migration/console"
|
||||
@ -420,7 +420,7 @@ func (b etcd210) Backup(meta *meta.Meta, backupFile string) error {
|
||||
instance = metaRootPath
|
||||
}
|
||||
header := &BackupHeader{
|
||||
Version: BackupHeaderVersionV1,
|
||||
Version: int32(BackupHeaderVersionV1),
|
||||
Instance: instance,
|
||||
MetaPath: metaPath,
|
||||
Entries: int64(len(saves)),
|
||||
@ -472,7 +472,7 @@ func (b etcd210) BackupV2(file string) error {
|
||||
}
|
||||
|
||||
header := &BackupHeader{
|
||||
Version: BackupHeaderVersionV1,
|
||||
Version: int32(BackupHeaderVersionV1),
|
||||
Instance: instance,
|
||||
MetaPath: metaPath,
|
||||
Entries: int64(len(saves)),
|
||||
|
@ -3,7 +3,7 @@ package meta
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
|
||||
"github.com/milvus-io/milvus/cmd/tools/migration/legacy"
|
||||
|
@ -2,7 +2,7 @@ package meta
|
||||
|
||||
import (
|
||||
"github.com/blang/semver/v4"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus/cmd/tools/migration/versions"
|
||||
"github.com/milvus-io/milvus/internal/metastore/kv/datacoord"
|
||||
|
8
go.mod
8
go.mod
@ -26,7 +26,7 @@ require (
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
|
||||
github.com/klauspost/compress v1.17.7
|
||||
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d
|
||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.4.10-0.20240819025435-512e3b98866a
|
||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.4.10-0.20240821072125-950375c251c1
|
||||
github.com/minio/minio-go/v7 v7.0.61
|
||||
github.com/pingcap/log v1.1.1-0.20221015072633-39906604fb81
|
||||
github.com/prometheus/client_golang v1.14.0
|
||||
@ -38,10 +38,9 @@ require (
|
||||
github.com/soheilhy/cmux v0.1.5
|
||||
github.com/spf13/cast v1.3.1
|
||||
github.com/spf13/viper v1.8.1
|
||||
github.com/stretchr/testify v1.8.4
|
||||
github.com/stretchr/testify v1.9.0
|
||||
github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect
|
||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.865
|
||||
github.com/tidwall/gjson v1.14.4
|
||||
github.com/tikv/client-go/v2 v2.0.4
|
||||
go.etcd.io/etcd/api/v3 v3.5.5
|
||||
go.etcd.io/etcd/client/v3 v3.5.5
|
||||
@ -71,6 +70,7 @@ require (
|
||||
github.com/jolestar/go-commons-pool/v2 v2.1.2
|
||||
github.com/milvus-io/milvus/pkg v0.0.0-00010101000000-000000000000
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/tidwall/gjson v1.17.3
|
||||
github.com/valyala/fastjson v1.6.4
|
||||
github.com/zeebo/xxh3 v1.0.2
|
||||
google.golang.org/protobuf v1.33.0
|
||||
@ -194,7 +194,7 @@ require (
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/stathat/consistent v1.0.0 // indirect
|
||||
github.com/streamnative/pulsarctl v0.5.0 // indirect
|
||||
github.com/stretchr/objx v0.5.0 // indirect
|
||||
github.com/stretchr/objx v0.5.2 // indirect
|
||||
github.com/subosito/gotenv v1.2.0 // indirect
|
||||
github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a // indirect
|
||||
github.com/tidwall/match v1.1.1 // indirect
|
||||
|
15
go.sum
15
go.sum
@ -606,8 +606,8 @@ github.com/milvus-io/cgosymbolizer v0.0.0-20240722103217-b7dee0e50119 h1:9VXijWu
|
||||
github.com/milvus-io/cgosymbolizer v0.0.0-20240722103217-b7dee0e50119/go.mod h1:DvXTE/K/RtHehxU8/GtDs4vFtfw64jJ3PaCnFri8CRg=
|
||||
github.com/milvus-io/gorocksdb v0.0.0-20220624081344-8c5f4212846b h1:TfeY0NxYxZzUfIfYe5qYDBzt4ZYRqzUjTR6CvUzjat8=
|
||||
github.com/milvus-io/gorocksdb v0.0.0-20220624081344-8c5f4212846b/go.mod h1:iwW+9cWfIzzDseEBCCeDSN5SD16Tidvy8cwQ7ZY8Qj4=
|
||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.4.10-0.20240819025435-512e3b98866a h1:0B/8Fo66D8Aa23Il0yrQvg1KKz92tE/BJ5BvkUxxAAk=
|
||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.4.10-0.20240819025435-512e3b98866a/go.mod h1:1OIl0v5PQeNxIJhCvY+K55CBUOYDZevw9g9380u1Wek=
|
||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.4.10-0.20240821072125-950375c251c1 h1:2SVCzfGzDhmvT5FbAC38cil2MAY3awPUQFGsB87y7io=
|
||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.4.10-0.20240821072125-950375c251c1/go.mod h1:/6UT4zZl6awVeXLeE7UGDWZvXj3IWkRsh3mqsn0DiAs=
|
||||
github.com/milvus-io/milvus-storage/go v0.0.0-20231227072638-ebd0b8e56d70 h1:Z+sp64fmAOxAG7mU0dfVOXvAXlwRB0c8a96rIM5HevI=
|
||||
github.com/milvus-io/milvus-storage/go v0.0.0-20231227072638-ebd0b8e56d70/go.mod h1:GPETMcTZq1gLY1WA6Na5kiNAKnq8SEMMiVKUZrM3sho=
|
||||
github.com/milvus-io/pulsar-client-go v0.6.10 h1:eqpJjU+/QX0iIhEo3nhOqMNXL+TyInAs1IAHZCrCM/A=
|
||||
@ -836,8 +836,9 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
|
||||
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
|
||||
github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
|
||||
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.3.1-0.20190311161405-34c6fa2dc709/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
@ -850,8 +851,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
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/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
|
||||
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.865 h1:LcUqBlKC4j15LhT303yQDX/XxyHG4haEQqbHgZZA4SY=
|
||||
@ -860,8 +861,8 @@ github.com/thoas/go-funk v0.9.1 h1:O549iLZqPpTUQ10ykd26sZhzD+rmR5pWhuElrhbC20M=
|
||||
github.com/thoas/go-funk v0.9.1/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q=
|
||||
github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a h1:J/YdBZ46WKpXsxsW93SG+q0F8KI+yFrcIDT4c/RNoc4=
|
||||
github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a/go.mod h1:h4xBhSNtOeEosLJ4P7JyKXX7Cabg7AVkWCK5gV2vOrM=
|
||||
github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM=
|
||||
github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
|
||||
github.com/tidwall/gjson v1.17.3 h1:bwWLZU7icoKRG+C+0PNwIKC6FCJO/Q3p2pZvuP0jN94=
|
||||
github.com/tidwall/gjson v1.17.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
|
||||
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
|
||||
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
|
||||
github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs=
|
||||
|
@ -20,8 +20,8 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/metastore"
|
||||
"github.com/milvus-io/milvus/internal/proto/indexpb"
|
||||
|
@ -19,8 +19,8 @@ package datacoord
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
|
||||
|
@ -22,10 +22,10 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
clientv3 "go.etcd.io/etcd/client/v3"
|
||||
"go.uber.org/atomic"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/proto/datapb"
|
||||
"github.com/milvus-io/milvus/pkg/kv"
|
||||
|
@ -21,9 +21,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/proto/datapb"
|
||||
)
|
||||
|
@ -24,11 +24,11 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"github.com/stretchr/testify/require"
|
||||
"go.uber.org/atomic"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/proto/datapb"
|
||||
"github.com/milvus-io/milvus/internal/util/dependency"
|
||||
|
@ -23,9 +23,9 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/samber/lo"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/proto/datapb"
|
||||
"github.com/milvus-io/milvus/pkg/kv"
|
||||
|
@ -22,11 +22,11 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/samber/lo"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"github.com/stretchr/testify/suite"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
kvmock "github.com/milvus-io/milvus/internal/kv/mocks"
|
||||
"github.com/milvus-io/milvus/internal/proto/datapb"
|
||||
|
@ -23,10 +23,10 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/samber/lo"
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zapcore"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/proto/datapb"
|
||||
"github.com/milvus-io/milvus/pkg/kv"
|
||||
|
@ -21,10 +21,10 @@ import (
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"github.com/stretchr/testify/suite"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/kv/mocks"
|
||||
"github.com/milvus-io/milvus/internal/proto/datapb"
|
||||
|
@ -4,9 +4,9 @@ import (
|
||||
"strconv"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/samber/lo"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/proto/datapb"
|
||||
"github.com/milvus-io/milvus/pkg/kv"
|
||||
|
@ -5,11 +5,11 @@ import (
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/samber/lo"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"github.com/stretchr/testify/suite"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/kv/mocks"
|
||||
"github.com/milvus-io/milvus/internal/proto/datapb"
|
||||
|
@ -19,8 +19,8 @@ package datacoord
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/metastore"
|
||||
"github.com/milvus-io/milvus/internal/proto/datapb"
|
||||
|
@ -19,8 +19,8 @@ package datacoord
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
|
||||
|
@ -17,7 +17,7 @@
|
||||
package datacoord
|
||||
|
||||
import (
|
||||
"github.com/golang/protobuf/proto"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/proto/datapb"
|
||||
)
|
||||
|
@ -22,10 +22,10 @@ import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/samber/lo"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
|
||||
|
@ -26,10 +26,10 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/samber/lo"
|
||||
"go.uber.org/zap"
|
||||
"golang.org/x/exp/maps"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/msgpb"
|
||||
|
@ -21,11 +21,11 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/samber/lo"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"github.com/stretchr/testify/suite"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
|
@ -19,10 +19,10 @@ package datacoord
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/samber/lo"
|
||||
"go.uber.org/atomic"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/msgpb"
|
||||
|
@ -779,7 +779,7 @@ func (s *Server) handleDataNodeTimetickMsgstream(ctx context.Context, ttMsgStrea
|
||||
checker.Check()
|
||||
}
|
||||
|
||||
if err := s.handleDataNodeTtMsg(ctx, &ttMsg.DataNodeTtMsg); err != nil {
|
||||
if err := s.handleDataNodeTtMsg(ctx, ttMsg.DataNodeTtMsg); err != nil {
|
||||
log.Warn("failed to handle timetick message", zap.Error(err))
|
||||
continue
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ func genMsg(msgType commonpb.MsgType, ch string, t Timestamp, sourceID int64) *m
|
||||
BaseMsg: msgstream.BaseMsg{
|
||||
HashValues: []uint32{0},
|
||||
},
|
||||
DataNodeTtMsg: msgpb.DataNodeTtMsg{
|
||||
DataNodeTtMsg: &msgpb.DataNodeTtMsg{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: msgType,
|
||||
Timestamp: t,
|
||||
@ -142,7 +142,7 @@ func (s *ServerSuite) TestHandleDataNodeTtMsg() {
|
||||
s.testServer.cluster = mockCluster
|
||||
s.mockChMgr.EXPECT().Match(sourceID, chanName).Return(true).Twice()
|
||||
|
||||
err = s.testServer.handleDataNodeTtMsg(context.TODO(), &msg.DataNodeTtMsg)
|
||||
err = s.testServer.handleDataNodeTtMsg(context.TODO(), msg.DataNodeTtMsg)
|
||||
s.NoError(err)
|
||||
|
||||
tt := tsoutil.AddPhysicalDurationOnTs(assign.ExpireTime, 48*time.Hour)
|
||||
@ -152,7 +152,7 @@ func (s *ServerSuite) TestHandleDataNodeTtMsg() {
|
||||
NumRows: 1,
|
||||
})
|
||||
|
||||
err = s.testServer.handleDataNodeTtMsg(context.TODO(), &msg.DataNodeTtMsg)
|
||||
err = s.testServer.handleDataNodeTtMsg(context.TODO(), msg.DataNodeTtMsg)
|
||||
s.Error(err)
|
||||
}
|
||||
|
||||
|
@ -31,11 +31,11 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/samber/lo"
|
||||
"go.opentelemetry.io/otel"
|
||||
"go.uber.org/atomic"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
|
||||
"github.com/milvus-io/milvus/internal/datanode/allocator"
|
||||
|
@ -528,7 +528,7 @@ func (s *DataSyncServiceSuite) TestStartStop() {
|
||||
EndTimestamp: tsoutil.GetCurrentTime(),
|
||||
HashValues: []uint32{0},
|
||||
},
|
||||
TimeTickMsg: msgpb.TimeTickMsg{
|
||||
TimeTickMsg: &msgpb.TimeTickMsg{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_TimeTick,
|
||||
MsgID: UniqueID(0),
|
||||
|
@ -24,10 +24,10 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
v3rpc "go.etcd.io/etcd/api/v3/v3rpc/rpctypes"
|
||||
"go.uber.org/atomic"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/proto/datapb"
|
||||
"github.com/milvus-io/milvus/pkg/kv"
|
||||
|
@ -26,9 +26,9 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
|
||||
|
@ -22,9 +22,9 @@ import (
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/msgpb"
|
||||
@ -180,11 +180,11 @@ func (ddn *ddNode) Operate(in []Msg) []Msg {
|
||||
continue
|
||||
}
|
||||
|
||||
rateCol.Add(metricsinfo.InsertConsumeThroughput, float64(proto.Size(&imsg.InsertRequest)))
|
||||
rateCol.Add(metricsinfo.InsertConsumeThroughput, float64(proto.Size(imsg.InsertRequest)))
|
||||
|
||||
metrics.DataNodeConsumeBytesCount.
|
||||
WithLabelValues(fmt.Sprint(paramtable.GetNodeID()), metrics.InsertLabel).
|
||||
Add(float64(proto.Size(&imsg.InsertRequest)))
|
||||
Add(float64(proto.Size(imsg.InsertRequest)))
|
||||
|
||||
metrics.DataNodeConsumeMsgCount.
|
||||
WithLabelValues(fmt.Sprint(paramtable.GetNodeID()), metrics.InsertLabel, fmt.Sprint(ddn.collectionID)).
|
||||
@ -214,11 +214,11 @@ func (ddn *ddNode) Operate(in []Msg) []Msg {
|
||||
}
|
||||
|
||||
log.Debug("DDNode receive delete messages", zap.String("channel", ddn.vChannelName), zap.Int64("numRows", dmsg.NumRows))
|
||||
rateCol.Add(metricsinfo.DeleteConsumeThroughput, float64(proto.Size(&dmsg.DeleteRequest)))
|
||||
rateCol.Add(metricsinfo.DeleteConsumeThroughput, float64(proto.Size(dmsg.DeleteRequest)))
|
||||
|
||||
metrics.DataNodeConsumeBytesCount.
|
||||
WithLabelValues(fmt.Sprint(paramtable.GetNodeID()), metrics.DeleteLabel).
|
||||
Add(float64(proto.Size(&dmsg.DeleteRequest)))
|
||||
Add(float64(proto.Size(dmsg.DeleteRequest)))
|
||||
|
||||
metrics.DataNodeConsumeMsgCount.
|
||||
WithLabelValues(fmt.Sprint(paramtable.GetNodeID()), metrics.DeleteLabel, fmt.Sprint(ddn.collectionID)).
|
||||
|
@ -146,7 +146,7 @@ func TestFlowGraph_DDNode_Operate(t *testing.T) {
|
||||
}
|
||||
|
||||
var dropCollMsg msgstream.TsMsg = &msgstream.DropCollectionMsg{
|
||||
DropCollectionRequest: msgpb.DropCollectionRequest{
|
||||
DropCollectionRequest: &msgpb.DropCollectionRequest{
|
||||
Base: &commonpb.MsgBase{MsgType: commonpb.MsgType_DropCollection},
|
||||
CollectionID: test.msgCollID,
|
||||
},
|
||||
@ -199,7 +199,7 @@ func TestFlowGraph_DDNode_Operate(t *testing.T) {
|
||||
}
|
||||
|
||||
var dropPartMsg msgstream.TsMsg = &msgstream.DropPartitionMsg{
|
||||
DropPartitionRequest: msgpb.DropPartitionRequest{
|
||||
DropPartitionRequest: &msgpb.DropPartitionRequest{
|
||||
Base: &commonpb.MsgBase{MsgType: commonpb.MsgType_DropPartition},
|
||||
CollectionID: test.msgCollID,
|
||||
PartitionID: test.msgPartID,
|
||||
@ -261,7 +261,7 @@ func TestFlowGraph_DDNode_Operate(t *testing.T) {
|
||||
EndTimestamp: test.MsgEndTs,
|
||||
HashValues: []uint32{0},
|
||||
},
|
||||
DeleteRequest: msgpb.DeleteRequest{
|
||||
DeleteRequest: &msgpb.DeleteRequest{
|
||||
Base: &commonpb.MsgBase{MsgType: commonpb.MsgType_Delete},
|
||||
ShardName: "by-dev-rootcoord-dml-mock-0",
|
||||
CollectionID: test.inMsgCollID,
|
||||
@ -595,7 +595,7 @@ func getInsertMsg(segmentID UniqueID, ts Timestamp) *msgstream.InsertMsg {
|
||||
func getInsertMsgWithChannel(segmentID UniqueID, ts Timestamp, vChannelName string) *msgstream.InsertMsg {
|
||||
return &msgstream.InsertMsg{
|
||||
BaseMsg: msgstream.BaseMsg{EndTimestamp: ts},
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{MsgType: commonpb.MsgType_Insert},
|
||||
SegmentID: segmentID,
|
||||
CollectionID: 1,
|
||||
|
@ -4,10 +4,10 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/samber/lo"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/msgpb"
|
||||
|
@ -751,7 +751,7 @@ func (df *DataFactory) GenMsgStreamInsertMsg(idx int, chanName string) *msgstrea
|
||||
BaseMsg: msgstream.BaseMsg{
|
||||
HashValues: []uint32{uint32(idx)},
|
||||
},
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
MsgID: 0,
|
||||
@ -781,7 +781,7 @@ func (df *DataFactory) GenMsgStreamInsertMsgWithTs(idx int, chanName string, ts
|
||||
BeginTimestamp: ts,
|
||||
EndTimestamp: ts,
|
||||
},
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
MsgID: 0,
|
||||
@ -831,7 +831,7 @@ func (df *DataFactory) GenMsgStreamDeleteMsg(pks []storage.PrimaryKey, chanName
|
||||
BaseMsg: msgstream.BaseMsg{
|
||||
HashValues: []uint32{uint32(idx)},
|
||||
},
|
||||
DeleteRequest: msgpb.DeleteRequest{
|
||||
DeleteRequest: &msgpb.DeleteRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Delete,
|
||||
MsgID: 0,
|
||||
@ -857,7 +857,7 @@ func (df *DataFactory) GenMsgStreamDeleteMsgWithTs(idx int, pks []storage.Primar
|
||||
BeginTimestamp: ts,
|
||||
EndTimestamp: ts,
|
||||
},
|
||||
DeleteRequest: msgpb.DeleteRequest{
|
||||
DeleteRequest: &msgpb.DeleteRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Delete,
|
||||
MsgID: 1,
|
||||
|
@ -58,7 +58,7 @@ func (u *mqStatsUpdater) send(ts Timestamp, segmentIDs []int64) error {
|
||||
EndTimestamp: ts,
|
||||
HashValues: []uint32{0},
|
||||
},
|
||||
DataNodeTtMsg: msgpb.DataNodeTtMsg{
|
||||
DataNodeTtMsg: &msgpb.DataNodeTtMsg{
|
||||
Base: commonpbutil.NewMsgBase(
|
||||
commonpbutil.WithMsgType(commonpb.MsgType_DataNodeTt),
|
||||
commonpbutil.WithTimeStamp(ts),
|
||||
|
@ -132,7 +132,7 @@ func (s *BFWriteBufferSuite) composeInsertMsg(segmentID int64, rowCount int, dim
|
||||
}
|
||||
flatten := lo.Flatten(vectors)
|
||||
return tss, &msgstream.InsertMsg{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
SegmentID: segmentID,
|
||||
Version: msgpb.InsertDataVersion_ColumnBased,
|
||||
RowIDs: tss,
|
||||
@ -183,7 +183,7 @@ func (s *BFWriteBufferSuite) composeInsertMsg(segmentID int64, rowCount int, dim
|
||||
|
||||
func (s *BFWriteBufferSuite) composeDeleteMsg(pks []storage.PrimaryKey) *msgstream.DeleteMsg {
|
||||
delMsg := &msgstream.DeleteMsg{
|
||||
DeleteRequest: msgpb.DeleteRequest{
|
||||
DeleteRequest: &msgpb.DeleteRequest{
|
||||
PrimaryKeys: storage.ParsePrimaryKeys2IDs(pks),
|
||||
Timestamps: lo.RepeatBy(len(pks), func(idx int) uint64 { return tsoutil.ComposeTSByTime(time.Now(), int64(idx+1)) }),
|
||||
},
|
||||
|
@ -53,7 +53,7 @@ func (s *InsertBufferSuite) composeInsertMsg(rowCount int, dim int) ([]int64, *m
|
||||
})
|
||||
flatten := lo.Flatten(vectors)
|
||||
return tss, &msgstream.InsertMsg{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Version: msgpb.InsertDataVersion_ColumnBased,
|
||||
RowIDs: tss,
|
||||
Timestamps: lo.Map(tss, func(id int64, _ int) uint64 { return uint64(id) }),
|
||||
|
@ -103,7 +103,7 @@ func (s *L0WriteBufferSuite) composeInsertMsg(segmentID int64, rowCount int, dim
|
||||
}
|
||||
}
|
||||
return tss, &msgstream.InsertMsg{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
SegmentID: segmentID,
|
||||
Version: msgpb.InsertDataVersion_ColumnBased,
|
||||
RowIDs: tss,
|
||||
@ -154,7 +154,7 @@ func (s *L0WriteBufferSuite) composeInsertMsg(segmentID int64, rowCount int, dim
|
||||
|
||||
func (s *L0WriteBufferSuite) composeDeleteMsg(pks []storage.PrimaryKey) *msgstream.DeleteMsg {
|
||||
delMsg := &msgstream.DeleteMsg{
|
||||
DeleteRequest: msgpb.DeleteRequest{
|
||||
DeleteRequest: &msgpb.DeleteRequest{
|
||||
PrimaryKeys: storage.ParsePrimaryKeys2IDs(pks),
|
||||
Timestamps: lo.RepeatBy(len(pks), func(idx int) uint64 { return tsoutil.ComposeTSByTime(time.Now(), int64(idx)+1) }),
|
||||
},
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
"github.com/milvus-io/milvus/internal/types"
|
||||
|
@ -209,7 +209,7 @@ func (m *mockProxyComponent) Query(ctx context.Context, request *milvuspb.QueryR
|
||||
return &queryResult, nil
|
||||
}
|
||||
|
||||
var flushResult = milvuspb.FlushResponse{
|
||||
var flushResult = &milvuspb.FlushResponse{
|
||||
DbName: "default",
|
||||
}
|
||||
|
||||
@ -217,10 +217,10 @@ func (m *mockProxyComponent) Flush(ctx context.Context, request *milvuspb.FlushR
|
||||
if len(request.CollectionNames) < 1 {
|
||||
return nil, errors.New("body parse err")
|
||||
}
|
||||
return &flushResult, nil
|
||||
return flushResult, nil
|
||||
}
|
||||
|
||||
var calcDistanceResult = milvuspb.CalcDistanceResults{
|
||||
var calcDistanceResult = &milvuspb.CalcDistanceResults{
|
||||
Array: &milvuspb.CalcDistanceResults_IntDist{
|
||||
IntDist: &schemapb.IntArray{
|
||||
Data: []int32{1, 2, 3},
|
||||
@ -232,7 +232,7 @@ func (m *mockProxyComponent) CalcDistance(ctx context.Context, request *milvuspb
|
||||
if len(request.Params) < 1 {
|
||||
return nil, errors.New("body parse err")
|
||||
}
|
||||
return &calcDistanceResult, nil
|
||||
return calcDistanceResult, nil
|
||||
}
|
||||
|
||||
func (m *mockProxyComponent) GetFlushState(ctx context.Context, request *milvuspb.GetFlushStateRequest) (*milvuspb.GetFlushStateResponse, error) {
|
||||
|
@ -8,10 +8,10 @@ import (
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gin-gonic/gin/binding"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/tidwall/gjson"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
|
@ -13,13 +13,13 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gin-gonic/gin/binding"
|
||||
validator "github.com/go-playground/validator/v10"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/samber/lo"
|
||||
"github.com/tidwall/gjson"
|
||||
"go.opentelemetry.io/otel"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
|
@ -1379,10 +1379,10 @@ func TestSearchV2(t *testing.T) {
|
||||
bfloat16VectorField.Name = "bfloat16Vector"
|
||||
sparseFloatVectorField := generateVectorFieldSchema(schemapb.DataType_SparseFloatVector)
|
||||
sparseFloatVectorField.Name = "sparseFloatVector"
|
||||
collSchema.Fields = append(collSchema.Fields, &binaryVectorField)
|
||||
collSchema.Fields = append(collSchema.Fields, &float16VectorField)
|
||||
collSchema.Fields = append(collSchema.Fields, &bfloat16VectorField)
|
||||
collSchema.Fields = append(collSchema.Fields, &sparseFloatVectorField)
|
||||
collSchema.Fields = append(collSchema.Fields, binaryVectorField)
|
||||
collSchema.Fields = append(collSchema.Fields, float16VectorField)
|
||||
collSchema.Fields = append(collSchema.Fields, bfloat16VectorField)
|
||||
collSchema.Fields = append(collSchema.Fields, sparseFloatVectorField)
|
||||
mp.EXPECT().DescribeCollection(mock.Anything, mock.Anything).Return(&milvuspb.DescribeCollectionResponse{
|
||||
CollectionName: DefaultCollectionName,
|
||||
Schema: collSchema,
|
||||
|
@ -11,10 +11,10 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/spf13/cast"
|
||||
"github.com/tidwall/gjson"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
|
@ -8,9 +8,9 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/tidwall/gjson"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
@ -27,8 +27,8 @@ const (
|
||||
|
||||
var DefaultScores = []float32{0.01, 0.04, 0.09}
|
||||
|
||||
func generatePrimaryField(datatype schemapb.DataType) schemapb.FieldSchema {
|
||||
return schemapb.FieldSchema{
|
||||
func generatePrimaryField(datatype schemapb.DataType) *schemapb.FieldSchema {
|
||||
return &schemapb.FieldSchema{
|
||||
FieldID: common.StartOfUserFieldID,
|
||||
Name: FieldBookID,
|
||||
IsPrimaryKey: true,
|
||||
@ -69,12 +69,12 @@ func generateIDs(dataType schemapb.DataType, num int) *schemapb.IDs {
|
||||
return nil
|
||||
}
|
||||
|
||||
func generateVectorFieldSchema(dataType schemapb.DataType) schemapb.FieldSchema {
|
||||
func generateVectorFieldSchema(dataType schemapb.DataType) *schemapb.FieldSchema {
|
||||
dim := "2"
|
||||
if dataType == schemapb.DataType_BinaryVector {
|
||||
dim = "8"
|
||||
}
|
||||
return schemapb.FieldSchema{
|
||||
return &schemapb.FieldSchema{
|
||||
FieldID: common.StartOfUserFieldID + int64(dataType),
|
||||
IsPrimaryKey: false,
|
||||
DataType: dataType,
|
||||
@ -97,14 +97,14 @@ func generateCollectionSchema(primaryDataType schemapb.DataType) *schemapb.Colle
|
||||
Description: "",
|
||||
AutoID: false,
|
||||
Fields: []*schemapb.FieldSchema{
|
||||
&primaryField, {
|
||||
primaryField, {
|
||||
FieldID: common.StartOfUserFieldID + 1,
|
||||
Name: FieldWordCount,
|
||||
IsPrimaryKey: false,
|
||||
Description: "",
|
||||
DataType: 5,
|
||||
AutoID: false,
|
||||
}, &vectorField,
|
||||
}, vectorField,
|
||||
},
|
||||
EnableDynamicField: true,
|
||||
}
|
||||
@ -465,14 +465,14 @@ func TestPrimaryField(t *testing.T) {
|
||||
primaryField := generatePrimaryField(schemapb.DataType_Int64)
|
||||
field, ok := getPrimaryField(coll)
|
||||
assert.Equal(t, true, ok)
|
||||
assert.Equal(t, primaryField, *field)
|
||||
assert.EqualExportedValues(t, primaryField, field)
|
||||
|
||||
assert.Equal(t, "1,2,3", joinArray([]int64{1, 2, 3}))
|
||||
assert.Equal(t, "1,2,3", joinArray([]string{"1", "2", "3"}))
|
||||
|
||||
jsonStr := "{\"id\": [1, 2, 3]}"
|
||||
idStr := gjson.Get(jsonStr, "id")
|
||||
rangeStr, err := convertRange(&primaryField, idStr)
|
||||
rangeStr, err := convertRange(primaryField, idStr)
|
||||
assert.Equal(t, nil, err)
|
||||
assert.Equal(t, "1,2,3", rangeStr)
|
||||
filter, err := checkGetPrimaryKey(coll, idStr)
|
||||
@ -482,7 +482,7 @@ func TestPrimaryField(t *testing.T) {
|
||||
primaryField = generatePrimaryField(schemapb.DataType_VarChar)
|
||||
jsonStr = "{\"id\": [\"1\", \"2\", \"3\"]}"
|
||||
idStr = gjson.Get(jsonStr, "id")
|
||||
rangeStr, err = convertRange(&primaryField, idStr)
|
||||
rangeStr, err = convertRange(primaryField, idStr)
|
||||
assert.Equal(t, nil, err)
|
||||
assert.Equal(t, `"1","2","3"`, rangeStr)
|
||||
coll2 := generateCollectionSchema(schemapb.DataType_VarChar)
|
||||
@ -524,7 +524,7 @@ func TestInsertWithoutVector(t *testing.T) {
|
||||
err, _ = checkAndSetData(body, &schemapb.CollectionSchema{
|
||||
Name: DefaultCollectionName,
|
||||
Fields: []*schemapb.FieldSchema{
|
||||
&primaryField, &floatVectorField,
|
||||
primaryField, floatVectorField,
|
||||
},
|
||||
EnableDynamicField: true,
|
||||
})
|
||||
@ -533,7 +533,7 @@ func TestInsertWithoutVector(t *testing.T) {
|
||||
err, _ = checkAndSetData(body, &schemapb.CollectionSchema{
|
||||
Name: DefaultCollectionName,
|
||||
Fields: []*schemapb.FieldSchema{
|
||||
&primaryField, &binaryVectorField,
|
||||
primaryField, binaryVectorField,
|
||||
},
|
||||
EnableDynamicField: true,
|
||||
})
|
||||
@ -542,7 +542,7 @@ func TestInsertWithoutVector(t *testing.T) {
|
||||
err, _ = checkAndSetData(body, &schemapb.CollectionSchema{
|
||||
Name: DefaultCollectionName,
|
||||
Fields: []*schemapb.FieldSchema{
|
||||
&primaryField, &float16VectorField,
|
||||
primaryField, float16VectorField,
|
||||
},
|
||||
EnableDynamicField: true,
|
||||
})
|
||||
@ -551,7 +551,7 @@ func TestInsertWithoutVector(t *testing.T) {
|
||||
err, _ = checkAndSetData(body, &schemapb.CollectionSchema{
|
||||
Name: DefaultCollectionName,
|
||||
Fields: []*schemapb.FieldSchema{
|
||||
&primaryField, &bfloat16VectorField,
|
||||
primaryField, bfloat16VectorField,
|
||||
},
|
||||
EnableDynamicField: true,
|
||||
})
|
||||
@ -1293,7 +1293,7 @@ func TestVector(t *testing.T) {
|
||||
Description: "",
|
||||
AutoID: false,
|
||||
Fields: []*schemapb.FieldSchema{
|
||||
&primaryField, &floatVectorField, &binaryVectorField, &float16VectorField, &bfloat16VectorField, &sparseFloatVectorField,
|
||||
primaryField, floatVectorField, binaryVectorField, float16VectorField, bfloat16VectorField, sparseFloatVectorField,
|
||||
},
|
||||
EnableDynamicField: true,
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"math"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
|
@ -20,8 +20,8 @@ import (
|
||||
"math/rand"
|
||||
"testing"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus/internal/proto/datapb"
|
||||
|
@ -23,10 +23,10 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"go.uber.org/zap"
|
||||
"golang.org/x/exp/maps"
|
||||
"golang.org/x/sync/errgroup"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/msgpb"
|
||||
|
@ -27,10 +27,10 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"golang.org/x/exp/maps"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/msgpb"
|
||||
@ -1364,7 +1364,7 @@ func TestCatalog_Import(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
|
||||
err = kc.SaveImportJob(nil)
|
||||
assert.Error(t, err)
|
||||
assert.NoError(t, err)
|
||||
|
||||
txn = mocks.NewMetaKv(t)
|
||||
txn.EXPECT().Save(mock.Anything, mock.Anything).Return(mockErr)
|
||||
@ -1418,7 +1418,7 @@ func TestCatalog_Import(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
|
||||
err = kc.SavePreImportTask(nil)
|
||||
assert.Error(t, err)
|
||||
assert.NoError(t, err)
|
||||
|
||||
txn = mocks.NewMetaKv(t)
|
||||
txn.EXPECT().Save(mock.Anything, mock.Anything).Return(mockErr)
|
||||
@ -1472,7 +1472,7 @@ func TestCatalog_Import(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
|
||||
err = kc.SaveImportTask(nil)
|
||||
assert.Error(t, err)
|
||||
assert.NoError(t, err)
|
||||
|
||||
txn = mocks.NewMetaKv(t)
|
||||
txn.EXPECT().Save(mock.Anything, mock.Anything).Return(mockErr)
|
||||
|
@ -19,8 +19,8 @@ package datacoord
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/proto/datapb"
|
||||
"github.com/milvus-io/milvus/internal/storage"
|
||||
|
@ -6,11 +6,11 @@ import (
|
||||
"io"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/klauspost/compress/zstd"
|
||||
"github.com/pingcap/log"
|
||||
"github.com/samber/lo"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
"github.com/milvus-io/milvus/internal/proto/querypb"
|
||||
|
@ -7,9 +7,9 @@ import (
|
||||
"sort"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/samber/lo"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
|
||||
|
@ -9,13 +9,13 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"github.com/stretchr/testify/require"
|
||||
"go.uber.org/atomic"
|
||||
"go.uber.org/zap"
|
||||
"golang.org/x/exp/maps"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
@ -1273,7 +1273,7 @@ func TestCatalog_DropCollection(t *testing.T) {
|
||||
}
|
||||
|
||||
func getUserInfoMetaString(username string) string {
|
||||
validInfo := internalpb.CredentialInfo{Username: username, EncryptedPassword: "pwd" + username}
|
||||
validInfo := &internalpb.CredentialInfo{Username: username, EncryptedPassword: "pwd" + username}
|
||||
validBytes, _ := json.Marshal(validInfo)
|
||||
return string(validBytes)
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/golang/protobuf/proto"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus/internal/proto/indexpb"
|
||||
|
@ -22,13 +22,13 @@ import (
|
||||
"path"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/peer"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
|
@ -4,10 +4,11 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/protobuf/encoding/prototext"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
"github.com/milvus-io/milvus/pkg/util"
|
||||
@ -133,7 +134,7 @@ func TestDatabaseInterceptor(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
|
||||
if len(after) != len(before) {
|
||||
t.Errorf("req has been modified:%s", req.String())
|
||||
t.Errorf("req has been modified:%s", prototext.Format(req))
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -26,11 +26,11 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/samber/lo"
|
||||
"go.opentelemetry.io/otel"
|
||||
"go.uber.org/zap"
|
||||
"golang.org/x/sync/errgroup"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/federpb"
|
||||
@ -2515,7 +2515,7 @@ func (node *Proxy) Insert(ctx context.Context, request *milvuspb.InsertRequest)
|
||||
BaseMsg: msgstream.BaseMsg{
|
||||
HashValues: request.HashKeys,
|
||||
},
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: commonpbutil.NewMsgBase(
|
||||
commonpbutil.WithMsgType(commonpb.MsgType_Insert),
|
||||
commonpbutil.WithSourceID(paramtable.GetNodeID()),
|
||||
|
@ -1421,14 +1421,13 @@ func TestProxy_ReplicateMessage(t *testing.T) {
|
||||
}
|
||||
|
||||
{
|
||||
timeTickResult := msgpb.TimeTickMsg{}
|
||||
timeTickMsg := &msgstream.TimeTickMsg{
|
||||
BaseMsg: msgstream.BaseMsg{
|
||||
BeginTimestamp: 1,
|
||||
EndTimestamp: 10,
|
||||
HashValues: []uint32{0},
|
||||
},
|
||||
TimeTickMsg: timeTickResult,
|
||||
TimeTickMsg: &msgpb.TimeTickMsg{},
|
||||
}
|
||||
msgBytes, _ := timeTickMsg.Marshal(timeTickMsg)
|
||||
resp, err := node.ReplicateMessage(context.TODO(), &milvuspb.ReplicateMessageRequest{
|
||||
@ -1441,20 +1440,19 @@ func TestProxy_ReplicateMessage(t *testing.T) {
|
||||
}
|
||||
|
||||
{
|
||||
timeTickResult := msgpb.TimeTickMsg{
|
||||
Base: commonpbutil.NewMsgBase(
|
||||
commonpbutil.WithMsgType(commonpb.MsgType(-1)),
|
||||
commonpbutil.WithTimeStamp(10),
|
||||
commonpbutil.WithSourceID(-1),
|
||||
),
|
||||
}
|
||||
timeTickMsg := &msgstream.TimeTickMsg{
|
||||
BaseMsg: msgstream.BaseMsg{
|
||||
BeginTimestamp: 1,
|
||||
EndTimestamp: 10,
|
||||
HashValues: []uint32{0},
|
||||
},
|
||||
TimeTickMsg: timeTickResult,
|
||||
TimeTickMsg: &msgpb.TimeTickMsg{
|
||||
Base: commonpbutil.NewMsgBase(
|
||||
commonpbutil.WithMsgType(commonpb.MsgType(-1)),
|
||||
commonpbutil.WithTimeStamp(10),
|
||||
commonpbutil.WithSourceID(-1),
|
||||
),
|
||||
},
|
||||
}
|
||||
msgBytes, _ := timeTickMsg.Marshal(timeTickMsg)
|
||||
resp, err := node.ReplicateMessage(context.TODO(), &milvuspb.ReplicateMessageRequest{
|
||||
@ -1512,7 +1510,7 @@ func TestProxy_ReplicateMessage(t *testing.T) {
|
||||
MsgID: []byte("mock message id 2"),
|
||||
},
|
||||
},
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
MsgID: 10001,
|
||||
|
@ -21,10 +21,10 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"github.com/stretchr/testify/suite"
|
||||
"go.uber.org/atomic"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
|
@ -50,7 +50,7 @@ func genInsertMsgsByPartition(ctx context.Context,
|
||||
|
||||
// create empty insert message
|
||||
createInsertMsg := func(segmentID UniqueID, channelName string) *msgstream.InsertMsg {
|
||||
insertReq := msgpb.InsertRequest{
|
||||
insertReq := &msgpb.InsertRequest{
|
||||
Base: commonpbutil.NewMsgBase(
|
||||
commonpbutil.WithMsgType(commonpb.MsgType_Insert),
|
||||
commonpbutil.WithTimeStamp(insertMsg.BeginTimestamp), // entity's timestamp was set to equal it.BeginTimestamp in preExecute()
|
||||
@ -63,9 +63,8 @@ func genInsertMsgsByPartition(ctx context.Context,
|
||||
SegmentID: segmentID,
|
||||
ShardName: channelName,
|
||||
Version: msgpb.InsertDataVersion_ColumnBased,
|
||||
FieldsData: make([]*schemapb.FieldData, len(insertMsg.GetFieldsData())),
|
||||
}
|
||||
insertReq.FieldsData = make([]*schemapb.FieldData, len(insertMsg.GetFieldsData()))
|
||||
|
||||
msg := &msgstream.InsertMsg{
|
||||
BaseMsg: msgstream.BaseMsg{
|
||||
Ctx: ctx,
|
||||
|
@ -20,9 +20,9 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
@ -91,7 +91,7 @@ func TestRepackInsertData(t *testing.T) {
|
||||
BaseMsg: msgstream.BaseMsg{
|
||||
HashValues: hash,
|
||||
},
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
MsgID: 0,
|
||||
@ -201,7 +201,7 @@ func TestRepackInsertDataWithPartitionKey(t *testing.T) {
|
||||
BaseMsg: msgstream.BaseMsg{
|
||||
HashValues: hash,
|
||||
},
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
MsgID: 0,
|
||||
|
@ -31,7 +31,6 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/stretchr/testify/assert"
|
||||
@ -40,6 +39,7 @@ import (
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/keepalive"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
|
@ -21,10 +21,10 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
|
@ -24,8 +24,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
|
@ -23,8 +23,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
|
@ -6,10 +6,10 @@ import (
|
||||
"io"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"go.opentelemetry.io/otel"
|
||||
"go.uber.org/atomic"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
@ -202,26 +202,25 @@ func (dt *deleteTask) newDeleteMsg(ctx context.Context) (*msgstream.DeleteMsg, e
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to allocate MsgID of delete")
|
||||
}
|
||||
sliceRequest := msgpb.DeleteRequest{
|
||||
Base: commonpbutil.NewMsgBase(
|
||||
commonpbutil.WithMsgType(commonpb.MsgType_Delete),
|
||||
// msgid of delete msg must be set
|
||||
// or it will be seen as duplicated msg in mq
|
||||
commonpbutil.WithMsgID(msgid),
|
||||
commonpbutil.WithTimeStamp(dt.ts),
|
||||
commonpbutil.WithSourceID(paramtable.GetNodeID()),
|
||||
),
|
||||
CollectionID: dt.collectionID,
|
||||
PartitionID: dt.partitionID,
|
||||
CollectionName: dt.req.GetCollectionName(),
|
||||
PartitionName: dt.req.GetPartitionName(),
|
||||
PrimaryKeys: &schemapb.IDs{},
|
||||
}
|
||||
return &msgstream.DeleteMsg{
|
||||
BaseMsg: msgstream.BaseMsg{
|
||||
Ctx: ctx,
|
||||
},
|
||||
DeleteRequest: sliceRequest,
|
||||
DeleteRequest: &msgpb.DeleteRequest{
|
||||
Base: commonpbutil.NewMsgBase(
|
||||
commonpbutil.WithMsgType(commonpb.MsgType_Delete),
|
||||
// msgid of delete msg must be set
|
||||
// or it will be seen as duplicated msg in mq
|
||||
commonpbutil.WithMsgID(msgid),
|
||||
commonpbutil.WithTimeStamp(dt.ts),
|
||||
commonpbutil.WithSourceID(paramtable.GetNodeID()),
|
||||
),
|
||||
CollectionID: dt.collectionID,
|
||||
PartitionID: dt.partitionID,
|
||||
CollectionName: dt.req.GetCollectionName(),
|
||||
PartitionName: dt.req.GetPartitionName(),
|
||||
PrimaryKeys: &schemapb.IDs{},
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ func TestInsertTask_CheckAligned(t *testing.T) {
|
||||
// passed NumRows is less than 0
|
||||
case1 := insertTask{
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -52,7 +52,7 @@ func TestInsertTask_CheckAligned(t *testing.T) {
|
||||
dim := 128
|
||||
case2 := insertTask{
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -275,7 +275,7 @@ func TestInsertTask(t *testing.T) {
|
||||
it := insertTask{
|
||||
ctx: context.Background(),
|
||||
insertMsg: &msgstream.InsertMsg{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
CollectionName: collectionName,
|
||||
},
|
||||
},
|
||||
@ -297,7 +297,7 @@ func TestMaxInsertSize(t *testing.T) {
|
||||
it := insertTask{
|
||||
ctx: context.Background(),
|
||||
insertMsg: &msgstream.InsertMsg{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
DbName: "hooooooo",
|
||||
CollectionName: "fooooo",
|
||||
},
|
||||
|
@ -7,9 +7,9 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/samber/lo"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
|
@ -22,11 +22,11 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"github.com/stretchr/testify/require"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
|
@ -582,7 +582,7 @@ func TestTaskScheduler_concurrentPushAndPop(t *testing.T) {
|
||||
it := &insertTask{
|
||||
ctx: context.Background(),
|
||||
insertMsg: &msgstream.InsertMsg{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{},
|
||||
CollectionName: collectionName,
|
||||
},
|
||||
|
@ -7,10 +7,10 @@ import (
|
||||
"strconv"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/samber/lo"
|
||||
"go.opentelemetry.io/otel"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
|
@ -23,12 +23,12 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
|
@ -6,9 +6,9 @@ import (
|
||||
"strconv"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"go.opentelemetry.io/otel"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
|
@ -20,9 +20,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"github.com/stretchr/testify/suite"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
|
@ -27,10 +27,10 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
@ -1712,7 +1712,7 @@ func TestTask_Int64PrimaryKey(t *testing.T) {
|
||||
BaseMsg: msgstream.BaseMsg{
|
||||
HashValues: hash,
|
||||
},
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
MsgID: 0,
|
||||
@ -1906,7 +1906,7 @@ func TestTask_VarCharPrimaryKey(t *testing.T) {
|
||||
BaseMsg: msgstream.BaseMsg{
|
||||
HashValues: hash,
|
||||
},
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
MsgID: 0,
|
||||
@ -1962,7 +1962,7 @@ func TestTask_VarCharPrimaryKey(t *testing.T) {
|
||||
BaseMsg: msgstream.BaseMsg{
|
||||
HashValues: hash,
|
||||
},
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
MsgID: 0,
|
||||
@ -1979,7 +1979,7 @@ func TestTask_VarCharPrimaryKey(t *testing.T) {
|
||||
BaseMsg: msgstream.BaseMsg{
|
||||
HashValues: hash,
|
||||
},
|
||||
DeleteRequest: msgpb.DeleteRequest{
|
||||
DeleteRequest: &msgpb.DeleteRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Delete,
|
||||
MsgID: 0,
|
||||
@ -3322,7 +3322,7 @@ func TestPartitionKey(t *testing.T) {
|
||||
it := &insertTask{
|
||||
insertMsg: &BaseInsertTask{
|
||||
BaseMsg: msgstream.BaseMsg{},
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
MsgID: 0,
|
||||
|
@ -324,7 +324,7 @@ func (it *upsertTask) PreExecute(ctx context.Context) error {
|
||||
|
||||
it.upsertMsg = &msgstream.UpsertMsg{
|
||||
InsertMsg: &msgstream.InsertMsg{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: commonpbutil.NewMsgBase(
|
||||
commonpbutil.WithMsgType(commonpb.MsgType_Insert),
|
||||
commonpbutil.WithSourceID(paramtable.GetNodeID()),
|
||||
@ -338,7 +338,7 @@ func (it *upsertTask) PreExecute(ctx context.Context) error {
|
||||
},
|
||||
},
|
||||
DeleteMsg: &msgstream.DeleteMsg{
|
||||
DeleteRequest: msgpb.DeleteRequest{
|
||||
DeleteRequest: &msgpb.DeleteRequest{
|
||||
Base: commonpbutil.NewMsgBase(
|
||||
commonpbutil.WithMsgType(commonpb.MsgType_Delete),
|
||||
commonpbutil.WithSourceID(paramtable.GetNodeID()),
|
||||
@ -466,7 +466,7 @@ func (it *upsertTask) deleteExecute(ctx context.Context, msgPack *msgstream.MsgP
|
||||
if err != nil {
|
||||
errors.Wrap(err, "failed to allocate MsgID for delete of upsert")
|
||||
}
|
||||
sliceRequest := msgpb.DeleteRequest{
|
||||
sliceRequest := &msgpb.DeleteRequest{
|
||||
Base: commonpbutil.NewMsgBase(
|
||||
commonpbutil.WithMsgType(commonpb.MsgType_Delete),
|
||||
commonpbutil.WithTimeStamp(ts),
|
||||
|
@ -41,11 +41,11 @@ func TestUpsertTask_CheckAligned(t *testing.T) {
|
||||
},
|
||||
upsertMsg: &msgstream.UpsertMsg{
|
||||
InsertMsg: &msgstream.InsertMsg{
|
||||
InsertRequest: msgpb.InsertRequest{},
|
||||
InsertRequest: &msgpb.InsertRequest{},
|
||||
},
|
||||
},
|
||||
}
|
||||
case1.upsertMsg.InsertMsg.InsertRequest = msgpb.InsertRequest{
|
||||
case1.upsertMsg.InsertMsg.InsertRequest = &msgpb.InsertRequest{
|
||||
Base: commonpbutil.NewMsgBase(
|
||||
commonpbutil.WithMsgType(commonpb.MsgType_Insert),
|
||||
),
|
||||
@ -102,7 +102,7 @@ func TestUpsertTask_CheckAligned(t *testing.T) {
|
||||
schema: schema,
|
||||
upsertMsg: &msgstream.UpsertMsg{
|
||||
InsertMsg: &msgstream.InsertMsg{
|
||||
InsertRequest: msgpb.InsertRequest{},
|
||||
InsertRequest: &msgpb.InsertRequest{},
|
||||
},
|
||||
},
|
||||
}
|
||||
@ -120,7 +120,7 @@ func TestUpsertTask_CheckAligned(t *testing.T) {
|
||||
newBinaryVectorFieldData("BinaryVector", numRows, dim),
|
||||
newScalarFieldData(varCharFieldSchema, "VarChar", numRows),
|
||||
}
|
||||
case2.upsertMsg.InsertMsg.InsertRequest = msgpb.InsertRequest{
|
||||
case2.upsertMsg.InsertMsg.InsertRequest = &msgpb.InsertRequest{
|
||||
Base: commonpbutil.NewMsgBase(
|
||||
commonpbutil.WithMsgType(commonpb.MsgType_Insert),
|
||||
),
|
||||
|
@ -1569,52 +1569,52 @@ func SendReplicateMessagePack(ctx context.Context, replicateMsgStream msgstream.
|
||||
case *milvuspb.CreateDatabaseRequest:
|
||||
tsMsg = &msgstream.CreateDatabaseMsg{
|
||||
BaseMsg: getBaseMsg(ctx, ts),
|
||||
CreateDatabaseRequest: *r,
|
||||
CreateDatabaseRequest: r,
|
||||
}
|
||||
case *milvuspb.DropDatabaseRequest:
|
||||
tsMsg = &msgstream.DropDatabaseMsg{
|
||||
BaseMsg: getBaseMsg(ctx, ts),
|
||||
DropDatabaseRequest: *r,
|
||||
DropDatabaseRequest: r,
|
||||
}
|
||||
case *milvuspb.FlushRequest:
|
||||
tsMsg = &msgstream.FlushMsg{
|
||||
BaseMsg: getBaseMsg(ctx, ts),
|
||||
FlushRequest: *r,
|
||||
FlushRequest: r,
|
||||
}
|
||||
case *milvuspb.LoadCollectionRequest:
|
||||
tsMsg = &msgstream.LoadCollectionMsg{
|
||||
BaseMsg: getBaseMsg(ctx, ts),
|
||||
LoadCollectionRequest: *r,
|
||||
LoadCollectionRequest: r,
|
||||
}
|
||||
case *milvuspb.ReleaseCollectionRequest:
|
||||
tsMsg = &msgstream.ReleaseCollectionMsg{
|
||||
BaseMsg: getBaseMsg(ctx, ts),
|
||||
ReleaseCollectionRequest: *r,
|
||||
ReleaseCollectionRequest: r,
|
||||
}
|
||||
case *milvuspb.CreateIndexRequest:
|
||||
tsMsg = &msgstream.CreateIndexMsg{
|
||||
BaseMsg: getBaseMsg(ctx, ts),
|
||||
CreateIndexRequest: *r,
|
||||
CreateIndexRequest: r,
|
||||
}
|
||||
case *milvuspb.DropIndexRequest:
|
||||
tsMsg = &msgstream.DropIndexMsg{
|
||||
BaseMsg: getBaseMsg(ctx, ts),
|
||||
DropIndexRequest: *r,
|
||||
DropIndexRequest: r,
|
||||
}
|
||||
case *milvuspb.LoadPartitionsRequest:
|
||||
tsMsg = &msgstream.LoadPartitionsMsg{
|
||||
BaseMsg: getBaseMsg(ctx, ts),
|
||||
LoadPartitionsRequest: *r,
|
||||
LoadPartitionsRequest: r,
|
||||
}
|
||||
case *milvuspb.ReleasePartitionsRequest:
|
||||
tsMsg = &msgstream.ReleasePartitionsMsg{
|
||||
BaseMsg: getBaseMsg(ctx, ts),
|
||||
ReleasePartitionsRequest: *r,
|
||||
ReleasePartitionsRequest: r,
|
||||
}
|
||||
case *milvuspb.AlterIndexRequest:
|
||||
tsMsg = &msgstream.AlterIndexMsg{
|
||||
BaseMsg: getBaseMsg(ctx, ts),
|
||||
AlterIndexRequest: *r,
|
||||
AlterIndexRequest: r,
|
||||
}
|
||||
default:
|
||||
log.Warn("unknown request", zap.Any("request", request))
|
||||
|
@ -1136,7 +1136,7 @@ func Test_InsertTaskcheckFieldsDataBySchema(t *testing.T) {
|
||||
Fields: []*schemapb.FieldSchema{},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -1168,7 +1168,7 @@ func Test_InsertTaskcheckFieldsDataBySchema(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -1202,7 +1202,7 @@ func Test_InsertTaskcheckFieldsDataBySchema(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -1231,7 +1231,7 @@ func Test_InsertTaskcheckFieldsDataBySchema(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -1259,7 +1259,7 @@ func Test_InsertTaskcheckFieldsDataBySchema(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -1287,7 +1287,7 @@ func Test_InsertTaskcheckFieldsDataBySchema(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -1321,7 +1321,7 @@ func Test_InsertTaskcheckFieldsDataBySchema(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -1365,7 +1365,7 @@ func Test_InsertTaskcheckFieldsDataBySchema(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -1399,7 +1399,7 @@ func Test_InsertTaskcheckFieldsDataBySchema(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -1432,7 +1432,7 @@ func Test_InsertTaskcheckFieldsDataBySchema(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -1465,7 +1465,7 @@ func Test_InsertTaskcheckFieldsDataBySchema(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -1507,7 +1507,7 @@ func Test_InsertTaskcheckFieldsDataBySchema(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -1549,7 +1549,7 @@ func Test_InsertTaskcheckFieldsDataBySchema(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -1592,7 +1592,7 @@ func Test_InsertTaskcheckFieldsDataBySchema(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -1628,7 +1628,7 @@ func Test_InsertTaskCheckPrimaryFieldData(t *testing.T) {
|
||||
Fields: []*schemapb.FieldSchema{},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -1663,7 +1663,7 @@ func Test_InsertTaskCheckPrimaryFieldData(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -1705,7 +1705,7 @@ func Test_InsertTaskCheckPrimaryFieldData(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -1747,7 +1747,7 @@ func Test_InsertTaskCheckPrimaryFieldData(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -1793,7 +1793,7 @@ func Test_UpsertTaskCheckPrimaryFieldData(t *testing.T) {
|
||||
Fields: []*schemapb.FieldSchema{},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -1830,7 +1830,7 @@ func Test_UpsertTaskCheckPrimaryFieldData(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -1873,7 +1873,7 @@ func Test_UpsertTaskCheckPrimaryFieldData(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -1918,7 +1918,7 @@ func Test_UpsertTaskCheckPrimaryFieldData(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -1963,7 +1963,7 @@ func Test_UpsertTaskCheckPrimaryFieldData(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -2009,7 +2009,7 @@ func Test_UpsertTaskCheckPrimaryFieldData(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -2048,7 +2048,7 @@ func Test_UpsertTaskCheckPrimaryFieldData(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -2089,7 +2089,7 @@ func Test_UpsertTaskCheckPrimaryFieldData(t *testing.T) {
|
||||
},
|
||||
},
|
||||
insertMsg: &BaseInsertTask{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Insert,
|
||||
},
|
||||
@ -2219,7 +2219,7 @@ func Test_CheckDynamicFieldData(t *testing.T) {
|
||||
jsonFieldData := autoGenDynamicFieldData(jsonData)
|
||||
schema := newTestSchema()
|
||||
insertMsg := &msgstream.InsertMsg{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
CollectionName: "collectionName",
|
||||
FieldsData: []*schemapb.FieldData{jsonFieldData},
|
||||
NumRows: 1,
|
||||
@ -2248,7 +2248,7 @@ func Test_CheckDynamicFieldData(t *testing.T) {
|
||||
jsonFieldData := autoGenDynamicFieldData(jsonData)
|
||||
schema := newTestSchema()
|
||||
insertMsg := &msgstream.InsertMsg{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
CollectionName: "collectionName",
|
||||
FieldsData: []*schemapb.FieldData{jsonFieldData},
|
||||
NumRows: 1,
|
||||
@ -2276,7 +2276,7 @@ func Test_CheckDynamicFieldData(t *testing.T) {
|
||||
jsonFieldData := autoGenDynamicFieldData(jsonData)
|
||||
schema := newTestSchema()
|
||||
insertMsg := &msgstream.InsertMsg{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
CollectionName: "collectionName",
|
||||
FieldsData: []*schemapb.FieldData{jsonFieldData},
|
||||
NumRows: 1,
|
||||
@ -2292,7 +2292,7 @@ func Test_CheckDynamicFieldData(t *testing.T) {
|
||||
jsonFieldData := autoGenDynamicFieldData([][]byte{[]byte(data)})
|
||||
schema := newTestSchema()
|
||||
insertMsg := &msgstream.InsertMsg{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
CollectionName: "collectionName",
|
||||
FieldsData: []*schemapb.FieldData{jsonFieldData},
|
||||
NumRows: 1,
|
||||
@ -2305,7 +2305,7 @@ func Test_CheckDynamicFieldData(t *testing.T) {
|
||||
t.Run("no json data", func(t *testing.T) {
|
||||
schema := newTestSchema()
|
||||
insertMsg := &msgstream.InsertMsg{
|
||||
InsertRequest: msgpb.InsertRequest{
|
||||
InsertRequest: &msgpb.InsertRequest{
|
||||
CollectionName: "collectionName",
|
||||
FieldsData: []*schemapb.FieldData{},
|
||||
NumRows: 1,
|
||||
|
2
internal/querycoordv2/dist/dist_handler.go
vendored
2
internal/querycoordv2/dist/dist_handler.go
vendored
@ -21,9 +21,9 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/samber/lo"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
"github.com/milvus-io/milvus/internal/proto/datapb"
|
||||
|
@ -19,8 +19,8 @@ package meta
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/samber/lo"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/proto/datapb"
|
||||
"github.com/milvus-io/milvus/pkg/util/typeutil"
|
||||
|
@ -23,10 +23,10 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/samber/lo"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/metastore"
|
||||
"github.com/milvus-io/milvus/internal/proto/querypb"
|
||||
|
@ -1,7 +1,7 @@
|
||||
package meta
|
||||
|
||||
import (
|
||||
"github.com/golang/protobuf/proto"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/proto/querypb"
|
||||
"github.com/milvus-io/milvus/pkg/util/paramtable"
|
||||
|
@ -19,9 +19,9 @@ package meta
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/samber/lo"
|
||||
"github.com/stretchr/testify/suite"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||
etcdkv "github.com/milvus-io/milvus/internal/kv/etcd"
|
||||
|
@ -2,7 +2,7 @@ package meta
|
||||
|
||||
import (
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/rgpb"
|
||||
"github.com/milvus-io/milvus/internal/proto/querypb"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user