mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-28 14:35:27 +08:00
feat: support TruncateCollection api to clear collection data (#46167)
issue: https://github.com/milvus-io/milvus/issues/46166 --------- Signed-off-by: sijie-ni-0214 <sijie.ni@zilliz.com>
This commit is contained in:
parent
d2c403ce4b
commit
f51de1a8ab
8
Makefile
8
Makefile
@ -499,7 +499,7 @@ generate-mockery-querycoord: getdeps
|
|||||||
$(INSTALL_PATH)/mockery --config $(PWD)/internal/querycoordv2/.mockery.yaml
|
$(INSTALL_PATH)/mockery --config $(PWD)/internal/querycoordv2/.mockery.yaml
|
||||||
|
|
||||||
generate-mockery-querynode-without-cpp:
|
generate-mockery-querynode-without-cpp:
|
||||||
@source $(PWD)/scripts/setenv.sh
|
@source $(PWD)/scripts/setenv.sh && \
|
||||||
$(INSTALL_PATH)/mockery --config $(PWD)/internal/querynodev2/.mockery.yaml
|
$(INSTALL_PATH)/mockery --config $(PWD)/internal/querynodev2/.mockery.yaml
|
||||||
|
|
||||||
generate-mockery-querynode: build-cpp generate-mockery-querynode-without-cpp
|
generate-mockery-querynode: build-cpp generate-mockery-querynode-without-cpp
|
||||||
@ -520,6 +520,7 @@ generate-mockery-flushcommon: getdeps
|
|||||||
$(INSTALL_PATH)/mockery --name=WriteBuffer --dir=$(PWD)/internal/flushcommon/writebuffer --output=$(PWD)/internal/flushcommon/writebuffer --filename=mock_write_buffer.go --with-expecter --structname=MockWriteBuffer --outpkg=writebuffer --inpackage
|
$(INSTALL_PATH)/mockery --name=WriteBuffer --dir=$(PWD)/internal/flushcommon/writebuffer --output=$(PWD)/internal/flushcommon/writebuffer --filename=mock_write_buffer.go --with-expecter --structname=MockWriteBuffer --outpkg=writebuffer --inpackage
|
||||||
$(INSTALL_PATH)/mockery --name=BufferManager --dir=$(PWD)/internal/flushcommon/writebuffer --output=$(PWD)/internal/flushcommon/writebuffer --filename=mock_manager.go --with-expecter --structname=MockBufferManager --outpkg=writebuffer --inpackage
|
$(INSTALL_PATH)/mockery --name=BufferManager --dir=$(PWD)/internal/flushcommon/writebuffer --output=$(PWD)/internal/flushcommon/writebuffer --filename=mock_manager.go --with-expecter --structname=MockBufferManager --outpkg=writebuffer --inpackage
|
||||||
$(INSTALL_PATH)/mockery --name=BinlogIO --dir=$(PWD)/internal/flushcommon/io --output=$(PWD)/internal/mocks/flushcommon/mock_util --filename=mock_binlogio.go --with-expecter --structname=MockBinlogIO --outpkg=mock_util --inpackage=false
|
$(INSTALL_PATH)/mockery --name=BinlogIO --dir=$(PWD)/internal/flushcommon/io --output=$(PWD)/internal/mocks/flushcommon/mock_util --filename=mock_binlogio.go --with-expecter --structname=MockBinlogIO --outpkg=mock_util --inpackage=false
|
||||||
|
$(INSTALL_PATH)/mockery --name=MsgHandler --dir=$(PWD)/internal/flushcommon/util --output=$(PWD)/internal/mocks/flushcommon/mock_util --filename=mock_MsgHandler.go --with-expecter --structname=MockMsgHandler --outpkg=mock_util --inpackage=false
|
||||||
$(INSTALL_PATH)/mockery --name=FlowgraphManager --dir=$(PWD)/internal/flushcommon/pipeline --output=$(PWD)/internal/flushcommon/pipeline --filename=mock_fgmanager.go --with-expecter --structname=MockFlowgraphManager --outpkg=pipeline --inpackage
|
$(INSTALL_PATH)/mockery --name=FlowgraphManager --dir=$(PWD)/internal/flushcommon/pipeline --output=$(PWD)/internal/flushcommon/pipeline --filename=mock_fgmanager.go --with-expecter --structname=MockFlowgraphManager --outpkg=pipeline --inpackage
|
||||||
|
|
||||||
generate-mockery-metastore: getdeps
|
generate-mockery-metastore: getdeps
|
||||||
@ -558,10 +559,13 @@ generate-mockery-pkg:
|
|||||||
generate-mockery-internal: getdeps
|
generate-mockery-internal: getdeps
|
||||||
$(INSTALL_PATH)/mockery --config $(PWD)/internal/.mockery.yaml
|
$(INSTALL_PATH)/mockery --config $(PWD)/internal/.mockery.yaml
|
||||||
|
|
||||||
|
generate-mockery-client:
|
||||||
|
$(MAKE) -C client generate-mockery
|
||||||
|
|
||||||
generate-mockery-cdc: getdeps
|
generate-mockery-cdc: getdeps
|
||||||
$(INSTALL_PATH)/mockery --config $(PWD)/internal/cdc/.mockery.yaml
|
$(INSTALL_PATH)/mockery --config $(PWD)/internal/cdc/.mockery.yaml
|
||||||
|
|
||||||
generate-mockery: generate-mockery-types generate-mockery-kv generate-mockery-rootcoord generate-mockery-proxy generate-mockery-querycoord generate-mockery-querynode generate-mockery-datacoord generate-mockery-pkg generate-mockery-internal
|
generate-mockery: generate-mockery-types generate-mockery-kv generate-mockery-rootcoord generate-mockery-proxy generate-mockery-querycoord generate-mockery-querynode generate-mockery-datacoord generate-mockery-pkg generate-mockery-internal generate-mockery-client
|
||||||
|
|
||||||
generate-yaml: milvus-tools
|
generate-yaml: milvus-tools
|
||||||
@echo "Updating milvus config yaml"
|
@echo "Updating milvus config yaml"
|
||||||
|
|||||||
@ -6,7 +6,7 @@ require (
|
|||||||
github.com/blang/semver/v4 v4.0.0
|
github.com/blang/semver/v4 v4.0.0
|
||||||
github.com/cockroachdb/errors v1.9.1
|
github.com/cockroachdb/errors v1.9.1
|
||||||
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
|
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
|
||||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251210030907-6087c9c0bad6
|
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251210064308-0f971c5ee7dc
|
||||||
github.com/milvus-io/milvus/pkg/v2 v2.6.4-0.20251104142533-a2ce70d25256
|
github.com/milvus-io/milvus/pkg/v2 v2.6.4-0.20251104142533-a2ce70d25256
|
||||||
github.com/quasilyte/go-ruleguard/dsl v0.3.23
|
github.com/quasilyte/go-ruleguard/dsl v0.3.23
|
||||||
github.com/samber/lo v1.27.0
|
github.com/samber/lo v1.27.0
|
||||||
|
|||||||
@ -330,8 +330,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5
|
|||||||
github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8=
|
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/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/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251210030907-6087c9c0bad6 h1:TeHfsRCdjbX30xS7Npcb+POQXd460+AjmXYmmTuxyBA=
|
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251210064308-0f971c5ee7dc h1:ZbtRmUjs+YIcULnIVPwdmOrLa9rpH58gnsCHyaLhqtw=
|
||||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251210030907-6087c9c0bad6/go.mod h1:/6UT4zZl6awVeXLeE7UGDWZvXj3IWkRsh3mqsn0DiAs=
|
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251210064308-0f971c5ee7dc/go.mod h1:/6UT4zZl6awVeXLeE7UGDWZvXj3IWkRsh3mqsn0DiAs=
|
||||||
github.com/milvus-io/milvus/pkg/v2 v2.6.4-0.20251104142533-a2ce70d25256 h1:M2waty0w2k4YT2HHzJk3fx6EFPD4DKxNJatitIV+gGU=
|
github.com/milvus-io/milvus/pkg/v2 v2.6.4-0.20251104142533-a2ce70d25256 h1:M2waty0w2k4YT2HHzJk3fx6EFPD4DKxNJatitIV+gGU=
|
||||||
github.com/milvus-io/milvus/pkg/v2 v2.6.4-0.20251104142533-a2ce70d25256/go.mod h1:HT6Wxahwj/l8+i+D/C3iwDzCjDa36U9gyVw6CjjK4pE=
|
github.com/milvus-io/milvus/pkg/v2 v2.6.4-0.20251104142533-a2ce70d25256/go.mod h1:HT6Wxahwj/l8+i+D/C3iwDzCjDa36U9gyVw6CjjK4pE=
|
||||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||||
|
|||||||
@ -6918,23 +6918,23 @@ func (_c *MilvusServiceServer_TransferReplica_Call) RunAndReturn(run func(contex
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TruncateCollection provides a mock function with given fields: _a0, _a1
|
// TruncateCollection provides a mock function with given fields: _a0, _a1
|
||||||
func (_m *MilvusServiceServer) TruncateCollection(_a0 context.Context, _a1 *milvuspb.TruncateCollectionRequest) (*commonpb.Status, error) {
|
func (_m *MilvusServiceServer) TruncateCollection(_a0 context.Context, _a1 *milvuspb.TruncateCollectionRequest) (*milvuspb.TruncateCollectionResponse, error) {
|
||||||
ret := _m.Called(_a0, _a1)
|
ret := _m.Called(_a0, _a1)
|
||||||
|
|
||||||
if len(ret) == 0 {
|
if len(ret) == 0 {
|
||||||
panic("no return value specified for TruncateCollection")
|
panic("no return value specified for TruncateCollection")
|
||||||
}
|
}
|
||||||
|
|
||||||
var r0 *commonpb.Status
|
var r0 *milvuspb.TruncateCollectionResponse
|
||||||
var r1 error
|
var r1 error
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TruncateCollectionRequest) (*commonpb.Status, error)); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TruncateCollectionRequest) (*milvuspb.TruncateCollectionResponse, error)); ok {
|
||||||
return rf(_a0, _a1)
|
return rf(_a0, _a1)
|
||||||
}
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TruncateCollectionRequest) *commonpb.Status); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TruncateCollectionRequest) *milvuspb.TruncateCollectionResponse); ok {
|
||||||
r0 = rf(_a0, _a1)
|
r0 = rf(_a0, _a1)
|
||||||
} else {
|
} else {
|
||||||
if ret.Get(0) != nil {
|
if ret.Get(0) != nil {
|
||||||
r0 = ret.Get(0).(*commonpb.Status)
|
r0 = ret.Get(0).(*milvuspb.TruncateCollectionResponse)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6966,12 +6966,12 @@ func (_c *MilvusServiceServer_TruncateCollection_Call) Run(run func(_a0 context.
|
|||||||
return _c
|
return _c
|
||||||
}
|
}
|
||||||
|
|
||||||
func (_c *MilvusServiceServer_TruncateCollection_Call) Return(_a0 *commonpb.Status, _a1 error) *MilvusServiceServer_TruncateCollection_Call {
|
func (_c *MilvusServiceServer_TruncateCollection_Call) Return(_a0 *milvuspb.TruncateCollectionResponse, _a1 error) *MilvusServiceServer_TruncateCollection_Call {
|
||||||
_c.Call.Return(_a0, _a1)
|
_c.Call.Return(_a0, _a1)
|
||||||
return _c
|
return _c
|
||||||
}
|
}
|
||||||
|
|
||||||
func (_c *MilvusServiceServer_TruncateCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.TruncateCollectionRequest) (*commonpb.Status, error)) *MilvusServiceServer_TruncateCollection_Call {
|
func (_c *MilvusServiceServer_TruncateCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.TruncateCollectionRequest) (*milvuspb.TruncateCollectionResponse, error)) *MilvusServiceServer_TruncateCollection_Call {
|
||||||
_c.Call.Return(run)
|
_c.Call.Return(run)
|
||||||
return _c
|
return _c
|
||||||
}
|
}
|
||||||
|
|||||||
2
go.mod
2
go.mod
@ -21,7 +21,7 @@ require (
|
|||||||
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
|
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
|
||||||
github.com/klauspost/compress v1.18.0
|
github.com/klauspost/compress v1.18.0
|
||||||
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d
|
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d
|
||||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251210030907-6087c9c0bad6
|
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251210064308-0f971c5ee7dc
|
||||||
github.com/minio/minio-go/v7 v7.0.73
|
github.com/minio/minio-go/v7 v7.0.73
|
||||||
github.com/panjf2000/ants/v2 v2.11.3 // indirect
|
github.com/panjf2000/ants/v2 v2.11.3 // indirect
|
||||||
github.com/pingcap/log v1.1.1-0.20221015072633-39906604fb81 // indirect
|
github.com/pingcap/log v1.1.1-0.20221015072633-39906604fb81 // indirect
|
||||||
|
|||||||
4
go.sum
4
go.sum
@ -799,8 +799,8 @@ github.com/milvus-io/cgosymbolizer v0.0.0-20250318084424-114f4050c3a6 h1:YHMFI6L
|
|||||||
github.com/milvus-io/cgosymbolizer v0.0.0-20250318084424-114f4050c3a6/go.mod h1:DvXTE/K/RtHehxU8/GtDs4vFtfw64jJ3PaCnFri8CRg=
|
github.com/milvus-io/cgosymbolizer v0.0.0-20250318084424-114f4050c3a6/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 h1:TfeY0NxYxZzUfIfYe5qYDBzt4ZYRqzUjTR6CvUzjat8=
|
||||||
github.com/milvus-io/gorocksdb v0.0.0-20220624081344-8c5f4212846b/go.mod h1:iwW+9cWfIzzDseEBCCeDSN5SD16Tidvy8cwQ7ZY8Qj4=
|
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.6.6-0.20251210030907-6087c9c0bad6 h1:TeHfsRCdjbX30xS7Npcb+POQXd460+AjmXYmmTuxyBA=
|
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251210064308-0f971c5ee7dc h1:ZbtRmUjs+YIcULnIVPwdmOrLa9rpH58gnsCHyaLhqtw=
|
||||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251210030907-6087c9c0bad6/go.mod h1:/6UT4zZl6awVeXLeE7UGDWZvXj3IWkRsh3mqsn0DiAs=
|
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251210064308-0f971c5ee7dc/go.mod h1:/6UT4zZl6awVeXLeE7UGDWZvXj3IWkRsh3mqsn0DiAs=
|
||||||
github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs=
|
github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs=
|
||||||
github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY=
|
github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY=
|
||||||
github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 h1:+n/aFZefKZp7spd8DFdX7uMikMLXX4oubIzJF4kv/wI=
|
github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 h1:+n/aFZefKZp7spd8DFdX7uMikMLXX4oubIzJF4kv/wI=
|
||||||
|
|||||||
@ -1245,3 +1245,18 @@ func (s *mixCoordImpl) ListFileResources(ctx context.Context, req *milvuspb.List
|
|||||||
func (s *mixCoordImpl) CreateExternalCollection(ctx context.Context, req *msgpb.CreateCollectionRequest) (*datapb.CreateExternalCollectionResponse, error) {
|
func (s *mixCoordImpl) CreateExternalCollection(ctx context.Context, req *msgpb.CreateCollectionRequest) (*datapb.CreateExternalCollectionResponse, error) {
|
||||||
return s.datacoordServer.CreateExternalCollection(ctx, req)
|
return s.datacoordServer.CreateExternalCollection(ctx, req)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TruncateCollection truncate collection
|
||||||
|
func (s *mixCoordImpl) TruncateCollection(ctx context.Context, req *milvuspb.TruncateCollectionRequest) (*milvuspb.TruncateCollectionResponse, error) {
|
||||||
|
return s.rootcoordServer.TruncateCollection(ctx, req)
|
||||||
|
}
|
||||||
|
|
||||||
|
// DropSegmentsByTime drop segments by time for TruncateCollection
|
||||||
|
func (s *mixCoordImpl) DropSegmentsByTime(ctx context.Context, collectionID int64, flushTsList map[string]uint64) error {
|
||||||
|
return s.datacoordServer.DropSegmentsByTime(ctx, collectionID, flushTsList)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ManualUpdateCurrentTarget manually update current target for TruncateCollection
|
||||||
|
func (s *mixCoordImpl) ManualUpdateCurrentTarget(ctx context.Context, collectionID int64) error {
|
||||||
|
return s.queryCoordServer.ManualUpdateCurrentTarget(ctx, collectionID)
|
||||||
|
}
|
||||||
|
|||||||
@ -52,6 +52,7 @@ import (
|
|||||||
"github.com/milvus-io/milvus/pkg/v2/util/metricsinfo"
|
"github.com/milvus-io/milvus/pkg/v2/util/metricsinfo"
|
||||||
"github.com/milvus-io/milvus/pkg/v2/util/paramtable"
|
"github.com/milvus-io/milvus/pkg/v2/util/paramtable"
|
||||||
"github.com/milvus-io/milvus/pkg/v2/util/retry"
|
"github.com/milvus-io/milvus/pkg/v2/util/retry"
|
||||||
|
"github.com/milvus-io/milvus/pkg/v2/util/syncutil"
|
||||||
"github.com/milvus-io/milvus/pkg/v2/util/timerecord"
|
"github.com/milvus-io/milvus/pkg/v2/util/timerecord"
|
||||||
"github.com/milvus-io/milvus/pkg/v2/util/tsoutil"
|
"github.com/milvus-io/milvus/pkg/v2/util/tsoutil"
|
||||||
"github.com/milvus-io/milvus/pkg/v2/util/typeutil"
|
"github.com/milvus-io/milvus/pkg/v2/util/typeutil"
|
||||||
@ -126,12 +127,16 @@ func (m *meta) GetCompactionTaskMeta() *compactionTaskMeta {
|
|||||||
type channelCPs struct {
|
type channelCPs struct {
|
||||||
lock.RWMutex
|
lock.RWMutex
|
||||||
checkpoints map[string]*msgpb.MsgPosition
|
checkpoints map[string]*msgpb.MsgPosition
|
||||||
|
cond *syncutil.ContextCond
|
||||||
}
|
}
|
||||||
|
|
||||||
func newChannelCps() *channelCPs {
|
func newChannelCps() *channelCPs {
|
||||||
return &channelCPs{
|
cp := &channelCPs{
|
||||||
checkpoints: make(map[string]*msgpb.MsgPosition),
|
checkpoints: make(map[string]*msgpb.MsgPosition),
|
||||||
}
|
}
|
||||||
|
// use the same lock as channelCPs
|
||||||
|
cp.cond = syncutil.NewContextCond(&cp.RWMutex)
|
||||||
|
return cp
|
||||||
}
|
}
|
||||||
|
|
||||||
// A local cache of segment metric update. Must call commit() to take effect.
|
// A local cache of segment metric update. Must call commit() to take effect.
|
||||||
@ -2039,6 +2044,8 @@ func (m *meta) UpdateChannelCheckpoints(ctx context.Context, positions []*msgpb.
|
|||||||
ts, _ := tsoutil.ParseTS(pos.Timestamp)
|
ts, _ := tsoutil.ParseTS(pos.Timestamp)
|
||||||
metrics.DataCoordCheckpointUnixSeconds.WithLabelValues(fmt.Sprint(paramtable.GetNodeID()), channel).Set(float64(ts.Unix()))
|
metrics.DataCoordCheckpointUnixSeconds.WithLabelValues(fmt.Sprint(paramtable.GetNodeID()), channel).Set(float64(ts.Unix()))
|
||||||
}
|
}
|
||||||
|
// broadcast the change of channel checkpoint for TruncateCollection op to drop segments
|
||||||
|
m.channelCPs.cond.UnsafeBroadcast()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2486,3 +2493,64 @@ func (m *meta) ListFileResource(ctx context.Context) ([]*internalpb.FileResource
|
|||||||
|
|
||||||
return lo.Values(m.resourceMeta), m.resourceVersion
|
return lo.Values(m.resourceMeta), m.resourceVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TruncateChannelByTime drops segments of a channel that were updated before the flush timestamp
|
||||||
|
func (m *meta) TruncateChannelByTime(ctx context.Context, vChannel string, flushTs uint64) error {
|
||||||
|
m.segMu.Lock()
|
||||||
|
defer m.segMu.Unlock()
|
||||||
|
|
||||||
|
segments := m.segments.GetSegmentsBySelector(SegmentFilterFunc(isSegmentHealthy), WithChannel(vChannel))
|
||||||
|
segmentsToDrop := make([]*SegmentInfo, 0)
|
||||||
|
metricMutation := &segMetricMutation{
|
||||||
|
stateChange: make(map[string]map[string]map[string]int),
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, segment := range segments {
|
||||||
|
if segment.GetDmlPosition().GetTimestamp() <= flushTs && segment.GetState() != commonpb.SegmentState_Dropped {
|
||||||
|
cloned := segment.Clone()
|
||||||
|
updateSegStateAndPrepareMetrics(cloned, commonpb.SegmentState_Dropped, metricMutation)
|
||||||
|
segmentsToDrop = append(segmentsToDrop, cloned)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(segmentsToDrop) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Persist to etcd
|
||||||
|
segmentsProto := lo.Map(segmentsToDrop, func(seg *SegmentInfo, _ int) *datapb.SegmentInfo {
|
||||||
|
return seg.SegmentInfo
|
||||||
|
})
|
||||||
|
if err := m.catalog.AlterSegments(ctx, segmentsProto); err != nil {
|
||||||
|
log.Ctx(ctx).Warn("Failed to batch set segments state to dropped", zap.Error(err))
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update metrics
|
||||||
|
metricMutation.commit()
|
||||||
|
|
||||||
|
// Update memory
|
||||||
|
for _, seg := range segmentsToDrop {
|
||||||
|
m.segments.SetSegment(seg.GetID(), seg)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// WatchChannelCheckpoint waits until the checkpoint of the specified channel
|
||||||
|
// reaches or exceeds the target timestamp. Used for TruncateCollection.
|
||||||
|
func (m *meta) WatchChannelCheckpoint(ctx context.Context, vChannel string, targetTs uint64) error {
|
||||||
|
m.channelCPs.cond.L.Lock()
|
||||||
|
|
||||||
|
for {
|
||||||
|
cp, ok := m.channelCPs.checkpoints[vChannel]
|
||||||
|
if ok && cp != nil && cp.GetTimestamp() >= targetTs {
|
||||||
|
m.channelCPs.cond.L.Unlock()
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.channelCPs.cond.Wait(ctx); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1527,6 +1527,102 @@ func TestChannelCP(t *testing.T) {
|
|||||||
err = meta.DropChannelCheckpoint(mockVChannel)
|
err = meta.DropChannelCheckpoint(mockVChannel)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
t.Run("WatchChannelCheckpoint", func(t *testing.T) {
|
||||||
|
meta, err := newMemoryMeta(t)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
err = meta.UpdateChannelCheckpoint(context.TODO(), mockVChannel, pos)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
err = meta.WatchChannelCheckpoint(context.TODO(), mockVChannel, pos.Timestamp-1)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("TruncateChannelByTime", func(t *testing.T) {
|
||||||
|
meta, err := newMemoryMeta(t)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
flushTs := uint64(2000)
|
||||||
|
channelName := mockVChannel
|
||||||
|
|
||||||
|
// Test case 1: No segments to drop
|
||||||
|
err = meta.TruncateChannelByTime(context.TODO(), channelName, flushTs)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
// Test case 2: Add segments that should be dropped (timestamp <= flushTs)
|
||||||
|
seg1 := &SegmentInfo{
|
||||||
|
SegmentInfo: &datapb.SegmentInfo{
|
||||||
|
ID: 1,
|
||||||
|
CollectionID: 1,
|
||||||
|
PartitionID: 1,
|
||||||
|
InsertChannel: channelName,
|
||||||
|
State: commonpb.SegmentState_Flushed,
|
||||||
|
DmlPosition: &msgpb.MsgPosition{
|
||||||
|
ChannelName: channelName,
|
||||||
|
Timestamp: flushTs - 100, // less than flushTs
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
err = meta.AddSegment(context.TODO(), seg1)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
// Test case 3: Add segment that should NOT be dropped (timestamp > flushTs)
|
||||||
|
seg2 := &SegmentInfo{
|
||||||
|
SegmentInfo: &datapb.SegmentInfo{
|
||||||
|
ID: 2,
|
||||||
|
CollectionID: 1,
|
||||||
|
PartitionID: 1,
|
||||||
|
InsertChannel: channelName,
|
||||||
|
State: commonpb.SegmentState_Flushed,
|
||||||
|
DmlPosition: &msgpb.MsgPosition{
|
||||||
|
ChannelName: channelName,
|
||||||
|
Timestamp: flushTs + 100, // greater than flushTs
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
err = meta.AddSegment(context.TODO(), seg2)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
// Test case 4: Add segment that is already dropped (should be skipped)
|
||||||
|
seg3 := &SegmentInfo{
|
||||||
|
SegmentInfo: &datapb.SegmentInfo{
|
||||||
|
ID: 3,
|
||||||
|
CollectionID: 1,
|
||||||
|
PartitionID: 1,
|
||||||
|
InsertChannel: channelName,
|
||||||
|
State: commonpb.SegmentState_Dropped,
|
||||||
|
DmlPosition: &msgpb.MsgPosition{
|
||||||
|
ChannelName: channelName,
|
||||||
|
Timestamp: flushTs - 100, // less than flushTs but already dropped
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
err = meta.AddSegment(context.TODO(), seg3)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
// Test case 5: TruncateChannelByTime should drop seg1 but not seg2 or seg3
|
||||||
|
err = meta.TruncateChannelByTime(context.TODO(), channelName, flushTs)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
// Verify seg1 is dropped
|
||||||
|
seg1After := meta.GetSegment(context.TODO(), seg1.ID)
|
||||||
|
assert.NotNil(t, seg1After)
|
||||||
|
assert.Equal(t, commonpb.SegmentState_Dropped, seg1After.GetState())
|
||||||
|
|
||||||
|
// Verify seg2 is not dropped
|
||||||
|
seg2After := meta.GetSegment(context.TODO(), seg2.ID)
|
||||||
|
assert.NotNil(t, seg2After)
|
||||||
|
assert.NotEqual(t, commonpb.SegmentState_Dropped, seg2After.GetState())
|
||||||
|
|
||||||
|
// Verify seg3 remains dropped
|
||||||
|
seg3After := meta.GetSegment(context.TODO(), seg3.ID)
|
||||||
|
assert.NotNil(t, seg3After)
|
||||||
|
assert.Equal(t, commonpb.SegmentState_Dropped, seg3After.GetState())
|
||||||
|
|
||||||
|
// Test case 6: Call again with same flushTs, should return nil (no segments to drop)
|
||||||
|
err = meta.TruncateChannelByTime(context.TODO(), channelName, flushTs)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_meta_GcConfirm(t *testing.T) {
|
func Test_meta_GcConfirm(t *testing.T) {
|
||||||
|
|||||||
@ -953,6 +953,18 @@ func (s *mockMixCoord) ValidateAnalyzer(ctx context.Context, req *querypb.Valida
|
|||||||
panic("implement me")
|
panic("implement me")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *mockMixCoord) TruncateCollection(ctx context.Context, req *milvuspb.TruncateCollectionRequest) (*milvuspb.TruncateCollectionResponse, error) {
|
||||||
|
panic("implement me")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *mockMixCoord) DropSegmentsByTime(ctx context.Context, collectionID int64, flushTsList map[string]uint64) error {
|
||||||
|
panic("implement me")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *mockMixCoord) ManualUpdateCurrentTarget(ctx context.Context, collectionID int64) error {
|
||||||
|
panic("implement me")
|
||||||
|
}
|
||||||
|
|
||||||
type mockHandler struct {
|
type mockHandler struct {
|
||||||
meta *meta
|
meta *meta
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2106,3 +2106,30 @@ func (s *Server) SyncFileResources(ctx context.Context) error {
|
|||||||
resources, version := s.meta.ListFileResource(ctx)
|
resources, version := s.meta.ListFileResource(ctx)
|
||||||
return s.mixCoord.SyncQcFileResource(ctx, resources, version)
|
return s.mixCoord.SyncQcFileResource(ctx, resources, version)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DropSegmentsByTime drop segments that were updated before the flush timestamp for TruncateCollection
|
||||||
|
func (s *Server) DropSegmentsByTime(ctx context.Context, collectionID int64, flushTsList map[string]uint64) error {
|
||||||
|
if err := merr.CheckHealthy(s.GetStateCode()); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
log.Ctx(ctx).Info("receive DropSegmentsByTime request",
|
||||||
|
zap.Int64("collectionID", collectionID))
|
||||||
|
|
||||||
|
for channelName, flushTs := range flushTsList {
|
||||||
|
// wait until the checkpoint reaches or exceeds the flush timestamp
|
||||||
|
err := s.meta.WatchChannelCheckpoint(ctx, channelName, flushTs)
|
||||||
|
if err != nil {
|
||||||
|
log.Ctx(ctx).Warn("WatchChannelCheckpoint failed", zap.Error(err))
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
// drop segments that were updated before the flush timestamp
|
||||||
|
err = s.meta.TruncateChannelByTime(ctx, channelName, flushTs)
|
||||||
|
if err != nil {
|
||||||
|
log.Warn("TruncateChannelByTime failed", zap.Error(err))
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|||||||
@ -2342,3 +2342,98 @@ func getWatchKV(t *testing.T) kv.WatchKV {
|
|||||||
|
|
||||||
return kv
|
return kv
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestServer_DropSegmentsByTime(t *testing.T) {
|
||||||
|
ctx := context.Background()
|
||||||
|
collectionID := int64(1)
|
||||||
|
channelName := "test-channel"
|
||||||
|
flushTs := uint64(1000)
|
||||||
|
|
||||||
|
t.Run("server not healthy", func(t *testing.T) {
|
||||||
|
s := &Server{}
|
||||||
|
s.stateCode.Store(commonpb.StateCode_Abnormal)
|
||||||
|
err := s.DropSegmentsByTime(ctx, collectionID, map[string]uint64{channelName: flushTs})
|
||||||
|
assert.Error(t, err)
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("watch channel checkpoint failed", func(t *testing.T) {
|
||||||
|
s := &Server{}
|
||||||
|
s.stateCode.Store(commonpb.StateCode_Healthy)
|
||||||
|
|
||||||
|
meta, err := newMemoryMeta(t)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
s.meta = meta
|
||||||
|
|
||||||
|
// WatchChannelCheckpoint will wait indefinitely, so we use a context with timeout
|
||||||
|
ctxWithTimeout, cancel := context.WithTimeout(ctx, 100*time.Millisecond)
|
||||||
|
defer cancel()
|
||||||
|
|
||||||
|
err = s.DropSegmentsByTime(ctxWithTimeout, collectionID, map[string]uint64{channelName: flushTs})
|
||||||
|
assert.Error(t, err)
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("success - drop segments", func(t *testing.T) {
|
||||||
|
s := &Server{}
|
||||||
|
s.stateCode.Store(commonpb.StateCode_Healthy)
|
||||||
|
|
||||||
|
meta, err := newMemoryMeta(t)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
s.meta = meta
|
||||||
|
|
||||||
|
// Set channel checkpoint to satisfy WatchChannelCheckpoint
|
||||||
|
pos := &msgpb.MsgPosition{
|
||||||
|
ChannelName: channelName,
|
||||||
|
MsgID: []byte{0, 0, 0, 0, 0, 0, 0, 0},
|
||||||
|
Timestamp: flushTs,
|
||||||
|
}
|
||||||
|
err = meta.UpdateChannelCheckpoint(ctx, channelName, pos)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
// Add segments to drop (timestamp <= flushTs)
|
||||||
|
seg1 := &SegmentInfo{
|
||||||
|
SegmentInfo: &datapb.SegmentInfo{
|
||||||
|
ID: 1,
|
||||||
|
CollectionID: collectionID,
|
||||||
|
State: commonpb.SegmentState_Flushed,
|
||||||
|
DmlPosition: &msgpb.MsgPosition{
|
||||||
|
Timestamp: flushTs - 100, // less than flushTs
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
err = meta.AddSegment(ctx, seg1)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
// Add segment that should not be dropped (timestamp > flushTs)
|
||||||
|
seg2 := &SegmentInfo{
|
||||||
|
SegmentInfo: &datapb.SegmentInfo{
|
||||||
|
ID: 2,
|
||||||
|
CollectionID: collectionID,
|
||||||
|
State: commonpb.SegmentState_Flushed,
|
||||||
|
DmlPosition: &msgpb.MsgPosition{
|
||||||
|
Timestamp: flushTs + 100, // greater than flushTs
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
err = meta.AddSegment(ctx, seg2)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
// Set segment channel
|
||||||
|
seg1.InsertChannel = channelName
|
||||||
|
seg2.InsertChannel = channelName
|
||||||
|
meta.segments.SetSegment(seg1.ID, seg1)
|
||||||
|
meta.segments.SetSegment(seg2.ID, seg2)
|
||||||
|
|
||||||
|
err = s.DropSegmentsByTime(ctx, collectionID, map[string]uint64{channelName: flushTs})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
// Verify segment 1 is dropped
|
||||||
|
seg1After := meta.GetSegment(ctx, seg1.ID)
|
||||||
|
assert.NotNil(t, seg1After)
|
||||||
|
assert.Equal(t, commonpb.SegmentState_Dropped, seg1After.GetState())
|
||||||
|
|
||||||
|
// Verify segment 2 is not dropped
|
||||||
|
seg2After := meta.GetSegment(ctx, seg2.ID)
|
||||||
|
assert.NotNil(t, seg2After)
|
||||||
|
assert.NotEqual(t, commonpb.SegmentState_Dropped, seg2After.GetState())
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@ -1960,3 +1960,15 @@ func (c *Client) ValidateAnalyzer(ctx context.Context, req *querypb.ValidateAnal
|
|||||||
return client.ValidateAnalyzer(ctx, req)
|
return client.ValidateAnalyzer(ctx, req)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TruncateCollection truncate collection
|
||||||
|
func (c *Client) TruncateCollection(ctx context.Context, in *milvuspb.TruncateCollectionRequest, opts ...grpc.CallOption) (*milvuspb.TruncateCollectionResponse, error) {
|
||||||
|
in = typeutil.Clone(in)
|
||||||
|
commonpbutil.UpdateMsgBase(
|
||||||
|
in.GetBase(),
|
||||||
|
commonpbutil.FillMsgBaseFromClient(paramtable.GetNodeID(), commonpbutil.WithTargetID(c.grpcClient.GetNodeID())),
|
||||||
|
)
|
||||||
|
return wrapGrpcCall(ctx, c, func(client MixCoordClient) (*milvuspb.TruncateCollectionResponse, error) {
|
||||||
|
return client.TruncateCollection(ctx, in)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@ -2661,3 +2661,58 @@ func Test_FlushAll(t *testing.T) {
|
|||||||
_, err = client.FlushAll(ctx, &datapb.FlushAllRequest{})
|
_, err = client.FlushAll(ctx, &datapb.FlushAllRequest{})
|
||||||
assert.ErrorIs(t, err, context.DeadlineExceeded)
|
assert.ErrorIs(t, err, context.DeadlineExceeded)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestClient_TruncateCollection(t *testing.T) {
|
||||||
|
paramtable.Init()
|
||||||
|
|
||||||
|
ctx := context.Background()
|
||||||
|
client, err := NewClient(ctx)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.NotNil(t, client)
|
||||||
|
defer client.Close()
|
||||||
|
|
||||||
|
mockRC := mocks.NewMockRootCoordClient(t)
|
||||||
|
mockmix := MixCoordClient{
|
||||||
|
RootCoordClient: mockRC,
|
||||||
|
}
|
||||||
|
mockGrpcClient := mocks.NewMockGrpcClient[MixCoordClient](t)
|
||||||
|
mockGrpcClient.EXPECT().Close().Return(nil)
|
||||||
|
mockGrpcClient.EXPECT().GetNodeID().Return(1)
|
||||||
|
mockGrpcClient.EXPECT().ReCall(mock1.Anything, mock1.Anything).RunAndReturn(func(ctx context.Context, f func(MixCoordClient) (interface{}, error)) (interface{}, error) {
|
||||||
|
return f(mockmix)
|
||||||
|
})
|
||||||
|
client.(*Client).grpcClient = mockGrpcClient
|
||||||
|
|
||||||
|
// test success
|
||||||
|
mockRC.EXPECT().TruncateCollection(mock1.Anything, mock1.Anything).Return(&milvuspb.TruncateCollectionResponse{
|
||||||
|
Status: merr.Success(),
|
||||||
|
}, nil)
|
||||||
|
_, err = client.TruncateCollection(ctx, &milvuspb.TruncateCollectionRequest{})
|
||||||
|
assert.Nil(t, err)
|
||||||
|
|
||||||
|
// test return error status
|
||||||
|
mockRC.ExpectedCalls = nil
|
||||||
|
mockRC.EXPECT().TruncateCollection(mock1.Anything, mock1.Anything).Return(&milvuspb.TruncateCollectionResponse{
|
||||||
|
Status: merr.Status(merr.ErrServiceNotReady),
|
||||||
|
}, nil)
|
||||||
|
|
||||||
|
rsp, err := client.TruncateCollection(ctx, &milvuspb.TruncateCollectionRequest{})
|
||||||
|
assert.NotEqual(t, int32(0), rsp.GetStatus().GetCode())
|
||||||
|
assert.Nil(t, err)
|
||||||
|
|
||||||
|
// test return error
|
||||||
|
mockRC.ExpectedCalls = nil
|
||||||
|
mockRC.EXPECT().TruncateCollection(mock1.Anything, mock1.Anything).Return(&milvuspb.TruncateCollectionResponse{
|
||||||
|
Status: merr.Success(),
|
||||||
|
}, mockErr)
|
||||||
|
|
||||||
|
_, err = client.TruncateCollection(ctx, &milvuspb.TruncateCollectionRequest{})
|
||||||
|
assert.NotNil(t, err)
|
||||||
|
|
||||||
|
// test ctx done
|
||||||
|
ctx, cancel := context.WithTimeout(ctx, 10*time.Millisecond)
|
||||||
|
defer cancel()
|
||||||
|
time.Sleep(20 * time.Millisecond)
|
||||||
|
_, err = client.TruncateCollection(ctx, &milvuspb.TruncateCollectionRequest{})
|
||||||
|
assert.ErrorIs(t, err, context.DeadlineExceeded)
|
||||||
|
}
|
||||||
|
|||||||
@ -961,3 +961,8 @@ func (s *Server) RemoveFileResource(ctx context.Context, req *milvuspb.RemoveFil
|
|||||||
func (s *Server) ListFileResources(ctx context.Context, req *milvuspb.ListFileResourcesRequest) (*milvuspb.ListFileResourcesResponse, error) {
|
func (s *Server) ListFileResources(ctx context.Context, req *milvuspb.ListFileResourcesRequest) (*milvuspb.ListFileResourcesResponse, error) {
|
||||||
return s.mixCoord.ListFileResources(ctx, req)
|
return s.mixCoord.ListFileResources(ctx, req)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TruncateCollection truncate a collection
|
||||||
|
func (s *Server) TruncateCollection(ctx context.Context, in *milvuspb.TruncateCollectionRequest) (*milvuspb.TruncateCollectionResponse, error) {
|
||||||
|
return s.mixCoord.TruncateCollection(ctx, in)
|
||||||
|
}
|
||||||
|
|||||||
@ -778,4 +778,12 @@ func Test_NewServer(t *testing.T) {
|
|||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Equal(t, commonpb.ErrorCode_Success, resp.ErrorCode)
|
assert.Equal(t, commonpb.ErrorCode_Success, resp.ErrorCode)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
t.Run("TruncateCollection", func(t *testing.T) {
|
||||||
|
req := &milvuspb.TruncateCollectionRequest{}
|
||||||
|
mockMixCoord.EXPECT().TruncateCollection(mock.Anything, req).Return(&milvuspb.TruncateCollectionResponse{Status: merr.Success()}, nil)
|
||||||
|
resp, err := server.TruncateCollection(ctx, req)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.Equal(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -627,6 +627,11 @@ func (s *Server) DropCollection(ctx context.Context, request *milvuspb.DropColle
|
|||||||
return s.proxy.DropCollection(ctx, request)
|
return s.proxy.DropCollection(ctx, request)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TruncateCollection notifies Proxy to truncate a collection
|
||||||
|
func (s *Server) TruncateCollection(ctx context.Context, request *milvuspb.TruncateCollectionRequest) (*milvuspb.TruncateCollectionResponse, error) {
|
||||||
|
return s.proxy.TruncateCollection(ctx, request)
|
||||||
|
}
|
||||||
|
|
||||||
// HasCollection notifies Proxy to check a collection's existence at specified timestamp
|
// HasCollection notifies Proxy to check a collection's existence at specified timestamp
|
||||||
func (s *Server) HasCollection(ctx context.Context, request *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error) {
|
func (s *Server) HasCollection(ctx context.Context, request *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error) {
|
||||||
return s.proxy.HasCollection(ctx, request)
|
return s.proxy.HasCollection(ctx, request)
|
||||||
|
|||||||
@ -248,6 +248,12 @@ func Test_NewServer(t *testing.T) {
|
|||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
t.Run("TruncateCollection", func(t *testing.T) {
|
||||||
|
mockProxy.EXPECT().TruncateCollection(mock.Anything, mock.Anything).Return(nil, nil)
|
||||||
|
_, err := server.TruncateCollection(ctx, nil)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
})
|
||||||
|
|
||||||
t.Run("HasCollection", func(t *testing.T) {
|
t.Run("HasCollection", func(t *testing.T) {
|
||||||
mockProxy.EXPECT().HasCollection(mock.Anything, mock.Anything).Return(nil, nil)
|
mockProxy.EXPECT().HasCollection(mock.Anything, mock.Anything).Return(nil, nil)
|
||||||
mockProxy.EXPECT().HasCollection(mock.Anything, mock.Anything).Return(nil, nil)
|
mockProxy.EXPECT().HasCollection(mock.Anything, mock.Anything).Return(nil, nil)
|
||||||
|
|||||||
@ -305,6 +305,20 @@ func (ddn *ddNode) Operate(in []Msg) []Msg {
|
|||||||
} else {
|
} else {
|
||||||
logger.Info("handle put collection message success")
|
logger.Info("handle put collection message success")
|
||||||
}
|
}
|
||||||
|
case commonpb.MsgType_TruncateCollection:
|
||||||
|
truncateCollectionMsg := msg.(*adaptor.TruncateCollectionMessageBody)
|
||||||
|
logger := log.With(
|
||||||
|
zap.String("vchannel", ddn.Name()),
|
||||||
|
zap.Int32("msgType", int32(msg.Type())),
|
||||||
|
zap.Uint64("timetick", truncateCollectionMsg.TruncateCollectionMessage.TimeTick()),
|
||||||
|
zap.Int64s("segmentIDs", truncateCollectionMsg.TruncateCollectionMessage.Header().SegmentIds),
|
||||||
|
)
|
||||||
|
logger.Info("receive truncate collection message")
|
||||||
|
if err := ddn.msgHandler.HandleTruncateCollection(truncateCollectionMsg.TruncateCollectionMessage); err != nil {
|
||||||
|
logger.Warn("handle truncate collection message failed", zap.Error(err))
|
||||||
|
} else {
|
||||||
|
logger.Info("handle truncate collection message success")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -100,6 +100,7 @@ func TestFlowGraph_DDNode_OperateFlush(t *testing.T) {
|
|||||||
h.EXPECT().HandleFlush(mock.Anything).Return(nil)
|
h.EXPECT().HandleFlush(mock.Anything).Return(nil)
|
||||||
h.EXPECT().HandleManualFlush(mock.Anything).Return(nil)
|
h.EXPECT().HandleManualFlush(mock.Anything).Return(nil)
|
||||||
h.EXPECT().HandleFlushAll(mock.Anything, mock.Anything).Return(nil)
|
h.EXPECT().HandleFlushAll(mock.Anything, mock.Anything).Return(nil)
|
||||||
|
h.EXPECT().HandleTruncateCollection(mock.Anything).Return(nil)
|
||||||
|
|
||||||
ddn := ddNode{
|
ddn := ddNode{
|
||||||
ctx: context.Background(),
|
ctx: context.Background(),
|
||||||
@ -140,6 +141,14 @@ func TestFlowGraph_DDNode_OperateFlush(t *testing.T) {
|
|||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
immutableFlushAllMsg := flushAllMsg.WithTimeTick(4).IntoImmutableMessage(mock_message.NewMockMessageID(t))
|
immutableFlushAllMsg := flushAllMsg.WithTimeTick(4).IntoImmutableMessage(mock_message.NewMockMessageID(t))
|
||||||
|
|
||||||
|
truncateCollectionMsg, err := message.NewTruncateCollectionMessageBuilderV2().
|
||||||
|
WithHeader(&message.TruncateCollectionMessageHeader{}).
|
||||||
|
WithBody(&message.TruncateCollectionMessageBody{}).
|
||||||
|
WithVChannel("v1").
|
||||||
|
BuildMutable()
|
||||||
|
assert.NoError(t, err)
|
||||||
|
immutableTruncateCollectionMsg := truncateCollectionMsg.WithTimeTick(4).IntoImmutableMessage(mock_message.NewMockMessageID(t))
|
||||||
|
|
||||||
msg1, err := adaptor.NewCreateSegmentMessageBody(immutableCreateSegmentMsg)
|
msg1, err := adaptor.NewCreateSegmentMessageBody(immutableCreateSegmentMsg)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
msg2, err := adaptor.NewFlushMessageBody(immutableFlushMsg)
|
msg2, err := adaptor.NewFlushMessageBody(immutableFlushMsg)
|
||||||
@ -148,8 +157,9 @@ func TestFlowGraph_DDNode_OperateFlush(t *testing.T) {
|
|||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
msg4, err := adaptor.NewFlushAllMessageBody(immutableFlushAllMsg)
|
msg4, err := adaptor.NewFlushAllMessageBody(immutableFlushAllMsg)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
msg5, err := adaptor.NewTruncateCollectionMessageBody(immutableTruncateCollectionMsg)
|
||||||
tsMessages := []msgstream.TsMsg{msg1, msg2, msg3, msg4}
|
assert.NoError(t, err)
|
||||||
|
tsMessages := []msgstream.TsMsg{msg1, msg2, msg3, msg4, msg5}
|
||||||
var msgStreamMsg Msg = flowgraph.GenerateMsgStreamMsg(tsMessages, 0, 0, nil, nil)
|
var msgStreamMsg Msg = flowgraph.GenerateMsgStreamMsg(tsMessages, 0, 0, nil, nil)
|
||||||
outputMsgs := ddn.Operate([]Msg{msgStreamMsg})
|
outputMsgs := ddn.Operate([]Msg{msgStreamMsg})
|
||||||
assert.NotNil(t, outputMsgs)
|
assert.NotNil(t, outputMsgs)
|
||||||
|
|||||||
@ -36,6 +36,8 @@ type MsgHandler interface {
|
|||||||
HandleSchemaChange(ctx context.Context, schemaChangeMsg message.ImmutableSchemaChangeMessageV2) error
|
HandleSchemaChange(ctx context.Context, schemaChangeMsg message.ImmutableSchemaChangeMessageV2) error
|
||||||
|
|
||||||
HandleAlterCollection(ctx context.Context, alterCollectionMsg message.ImmutableAlterCollectionMessageV2) error
|
HandleAlterCollection(ctx context.Context, alterCollectionMsg message.ImmutableAlterCollectionMessageV2) error
|
||||||
|
|
||||||
|
HandleTruncateCollection(truncateCollectionMsg message.ImmutableTruncateCollectionMessageV2) error
|
||||||
}
|
}
|
||||||
|
|
||||||
func ConvertInternalImportFile(file *msgpb.ImportFile, _ int) *internalpb.ImportFile {
|
func ConvertInternalImportFile(file *msgpb.ImportFile, _ int) *internalpb.ImportFile {
|
||||||
|
|||||||
@ -28,29 +28,30 @@ import (
|
|||||||
|
|
||||||
// TODO: These collection is dirty implementation and easy to be broken, we should drop it in the future.
|
// TODO: These collection is dirty implementation and easy to be broken, we should drop it in the future.
|
||||||
type Collection struct {
|
type Collection struct {
|
||||||
TenantID string
|
TenantID string
|
||||||
DBID int64
|
DBID int64
|
||||||
CollectionID int64
|
CollectionID int64
|
||||||
Partitions []*Partition
|
Partitions []*Partition
|
||||||
Name string
|
Name string
|
||||||
DBName string
|
DBName string
|
||||||
Description string
|
Description string
|
||||||
AutoID bool
|
AutoID bool
|
||||||
Fields []*Field
|
Fields []*Field
|
||||||
StructArrayFields []*StructArrayField
|
StructArrayFields []*StructArrayField
|
||||||
Functions []*Function
|
Functions []*Function
|
||||||
VirtualChannelNames []string
|
VirtualChannelNames []string
|
||||||
PhysicalChannelNames []string
|
PhysicalChannelNames []string
|
||||||
ShardsNum int32
|
ShardsNum int32
|
||||||
StartPositions []*commonpb.KeyDataPair
|
StartPositions []*commonpb.KeyDataPair
|
||||||
CreateTime uint64
|
CreateTime uint64
|
||||||
ConsistencyLevel commonpb.ConsistencyLevel
|
ConsistencyLevel commonpb.ConsistencyLevel
|
||||||
Aliases []string // TODO: deprecate this.
|
Aliases []string // TODO: deprecate this.
|
||||||
Properties []*commonpb.KeyValuePair
|
Properties []*commonpb.KeyValuePair
|
||||||
State pb.CollectionState
|
State pb.CollectionState
|
||||||
EnableDynamicField bool
|
EnableDynamicField bool
|
||||||
UpdateTimestamp uint64
|
UpdateTimestamp uint64
|
||||||
SchemaVersion int32
|
SchemaVersion int32
|
||||||
|
LastTruncateTimestamps map[string]uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Collection) Available() bool {
|
func (c *Collection) Available() bool {
|
||||||
@ -59,57 +60,59 @@ func (c *Collection) Available() bool {
|
|||||||
|
|
||||||
func (c *Collection) ShallowClone() *Collection {
|
func (c *Collection) ShallowClone() *Collection {
|
||||||
return &Collection{
|
return &Collection{
|
||||||
TenantID: c.TenantID,
|
TenantID: c.TenantID,
|
||||||
DBID: c.DBID,
|
DBID: c.DBID,
|
||||||
CollectionID: c.CollectionID,
|
CollectionID: c.CollectionID,
|
||||||
Name: c.Name,
|
Name: c.Name,
|
||||||
DBName: c.DBName,
|
DBName: c.DBName,
|
||||||
Description: c.Description,
|
Description: c.Description,
|
||||||
AutoID: c.AutoID,
|
AutoID: c.AutoID,
|
||||||
Fields: c.Fields,
|
Fields: c.Fields,
|
||||||
StructArrayFields: c.StructArrayFields,
|
StructArrayFields: c.StructArrayFields,
|
||||||
Partitions: c.Partitions,
|
Partitions: c.Partitions,
|
||||||
VirtualChannelNames: c.VirtualChannelNames,
|
VirtualChannelNames: c.VirtualChannelNames,
|
||||||
PhysicalChannelNames: c.PhysicalChannelNames,
|
PhysicalChannelNames: c.PhysicalChannelNames,
|
||||||
ShardsNum: c.ShardsNum,
|
ShardsNum: c.ShardsNum,
|
||||||
ConsistencyLevel: c.ConsistencyLevel,
|
ConsistencyLevel: c.ConsistencyLevel,
|
||||||
CreateTime: c.CreateTime,
|
CreateTime: c.CreateTime,
|
||||||
StartPositions: c.StartPositions,
|
StartPositions: c.StartPositions,
|
||||||
Aliases: c.Aliases,
|
Aliases: c.Aliases,
|
||||||
Properties: c.Properties,
|
Properties: c.Properties,
|
||||||
State: c.State,
|
State: c.State,
|
||||||
EnableDynamicField: c.EnableDynamicField,
|
EnableDynamicField: c.EnableDynamicField,
|
||||||
Functions: c.Functions,
|
Functions: c.Functions,
|
||||||
UpdateTimestamp: c.UpdateTimestamp,
|
UpdateTimestamp: c.UpdateTimestamp,
|
||||||
SchemaVersion: c.SchemaVersion,
|
SchemaVersion: c.SchemaVersion,
|
||||||
|
LastTruncateTimestamps: c.LastTruncateTimestamps,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Collection) Clone() *Collection {
|
func (c *Collection) Clone() *Collection {
|
||||||
return &Collection{
|
return &Collection{
|
||||||
TenantID: c.TenantID,
|
TenantID: c.TenantID,
|
||||||
DBID: c.DBID,
|
DBID: c.DBID,
|
||||||
CollectionID: c.CollectionID,
|
CollectionID: c.CollectionID,
|
||||||
Name: c.Name,
|
Name: c.Name,
|
||||||
DBName: c.DBName,
|
DBName: c.DBName,
|
||||||
Description: c.Description,
|
Description: c.Description,
|
||||||
AutoID: c.AutoID,
|
AutoID: c.AutoID,
|
||||||
Fields: CloneFields(c.Fields),
|
Fields: CloneFields(c.Fields),
|
||||||
StructArrayFields: CloneStructArrayFields(c.StructArrayFields),
|
StructArrayFields: CloneStructArrayFields(c.StructArrayFields),
|
||||||
Partitions: ClonePartitions(c.Partitions),
|
Partitions: ClonePartitions(c.Partitions),
|
||||||
VirtualChannelNames: common.CloneStringList(c.VirtualChannelNames),
|
VirtualChannelNames: common.CloneStringList(c.VirtualChannelNames),
|
||||||
PhysicalChannelNames: common.CloneStringList(c.PhysicalChannelNames),
|
PhysicalChannelNames: common.CloneStringList(c.PhysicalChannelNames),
|
||||||
ShardsNum: c.ShardsNum,
|
ShardsNum: c.ShardsNum,
|
||||||
ConsistencyLevel: c.ConsistencyLevel,
|
ConsistencyLevel: c.ConsistencyLevel,
|
||||||
CreateTime: c.CreateTime,
|
CreateTime: c.CreateTime,
|
||||||
StartPositions: common.CloneKeyDataPairs(c.StartPositions),
|
StartPositions: common.CloneKeyDataPairs(c.StartPositions),
|
||||||
Aliases: common.CloneStringList(c.Aliases),
|
Aliases: common.CloneStringList(c.Aliases),
|
||||||
Properties: common.CloneKeyValuePairs(c.Properties),
|
Properties: common.CloneKeyValuePairs(c.Properties),
|
||||||
State: c.State,
|
State: c.State,
|
||||||
EnableDynamicField: c.EnableDynamicField,
|
EnableDynamicField: c.EnableDynamicField,
|
||||||
Functions: CloneFunctions(c.Functions),
|
Functions: CloneFunctions(c.Functions),
|
||||||
UpdateTimestamp: c.UpdateTimestamp,
|
UpdateTimestamp: c.UpdateTimestamp,
|
||||||
SchemaVersion: c.SchemaVersion,
|
SchemaVersion: c.SchemaVersion,
|
||||||
|
LastTruncateTimestamps: common.CloneMap(c.LastTruncateTimestamps),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,26 +181,27 @@ func UnmarshalCollectionModel(coll *pb.CollectionInfo) *Collection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return &Collection{
|
return &Collection{
|
||||||
CollectionID: coll.ID,
|
CollectionID: coll.ID,
|
||||||
DBID: coll.DbId,
|
DBID: coll.DbId,
|
||||||
Name: coll.Schema.Name,
|
Name: coll.Schema.Name,
|
||||||
DBName: coll.Schema.DbName,
|
DBName: coll.Schema.DbName,
|
||||||
Description: coll.Schema.Description,
|
Description: coll.Schema.Description,
|
||||||
AutoID: coll.Schema.AutoID,
|
AutoID: coll.Schema.AutoID,
|
||||||
Fields: UnmarshalFieldModels(coll.GetSchema().GetFields()),
|
Fields: UnmarshalFieldModels(coll.GetSchema().GetFields()),
|
||||||
StructArrayFields: UnmarshalStructArrayFieldModels(coll.GetSchema().GetStructArrayFields()),
|
StructArrayFields: UnmarshalStructArrayFieldModels(coll.GetSchema().GetStructArrayFields()),
|
||||||
Partitions: partitions,
|
Partitions: partitions,
|
||||||
VirtualChannelNames: coll.VirtualChannelNames,
|
VirtualChannelNames: coll.VirtualChannelNames,
|
||||||
PhysicalChannelNames: coll.PhysicalChannelNames,
|
PhysicalChannelNames: coll.PhysicalChannelNames,
|
||||||
ShardsNum: coll.ShardsNum,
|
ShardsNum: coll.ShardsNum,
|
||||||
ConsistencyLevel: coll.ConsistencyLevel,
|
ConsistencyLevel: coll.ConsistencyLevel,
|
||||||
CreateTime: coll.CreateTime,
|
CreateTime: coll.CreateTime,
|
||||||
StartPositions: coll.StartPositions,
|
StartPositions: coll.StartPositions,
|
||||||
State: coll.State,
|
State: coll.State,
|
||||||
Properties: coll.Properties,
|
Properties: coll.Properties,
|
||||||
EnableDynamicField: coll.Schema.EnableDynamicField,
|
EnableDynamicField: coll.Schema.EnableDynamicField,
|
||||||
UpdateTimestamp: coll.UpdateTimestamp,
|
UpdateTimestamp: coll.UpdateTimestamp,
|
||||||
SchemaVersion: coll.Schema.Version,
|
SchemaVersion: coll.Schema.Version,
|
||||||
|
LastTruncateTimestamps: coll.LastTruncateTimestamps,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -262,18 +266,19 @@ func marshalCollectionModelWithConfig(coll *Collection, c *config) *pb.Collectio
|
|||||||
}
|
}
|
||||||
|
|
||||||
collectionPb := &pb.CollectionInfo{
|
collectionPb := &pb.CollectionInfo{
|
||||||
ID: coll.CollectionID,
|
ID: coll.CollectionID,
|
||||||
DbId: coll.DBID,
|
DbId: coll.DBID,
|
||||||
Schema: collSchema,
|
Schema: collSchema,
|
||||||
CreateTime: coll.CreateTime,
|
CreateTime: coll.CreateTime,
|
||||||
VirtualChannelNames: coll.VirtualChannelNames,
|
VirtualChannelNames: coll.VirtualChannelNames,
|
||||||
PhysicalChannelNames: coll.PhysicalChannelNames,
|
PhysicalChannelNames: coll.PhysicalChannelNames,
|
||||||
ShardsNum: coll.ShardsNum,
|
ShardsNum: coll.ShardsNum,
|
||||||
ConsistencyLevel: coll.ConsistencyLevel,
|
ConsistencyLevel: coll.ConsistencyLevel,
|
||||||
StartPositions: coll.StartPositions,
|
StartPositions: coll.StartPositions,
|
||||||
State: coll.State,
|
State: coll.State,
|
||||||
Properties: coll.Properties,
|
Properties: coll.Properties,
|
||||||
UpdateTimestamp: coll.UpdateTimestamp,
|
UpdateTimestamp: coll.UpdateTimestamp,
|
||||||
|
LastTruncateTimestamps: coll.LastTruncateTimestamps,
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.withPartitions {
|
if c.withPartitions {
|
||||||
|
|||||||
@ -302,6 +302,52 @@ func (_c *MockMsgHandler_HandleSchemaChange_Call) RunAndReturn(run func(context.
|
|||||||
return _c
|
return _c
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HandleTruncateCollection provides a mock function with given fields: truncateCollectionMsg
|
||||||
|
func (_m *MockMsgHandler) HandleTruncateCollection(truncateCollectionMsg message.ImmutableTruncateCollectionMessageV2) error {
|
||||||
|
ret := _m.Called(truncateCollectionMsg)
|
||||||
|
|
||||||
|
if len(ret) == 0 {
|
||||||
|
panic("no return value specified for HandleTruncateCollection")
|
||||||
|
}
|
||||||
|
|
||||||
|
var r0 error
|
||||||
|
if rf, ok := ret.Get(0).(func(message.ImmutableTruncateCollectionMessageV2) error); ok {
|
||||||
|
r0 = rf(truncateCollectionMsg)
|
||||||
|
} else {
|
||||||
|
r0 = ret.Error(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
return r0
|
||||||
|
}
|
||||||
|
|
||||||
|
// MockMsgHandler_HandleTruncateCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HandleTruncateCollection'
|
||||||
|
type MockMsgHandler_HandleTruncateCollection_Call struct {
|
||||||
|
*mock.Call
|
||||||
|
}
|
||||||
|
|
||||||
|
// HandleTruncateCollection is a helper method to define mock.On call
|
||||||
|
// - truncateCollectionMsg message.ImmutableTruncateCollectionMessageV2
|
||||||
|
func (_e *MockMsgHandler_Expecter) HandleTruncateCollection(truncateCollectionMsg interface{}) *MockMsgHandler_HandleTruncateCollection_Call {
|
||||||
|
return &MockMsgHandler_HandleTruncateCollection_Call{Call: _e.mock.On("HandleTruncateCollection", truncateCollectionMsg)}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_c *MockMsgHandler_HandleTruncateCollection_Call) Run(run func(truncateCollectionMsg message.ImmutableTruncateCollectionMessageV2)) *MockMsgHandler_HandleTruncateCollection_Call {
|
||||||
|
_c.Call.Run(func(args mock.Arguments) {
|
||||||
|
run(args[0].(message.ImmutableTruncateCollectionMessageV2))
|
||||||
|
})
|
||||||
|
return _c
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_c *MockMsgHandler_HandleTruncateCollection_Call) Return(_a0 error) *MockMsgHandler_HandleTruncateCollection_Call {
|
||||||
|
_c.Call.Return(_a0)
|
||||||
|
return _c
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_c *MockMsgHandler_HandleTruncateCollection_Call) RunAndReturn(run func(message.ImmutableTruncateCollectionMessageV2) error) *MockMsgHandler_HandleTruncateCollection_Call {
|
||||||
|
_c.Call.Return(run)
|
||||||
|
return _c
|
||||||
|
}
|
||||||
|
|
||||||
// NewMockMsgHandler creates a new instance of MockMsgHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
// NewMockMsgHandler creates a new instance of MockMsgHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||||
// The first argument is typically a *testing.T value.
|
// The first argument is typically a *testing.T value.
|
||||||
func NewMockMsgHandler(t interface {
|
func NewMockMsgHandler(t interface {
|
||||||
|
|||||||
@ -2760,6 +2760,54 @@ func (_c *MixCoord_DropRole_Call) RunAndReturn(run func(context.Context, *milvus
|
|||||||
return _c
|
return _c
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DropSegmentsByTime provides a mock function with given fields: ctx, collectionID, flushTsList
|
||||||
|
func (_m *MixCoord) DropSegmentsByTime(ctx context.Context, collectionID int64, flushTsList map[string]uint64) error {
|
||||||
|
ret := _m.Called(ctx, collectionID, flushTsList)
|
||||||
|
|
||||||
|
if len(ret) == 0 {
|
||||||
|
panic("no return value specified for DropSegmentsByTime")
|
||||||
|
}
|
||||||
|
|
||||||
|
var r0 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, int64, map[string]uint64) error); ok {
|
||||||
|
r0 = rf(ctx, collectionID, flushTsList)
|
||||||
|
} else {
|
||||||
|
r0 = ret.Error(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
return r0
|
||||||
|
}
|
||||||
|
|
||||||
|
// MixCoord_DropSegmentsByTime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropSegmentsByTime'
|
||||||
|
type MixCoord_DropSegmentsByTime_Call struct {
|
||||||
|
*mock.Call
|
||||||
|
}
|
||||||
|
|
||||||
|
// DropSegmentsByTime is a helper method to define mock.On call
|
||||||
|
// - ctx context.Context
|
||||||
|
// - collectionID int64
|
||||||
|
// - flushTsList map[string]uint64
|
||||||
|
func (_e *MixCoord_Expecter) DropSegmentsByTime(ctx interface{}, collectionID interface{}, flushTsList interface{}) *MixCoord_DropSegmentsByTime_Call {
|
||||||
|
return &MixCoord_DropSegmentsByTime_Call{Call: _e.mock.On("DropSegmentsByTime", ctx, collectionID, flushTsList)}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_c *MixCoord_DropSegmentsByTime_Call) Run(run func(ctx context.Context, collectionID int64, flushTsList map[string]uint64)) *MixCoord_DropSegmentsByTime_Call {
|
||||||
|
_c.Call.Run(func(args mock.Arguments) {
|
||||||
|
run(args[0].(context.Context), args[1].(int64), args[2].(map[string]uint64))
|
||||||
|
})
|
||||||
|
return _c
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_c *MixCoord_DropSegmentsByTime_Call) Return(_a0 error) *MixCoord_DropSegmentsByTime_Call {
|
||||||
|
_c.Call.Return(_a0)
|
||||||
|
return _c
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_c *MixCoord_DropSegmentsByTime_Call) RunAndReturn(run func(context.Context, int64, map[string]uint64) error) *MixCoord_DropSegmentsByTime_Call {
|
||||||
|
_c.Call.Return(run)
|
||||||
|
return _c
|
||||||
|
}
|
||||||
|
|
||||||
// DropVirtualChannel provides a mock function with given fields: _a0, _a1
|
// DropVirtualChannel provides a mock function with given fields: _a0, _a1
|
||||||
func (_m *MixCoord) DropVirtualChannel(_a0 context.Context, _a1 *datapb.DropVirtualChannelRequest) (*datapb.DropVirtualChannelResponse, error) {
|
func (_m *MixCoord) DropVirtualChannel(_a0 context.Context, _a1 *datapb.DropVirtualChannelRequest) (*datapb.DropVirtualChannelResponse, error) {
|
||||||
ret := _m.Called(_a0, _a1)
|
ret := _m.Called(_a0, _a1)
|
||||||
@ -6377,6 +6425,53 @@ func (_c *MixCoord_ManualCompaction_Call) RunAndReturn(run func(context.Context,
|
|||||||
return _c
|
return _c
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ManualUpdateCurrentTarget provides a mock function with given fields: ctx, collectionID
|
||||||
|
func (_m *MixCoord) ManualUpdateCurrentTarget(ctx context.Context, collectionID int64) error {
|
||||||
|
ret := _m.Called(ctx, collectionID)
|
||||||
|
|
||||||
|
if len(ret) == 0 {
|
||||||
|
panic("no return value specified for ManualUpdateCurrentTarget")
|
||||||
|
}
|
||||||
|
|
||||||
|
var r0 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||||||
|
r0 = rf(ctx, collectionID)
|
||||||
|
} else {
|
||||||
|
r0 = ret.Error(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
return r0
|
||||||
|
}
|
||||||
|
|
||||||
|
// MixCoord_ManualUpdateCurrentTarget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ManualUpdateCurrentTarget'
|
||||||
|
type MixCoord_ManualUpdateCurrentTarget_Call struct {
|
||||||
|
*mock.Call
|
||||||
|
}
|
||||||
|
|
||||||
|
// ManualUpdateCurrentTarget is a helper method to define mock.On call
|
||||||
|
// - ctx context.Context
|
||||||
|
// - collectionID int64
|
||||||
|
func (_e *MixCoord_Expecter) ManualUpdateCurrentTarget(ctx interface{}, collectionID interface{}) *MixCoord_ManualUpdateCurrentTarget_Call {
|
||||||
|
return &MixCoord_ManualUpdateCurrentTarget_Call{Call: _e.mock.On("ManualUpdateCurrentTarget", ctx, collectionID)}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_c *MixCoord_ManualUpdateCurrentTarget_Call) Run(run func(ctx context.Context, collectionID int64)) *MixCoord_ManualUpdateCurrentTarget_Call {
|
||||||
|
_c.Call.Run(func(args mock.Arguments) {
|
||||||
|
run(args[0].(context.Context), args[1].(int64))
|
||||||
|
})
|
||||||
|
return _c
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_c *MixCoord_ManualUpdateCurrentTarget_Call) Return(_a0 error) *MixCoord_ManualUpdateCurrentTarget_Call {
|
||||||
|
_c.Call.Return(_a0)
|
||||||
|
return _c
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_c *MixCoord_ManualUpdateCurrentTarget_Call) RunAndReturn(run func(context.Context, int64) error) *MixCoord_ManualUpdateCurrentTarget_Call {
|
||||||
|
_c.Call.Return(run)
|
||||||
|
return _c
|
||||||
|
}
|
||||||
|
|
||||||
// MarkSegmentsDropped provides a mock function with given fields: _a0, _a1
|
// MarkSegmentsDropped provides a mock function with given fields: _a0, _a1
|
||||||
func (_m *MixCoord) MarkSegmentsDropped(_a0 context.Context, _a1 *datapb.MarkSegmentsDroppedRequest) (*commonpb.Status, error) {
|
func (_m *MixCoord) MarkSegmentsDropped(_a0 context.Context, _a1 *datapb.MarkSegmentsDroppedRequest) (*commonpb.Status, error) {
|
||||||
ret := _m.Called(_a0, _a1)
|
ret := _m.Called(_a0, _a1)
|
||||||
@ -8720,6 +8815,65 @@ func (_c *MixCoord_TransferSegment_Call) RunAndReturn(run func(context.Context,
|
|||||||
return _c
|
return _c
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TruncateCollection provides a mock function with given fields: _a0, _a1
|
||||||
|
func (_m *MixCoord) TruncateCollection(_a0 context.Context, _a1 *milvuspb.TruncateCollectionRequest) (*milvuspb.TruncateCollectionResponse, error) {
|
||||||
|
ret := _m.Called(_a0, _a1)
|
||||||
|
|
||||||
|
if len(ret) == 0 {
|
||||||
|
panic("no return value specified for TruncateCollection")
|
||||||
|
}
|
||||||
|
|
||||||
|
var r0 *milvuspb.TruncateCollectionResponse
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TruncateCollectionRequest) (*milvuspb.TruncateCollectionResponse, error)); ok {
|
||||||
|
return rf(_a0, _a1)
|
||||||
|
}
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TruncateCollectionRequest) *milvuspb.TruncateCollectionResponse); ok {
|
||||||
|
r0 = rf(_a0, _a1)
|
||||||
|
} else {
|
||||||
|
if ret.Get(0) != nil {
|
||||||
|
r0 = ret.Get(0).(*milvuspb.TruncateCollectionResponse)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.TruncateCollectionRequest) error); ok {
|
||||||
|
r1 = rf(_a0, _a1)
|
||||||
|
} else {
|
||||||
|
r1 = ret.Error(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
return r0, r1
|
||||||
|
}
|
||||||
|
|
||||||
|
// MixCoord_TruncateCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TruncateCollection'
|
||||||
|
type MixCoord_TruncateCollection_Call struct {
|
||||||
|
*mock.Call
|
||||||
|
}
|
||||||
|
|
||||||
|
// TruncateCollection is a helper method to define mock.On call
|
||||||
|
// - _a0 context.Context
|
||||||
|
// - _a1 *milvuspb.TruncateCollectionRequest
|
||||||
|
func (_e *MixCoord_Expecter) TruncateCollection(_a0 interface{}, _a1 interface{}) *MixCoord_TruncateCollection_Call {
|
||||||
|
return &MixCoord_TruncateCollection_Call{Call: _e.mock.On("TruncateCollection", _a0, _a1)}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_c *MixCoord_TruncateCollection_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.TruncateCollectionRequest)) *MixCoord_TruncateCollection_Call {
|
||||||
|
_c.Call.Run(func(args mock.Arguments) {
|
||||||
|
run(args[0].(context.Context), args[1].(*milvuspb.TruncateCollectionRequest))
|
||||||
|
})
|
||||||
|
return _c
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_c *MixCoord_TruncateCollection_Call) Return(_a0 *milvuspb.TruncateCollectionResponse, _a1 error) *MixCoord_TruncateCollection_Call {
|
||||||
|
_c.Call.Return(_a0, _a1)
|
||||||
|
return _c
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_c *MixCoord_TruncateCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.TruncateCollectionRequest) (*milvuspb.TruncateCollectionResponse, error)) *MixCoord_TruncateCollection_Call {
|
||||||
|
_c.Call.Return(run)
|
||||||
|
return _c
|
||||||
|
}
|
||||||
|
|
||||||
// UpdateChannelCheckpoint provides a mock function with given fields: _a0, _a1
|
// UpdateChannelCheckpoint provides a mock function with given fields: _a0, _a1
|
||||||
func (_m *MixCoord) UpdateChannelCheckpoint(_a0 context.Context, _a1 *datapb.UpdateChannelCheckpointRequest) (*commonpb.Status, error) {
|
func (_m *MixCoord) UpdateChannelCheckpoint(_a0 context.Context, _a1 *datapb.UpdateChannelCheckpointRequest) (*commonpb.Status, error) {
|
||||||
ret := _m.Called(_a0, _a1)
|
ret := _m.Called(_a0, _a1)
|
||||||
|
|||||||
@ -10224,6 +10224,80 @@ func (_c *MockMixCoordClient_TransferSegment_Call) RunAndReturn(run func(context
|
|||||||
return _c
|
return _c
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TruncateCollection provides a mock function with given fields: ctx, in, opts
|
||||||
|
func (_m *MockMixCoordClient) TruncateCollection(ctx context.Context, in *milvuspb.TruncateCollectionRequest, opts ...grpc.CallOption) (*milvuspb.TruncateCollectionResponse, error) {
|
||||||
|
_va := make([]interface{}, len(opts))
|
||||||
|
for _i := range opts {
|
||||||
|
_va[_i] = opts[_i]
|
||||||
|
}
|
||||||
|
var _ca []interface{}
|
||||||
|
_ca = append(_ca, ctx, in)
|
||||||
|
_ca = append(_ca, _va...)
|
||||||
|
ret := _m.Called(_ca...)
|
||||||
|
|
||||||
|
if len(ret) == 0 {
|
||||||
|
panic("no return value specified for TruncateCollection")
|
||||||
|
}
|
||||||
|
|
||||||
|
var r0 *milvuspb.TruncateCollectionResponse
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TruncateCollectionRequest, ...grpc.CallOption) (*milvuspb.TruncateCollectionResponse, error)); ok {
|
||||||
|
return rf(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TruncateCollectionRequest, ...grpc.CallOption) *milvuspb.TruncateCollectionResponse); ok {
|
||||||
|
r0 = rf(ctx, in, opts...)
|
||||||
|
} else {
|
||||||
|
if ret.Get(0) != nil {
|
||||||
|
r0 = ret.Get(0).(*milvuspb.TruncateCollectionResponse)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.TruncateCollectionRequest, ...grpc.CallOption) error); ok {
|
||||||
|
r1 = rf(ctx, in, opts...)
|
||||||
|
} else {
|
||||||
|
r1 = ret.Error(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
return r0, r1
|
||||||
|
}
|
||||||
|
|
||||||
|
// MockMixCoordClient_TruncateCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TruncateCollection'
|
||||||
|
type MockMixCoordClient_TruncateCollection_Call struct {
|
||||||
|
*mock.Call
|
||||||
|
}
|
||||||
|
|
||||||
|
// TruncateCollection is a helper method to define mock.On call
|
||||||
|
// - ctx context.Context
|
||||||
|
// - in *milvuspb.TruncateCollectionRequest
|
||||||
|
// - opts ...grpc.CallOption
|
||||||
|
func (_e *MockMixCoordClient_Expecter) TruncateCollection(ctx interface{}, in interface{}, opts ...interface{}) *MockMixCoordClient_TruncateCollection_Call {
|
||||||
|
return &MockMixCoordClient_TruncateCollection_Call{Call: _e.mock.On("TruncateCollection",
|
||||||
|
append([]interface{}{ctx, in}, opts...)...)}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_c *MockMixCoordClient_TruncateCollection_Call) Run(run func(ctx context.Context, in *milvuspb.TruncateCollectionRequest, opts ...grpc.CallOption)) *MockMixCoordClient_TruncateCollection_Call {
|
||||||
|
_c.Call.Run(func(args mock.Arguments) {
|
||||||
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
||||||
|
for i, a := range args[2:] {
|
||||||
|
if a != nil {
|
||||||
|
variadicArgs[i] = a.(grpc.CallOption)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
run(args[0].(context.Context), args[1].(*milvuspb.TruncateCollectionRequest), variadicArgs...)
|
||||||
|
})
|
||||||
|
return _c
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_c *MockMixCoordClient_TruncateCollection_Call) Return(_a0 *milvuspb.TruncateCollectionResponse, _a1 error) *MockMixCoordClient_TruncateCollection_Call {
|
||||||
|
_c.Call.Return(_a0, _a1)
|
||||||
|
return _c
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_c *MockMixCoordClient_TruncateCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.TruncateCollectionRequest, ...grpc.CallOption) (*milvuspb.TruncateCollectionResponse, error)) *MockMixCoordClient_TruncateCollection_Call {
|
||||||
|
_c.Call.Return(run)
|
||||||
|
return _c
|
||||||
|
}
|
||||||
|
|
||||||
// UpdateChannelCheckpoint provides a mock function with given fields: ctx, in, opts
|
// UpdateChannelCheckpoint provides a mock function with given fields: ctx, in, opts
|
||||||
func (_m *MockMixCoordClient) UpdateChannelCheckpoint(ctx context.Context, in *datapb.UpdateChannelCheckpointRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
func (_m *MockMixCoordClient) UpdateChannelCheckpoint(ctx context.Context, in *datapb.UpdateChannelCheckpointRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
||||||
_va := make([]interface{}, len(opts))
|
_va := make([]interface{}, len(opts))
|
||||||
|
|||||||
@ -8131,23 +8131,23 @@ func (_c *MockProxy_TransferReplica_Call) RunAndReturn(run func(context.Context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TruncateCollection provides a mock function with given fields: _a0, _a1
|
// TruncateCollection provides a mock function with given fields: _a0, _a1
|
||||||
func (_m *MockProxy) TruncateCollection(_a0 context.Context, _a1 *milvuspb.TruncateCollectionRequest) (*commonpb.Status, error) {
|
func (_m *MockProxy) TruncateCollection(_a0 context.Context, _a1 *milvuspb.TruncateCollectionRequest) (*milvuspb.TruncateCollectionResponse, error) {
|
||||||
ret := _m.Called(_a0, _a1)
|
ret := _m.Called(_a0, _a1)
|
||||||
|
|
||||||
if len(ret) == 0 {
|
if len(ret) == 0 {
|
||||||
panic("no return value specified for TruncateCollection")
|
panic("no return value specified for TruncateCollection")
|
||||||
}
|
}
|
||||||
|
|
||||||
var r0 *commonpb.Status
|
var r0 *milvuspb.TruncateCollectionResponse
|
||||||
var r1 error
|
var r1 error
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TruncateCollectionRequest) (*commonpb.Status, error)); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TruncateCollectionRequest) (*milvuspb.TruncateCollectionResponse, error)); ok {
|
||||||
return rf(_a0, _a1)
|
return rf(_a0, _a1)
|
||||||
}
|
}
|
||||||
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TruncateCollectionRequest) *commonpb.Status); ok {
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TruncateCollectionRequest) *milvuspb.TruncateCollectionResponse); ok {
|
||||||
r0 = rf(_a0, _a1)
|
r0 = rf(_a0, _a1)
|
||||||
} else {
|
} else {
|
||||||
if ret.Get(0) != nil {
|
if ret.Get(0) != nil {
|
||||||
r0 = ret.Get(0).(*commonpb.Status)
|
r0 = ret.Get(0).(*milvuspb.TruncateCollectionResponse)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8179,12 +8179,12 @@ func (_c *MockProxy_TruncateCollection_Call) Run(run func(_a0 context.Context, _
|
|||||||
return _c
|
return _c
|
||||||
}
|
}
|
||||||
|
|
||||||
func (_c *MockProxy_TruncateCollection_Call) Return(_a0 *commonpb.Status, _a1 error) *MockProxy_TruncateCollection_Call {
|
func (_c *MockProxy_TruncateCollection_Call) Return(_a0 *milvuspb.TruncateCollectionResponse, _a1 error) *MockProxy_TruncateCollection_Call {
|
||||||
_c.Call.Return(_a0, _a1)
|
_c.Call.Return(_a0, _a1)
|
||||||
return _c
|
return _c
|
||||||
}
|
}
|
||||||
|
|
||||||
func (_c *MockProxy_TruncateCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.TruncateCollectionRequest) (*commonpb.Status, error)) *MockProxy_TruncateCollection_Call {
|
func (_c *MockProxy_TruncateCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.TruncateCollectionRequest) (*milvuspb.TruncateCollectionResponse, error)) *MockProxy_TruncateCollection_Call {
|
||||||
_c.Call.Return(run)
|
_c.Call.Return(run)
|
||||||
return _c
|
return _c
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3875,6 +3875,65 @@ func (_c *MockRootCoord_Stop_Call) RunAndReturn(run func() error) *MockRootCoord
|
|||||||
return _c
|
return _c
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TruncateCollection provides a mock function with given fields: _a0, _a1
|
||||||
|
func (_m *MockRootCoord) TruncateCollection(_a0 context.Context, _a1 *milvuspb.TruncateCollectionRequest) (*milvuspb.TruncateCollectionResponse, error) {
|
||||||
|
ret := _m.Called(_a0, _a1)
|
||||||
|
|
||||||
|
if len(ret) == 0 {
|
||||||
|
panic("no return value specified for TruncateCollection")
|
||||||
|
}
|
||||||
|
|
||||||
|
var r0 *milvuspb.TruncateCollectionResponse
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TruncateCollectionRequest) (*milvuspb.TruncateCollectionResponse, error)); ok {
|
||||||
|
return rf(_a0, _a1)
|
||||||
|
}
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TruncateCollectionRequest) *milvuspb.TruncateCollectionResponse); ok {
|
||||||
|
r0 = rf(_a0, _a1)
|
||||||
|
} else {
|
||||||
|
if ret.Get(0) != nil {
|
||||||
|
r0 = ret.Get(0).(*milvuspb.TruncateCollectionResponse)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.TruncateCollectionRequest) error); ok {
|
||||||
|
r1 = rf(_a0, _a1)
|
||||||
|
} else {
|
||||||
|
r1 = ret.Error(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
return r0, r1
|
||||||
|
}
|
||||||
|
|
||||||
|
// MockRootCoord_TruncateCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TruncateCollection'
|
||||||
|
type MockRootCoord_TruncateCollection_Call struct {
|
||||||
|
*mock.Call
|
||||||
|
}
|
||||||
|
|
||||||
|
// TruncateCollection is a helper method to define mock.On call
|
||||||
|
// - _a0 context.Context
|
||||||
|
// - _a1 *milvuspb.TruncateCollectionRequest
|
||||||
|
func (_e *MockRootCoord_Expecter) TruncateCollection(_a0 interface{}, _a1 interface{}) *MockRootCoord_TruncateCollection_Call {
|
||||||
|
return &MockRootCoord_TruncateCollection_Call{Call: _e.mock.On("TruncateCollection", _a0, _a1)}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_c *MockRootCoord_TruncateCollection_Call) Run(run func(_a0 context.Context, _a1 *milvuspb.TruncateCollectionRequest)) *MockRootCoord_TruncateCollection_Call {
|
||||||
|
_c.Call.Run(func(args mock.Arguments) {
|
||||||
|
run(args[0].(context.Context), args[1].(*milvuspb.TruncateCollectionRequest))
|
||||||
|
})
|
||||||
|
return _c
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_c *MockRootCoord_TruncateCollection_Call) Return(_a0 *milvuspb.TruncateCollectionResponse, _a1 error) *MockRootCoord_TruncateCollection_Call {
|
||||||
|
_c.Call.Return(_a0, _a1)
|
||||||
|
return _c
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_c *MockRootCoord_TruncateCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.TruncateCollectionRequest) (*milvuspb.TruncateCollectionResponse, error)) *MockRootCoord_TruncateCollection_Call {
|
||||||
|
_c.Call.Return(run)
|
||||||
|
return _c
|
||||||
|
}
|
||||||
|
|
||||||
// UpdateChannelTimeTick provides a mock function with given fields: _a0, _a1
|
// UpdateChannelTimeTick provides a mock function with given fields: _a0, _a1
|
||||||
func (_m *MockRootCoord) UpdateChannelTimeTick(_a0 context.Context, _a1 *internalpb.ChannelTimeTickMsg) (*commonpb.Status, error) {
|
func (_m *MockRootCoord) UpdateChannelTimeTick(_a0 context.Context, _a1 *internalpb.ChannelTimeTickMsg) (*commonpb.Status, error) {
|
||||||
ret := _m.Called(_a0, _a1)
|
ret := _m.Called(_a0, _a1)
|
||||||
|
|||||||
@ -4444,6 +4444,80 @@ func (_c *MockRootCoordClient_ShowSegments_Call) RunAndReturn(run func(context.C
|
|||||||
return _c
|
return _c
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TruncateCollection provides a mock function with given fields: ctx, in, opts
|
||||||
|
func (_m *MockRootCoordClient) TruncateCollection(ctx context.Context, in *milvuspb.TruncateCollectionRequest, opts ...grpc.CallOption) (*milvuspb.TruncateCollectionResponse, error) {
|
||||||
|
_va := make([]interface{}, len(opts))
|
||||||
|
for _i := range opts {
|
||||||
|
_va[_i] = opts[_i]
|
||||||
|
}
|
||||||
|
var _ca []interface{}
|
||||||
|
_ca = append(_ca, ctx, in)
|
||||||
|
_ca = append(_ca, _va...)
|
||||||
|
ret := _m.Called(_ca...)
|
||||||
|
|
||||||
|
if len(ret) == 0 {
|
||||||
|
panic("no return value specified for TruncateCollection")
|
||||||
|
}
|
||||||
|
|
||||||
|
var r0 *milvuspb.TruncateCollectionResponse
|
||||||
|
var r1 error
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TruncateCollectionRequest, ...grpc.CallOption) (*milvuspb.TruncateCollectionResponse, error)); ok {
|
||||||
|
return rf(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TruncateCollectionRequest, ...grpc.CallOption) *milvuspb.TruncateCollectionResponse); ok {
|
||||||
|
r0 = rf(ctx, in, opts...)
|
||||||
|
} else {
|
||||||
|
if ret.Get(0) != nil {
|
||||||
|
r0 = ret.Get(0).(*milvuspb.TruncateCollectionResponse)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.TruncateCollectionRequest, ...grpc.CallOption) error); ok {
|
||||||
|
r1 = rf(ctx, in, opts...)
|
||||||
|
} else {
|
||||||
|
r1 = ret.Error(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
return r0, r1
|
||||||
|
}
|
||||||
|
|
||||||
|
// MockRootCoordClient_TruncateCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TruncateCollection'
|
||||||
|
type MockRootCoordClient_TruncateCollection_Call struct {
|
||||||
|
*mock.Call
|
||||||
|
}
|
||||||
|
|
||||||
|
// TruncateCollection is a helper method to define mock.On call
|
||||||
|
// - ctx context.Context
|
||||||
|
// - in *milvuspb.TruncateCollectionRequest
|
||||||
|
// - opts ...grpc.CallOption
|
||||||
|
func (_e *MockRootCoordClient_Expecter) TruncateCollection(ctx interface{}, in interface{}, opts ...interface{}) *MockRootCoordClient_TruncateCollection_Call {
|
||||||
|
return &MockRootCoordClient_TruncateCollection_Call{Call: _e.mock.On("TruncateCollection",
|
||||||
|
append([]interface{}{ctx, in}, opts...)...)}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_c *MockRootCoordClient_TruncateCollection_Call) Run(run func(ctx context.Context, in *milvuspb.TruncateCollectionRequest, opts ...grpc.CallOption)) *MockRootCoordClient_TruncateCollection_Call {
|
||||||
|
_c.Call.Run(func(args mock.Arguments) {
|
||||||
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
||||||
|
for i, a := range args[2:] {
|
||||||
|
if a != nil {
|
||||||
|
variadicArgs[i] = a.(grpc.CallOption)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
run(args[0].(context.Context), args[1].(*milvuspb.TruncateCollectionRequest), variadicArgs...)
|
||||||
|
})
|
||||||
|
return _c
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_c *MockRootCoordClient_TruncateCollection_Call) Return(_a0 *milvuspb.TruncateCollectionResponse, _a1 error) *MockRootCoordClient_TruncateCollection_Call {
|
||||||
|
_c.Call.Return(_a0, _a1)
|
||||||
|
return _c
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_c *MockRootCoordClient_TruncateCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.TruncateCollectionRequest, ...grpc.CallOption) (*milvuspb.TruncateCollectionResponse, error)) *MockRootCoordClient_TruncateCollection_Call {
|
||||||
|
_c.Call.Return(run)
|
||||||
|
return _c
|
||||||
|
}
|
||||||
|
|
||||||
// UpdateChannelTimeTick provides a mock function with given fields: ctx, in, opts
|
// UpdateChannelTimeTick provides a mock function with given fields: ctx, in, opts
|
||||||
func (_m *MockRootCoordClient) UpdateChannelTimeTick(ctx context.Context, in *internalpb.ChannelTimeTickMsg, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
func (_m *MockRootCoordClient) UpdateChannelTimeTick(ctx context.Context, in *internalpb.ChannelTimeTickMsg, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
||||||
_va := make([]interface{}, len(opts))
|
_va := make([]interface{}, len(opts))
|
||||||
|
|||||||
@ -623,6 +623,78 @@ func (node *Proxy) DropCollection(ctx context.Context, request *milvuspb.DropCol
|
|||||||
return dct.result, nil
|
return dct.result, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TruncateCollection truncate a collection.
|
||||||
|
func (node *Proxy) TruncateCollection(ctx context.Context, request *milvuspb.TruncateCollectionRequest) (*milvuspb.TruncateCollectionResponse, error) {
|
||||||
|
if err := merr.CheckHealthy(node.GetStateCode()); err != nil {
|
||||||
|
return &milvuspb.TruncateCollectionResponse{
|
||||||
|
Status: merr.Status(err),
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx, sp := otel.Tracer(typeutil.ProxyRole).Start(ctx, "Proxy-TruncateCollection")
|
||||||
|
defer sp.End()
|
||||||
|
method := "TruncateCollection"
|
||||||
|
tr := timerecord.NewTimeRecorder(method)
|
||||||
|
|
||||||
|
dct := &truncateCollectionTask{
|
||||||
|
ctx: ctx,
|
||||||
|
Condition: NewTaskCondition(ctx),
|
||||||
|
TruncateCollectionRequest: request,
|
||||||
|
mixCoord: node.mixCoord,
|
||||||
|
chMgr: node.chMgr,
|
||||||
|
}
|
||||||
|
|
||||||
|
log := log.Ctx(ctx).With(
|
||||||
|
zap.String("role", typeutil.ProxyRole),
|
||||||
|
zap.String("db", request.DbName),
|
||||||
|
zap.String("collection", request.CollectionName),
|
||||||
|
)
|
||||||
|
|
||||||
|
log.Info("TruncateCollection received")
|
||||||
|
|
||||||
|
if err := node.sched.ddQueue.Enqueue(dct); err != nil {
|
||||||
|
log.Warn("TruncateCollection failed to enqueue",
|
||||||
|
zap.Error(err))
|
||||||
|
|
||||||
|
return &milvuspb.TruncateCollectionResponse{
|
||||||
|
Status: merr.Status(err),
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
log.Debug(
|
||||||
|
"TruncateCollection enqueued",
|
||||||
|
zap.Uint64("BeginTs", dct.BeginTs()),
|
||||||
|
zap.Uint64("EndTs", dct.EndTs()),
|
||||||
|
)
|
||||||
|
|
||||||
|
if err := dct.WaitToFinish(); err != nil {
|
||||||
|
log.Warn("TruncateCollection failed to WaitToFinish",
|
||||||
|
zap.Error(err),
|
||||||
|
zap.Uint64("BeginTs", dct.BeginTs()),
|
||||||
|
zap.Uint64("EndTs", dct.EndTs()))
|
||||||
|
|
||||||
|
return &milvuspb.TruncateCollectionResponse{
|
||||||
|
Status: merr.Status(err),
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
log.Info(
|
||||||
|
"TruncateCollection done",
|
||||||
|
zap.Uint64("BeginTs", dct.BeginTs()),
|
||||||
|
zap.Uint64("EndTs", dct.EndTs()),
|
||||||
|
)
|
||||||
|
DeregisterSubLabel(ratelimitutil.GetCollectionSubLabel(request.GetDbName(), request.GetCollectionName()))
|
||||||
|
|
||||||
|
metrics.ProxyReqLatency.WithLabelValues(
|
||||||
|
strconv.FormatInt(paramtable.GetNodeID(), 10),
|
||||||
|
method,
|
||||||
|
).Observe(float64(tr.ElapseSpan().Milliseconds()))
|
||||||
|
|
||||||
|
return &milvuspb.TruncateCollectionResponse{
|
||||||
|
Status: dct.result.GetStatus(),
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
// HasCollection check if the specific collection exists in Milvus.
|
// HasCollection check if the specific collection exists in Milvus.
|
||||||
func (node *Proxy) HasCollection(ctx context.Context, request *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error) {
|
func (node *Proxy) HasCollection(ctx context.Context, request *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error) {
|
||||||
if err := merr.CheckHealthy(node.GetStateCode()); err != nil {
|
if err := merr.CheckHealthy(node.GetStateCode()); err != nil {
|
||||||
|
|||||||
@ -2646,6 +2646,31 @@ func TestProxy(t *testing.T) {
|
|||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
wg.Add(1)
|
||||||
|
t.Run("truncate collection", func(t *testing.T) {
|
||||||
|
defer wg.Done()
|
||||||
|
_, err := globalMetaCache.GetCollectionID(ctx, dbName, collectionName)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
resp, err := proxy.TruncateCollection(ctx, &milvuspb.TruncateCollectionRequest{
|
||||||
|
DbName: dbName,
|
||||||
|
CollectionName: collectionName,
|
||||||
|
})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.Equal(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||||
|
|
||||||
|
// Verify that data is cleared but collection still exists
|
||||||
|
statsResp, err := proxy.GetCollectionStatistics(ctx, &milvuspb.GetCollectionStatisticsRequest{
|
||||||
|
Base: nil,
|
||||||
|
DbName: dbName,
|
||||||
|
CollectionName: collectionName,
|
||||||
|
})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.Equal(t, commonpb.ErrorCode_Success, statsResp.GetStatus().GetErrorCode())
|
||||||
|
rowNumStr := funcutil.KeyValuePair2Map(statsResp.Stats)["row_count"]
|
||||||
|
assert.Equal(t, "0", rowNumStr)
|
||||||
|
})
|
||||||
|
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
t.Run("drop collection", func(t *testing.T) {
|
t.Run("drop collection", func(t *testing.T) {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
@ -2892,6 +2917,14 @@ func TestProxy(t *testing.T) {
|
|||||||
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.ErrorCode)
|
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.ErrorCode)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
wg.Add(1)
|
||||||
|
t.Run("TruncateCollection fail, unhealthy", func(t *testing.T) {
|
||||||
|
defer wg.Done()
|
||||||
|
resp, err := proxy.TruncateCollection(ctx, &milvuspb.TruncateCollectionRequest{})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||||
|
})
|
||||||
|
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
t.Run("HasCollection fail, unhealthy", func(t *testing.T) {
|
t.Run("HasCollection fail, unhealthy", func(t *testing.T) {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
@ -3281,6 +3314,14 @@ func TestProxy(t *testing.T) {
|
|||||||
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.ErrorCode)
|
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.ErrorCode)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
wg.Add(1)
|
||||||
|
t.Run("TruncateCollection fail, dd queue full", func(t *testing.T) {
|
||||||
|
defer wg.Done()
|
||||||
|
resp, err := proxy.TruncateCollection(ctx, &milvuspb.TruncateCollectionRequest{})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||||
|
})
|
||||||
|
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
t.Run("HasCollection fail, dd queue full", func(t *testing.T) {
|
t.Run("HasCollection fail, dd queue full", func(t *testing.T) {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
@ -3569,6 +3610,14 @@ func TestProxy(t *testing.T) {
|
|||||||
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.ErrorCode)
|
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.ErrorCode)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
wg.Add(1)
|
||||||
|
t.Run("TruncateCollection fail, timeout", func(t *testing.T) {
|
||||||
|
defer wg.Done()
|
||||||
|
resp, err := proxy.TruncateCollection(shortCtx, &milvuspb.TruncateCollectionRequest{})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||||
|
})
|
||||||
|
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
t.Run("HasCollection fail, timeout", func(t *testing.T) {
|
t.Run("HasCollection fail, timeout", func(t *testing.T) {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
|
|||||||
@ -1671,6 +1671,12 @@ func (coord *MixCoordMock) CreateExternalCollection(ctx context.Context, req *ms
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (coord *MixCoordMock) TruncateCollection(ctx context.Context, req *milvuspb.TruncateCollectionRequest, opts ...grpc.CallOption) (*milvuspb.TruncateCollectionResponse, error) {
|
||||||
|
return &milvuspb.TruncateCollectionResponse{
|
||||||
|
Status: merr.Success(),
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
type DescribeCollectionFunc func(ctx context.Context, request *milvuspb.DescribeCollectionRequest, opts ...grpc.CallOption) (*milvuspb.DescribeCollectionResponse, error)
|
type DescribeCollectionFunc func(ctx context.Context, request *milvuspb.DescribeCollectionRequest, opts ...grpc.CallOption) (*milvuspb.DescribeCollectionResponse, error)
|
||||||
|
|
||||||
type ShowPartitionsFunc func(ctx context.Context, request *milvuspb.ShowPartitionsRequest, opts ...grpc.CallOption) (*milvuspb.ShowPartitionsResponse, error)
|
type ShowPartitionsFunc func(ctx context.Context, request *milvuspb.ShowPartitionsRequest, opts ...grpc.CallOption) (*milvuspb.ShowPartitionsResponse, error)
|
||||||
|
|||||||
@ -85,6 +85,7 @@ const (
|
|||||||
InsertTaskName = "InsertTask"
|
InsertTaskName = "InsertTask"
|
||||||
CreateCollectionTaskName = "CreateCollectionTask"
|
CreateCollectionTaskName = "CreateCollectionTask"
|
||||||
DropCollectionTaskName = "DropCollectionTask"
|
DropCollectionTaskName = "DropCollectionTask"
|
||||||
|
TruncateCollectionTaskName = "TruncateCollectionTask"
|
||||||
HasCollectionTaskName = "HasCollectionTask"
|
HasCollectionTaskName = "HasCollectionTask"
|
||||||
DescribeCollectionTaskName = "DescribeCollectionTask"
|
DescribeCollectionTaskName = "DescribeCollectionTask"
|
||||||
ShowCollectionTaskName = "ShowCollectionTask"
|
ShowCollectionTaskName = "ShowCollectionTask"
|
||||||
@ -676,6 +677,71 @@ func (t *dropCollectionTask) PostExecute(ctx context.Context) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type truncateCollectionTask struct {
|
||||||
|
baseTask
|
||||||
|
Condition
|
||||||
|
*milvuspb.TruncateCollectionRequest
|
||||||
|
ctx context.Context
|
||||||
|
mixCoord types.MixCoordClient
|
||||||
|
result *milvuspb.TruncateCollectionResponse
|
||||||
|
chMgr channelsMgr
|
||||||
|
}
|
||||||
|
|
||||||
|
func (t *truncateCollectionTask) TraceCtx() context.Context {
|
||||||
|
return t.ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
func (t *truncateCollectionTask) ID() UniqueID {
|
||||||
|
return t.Base.MsgID
|
||||||
|
}
|
||||||
|
|
||||||
|
func (t *truncateCollectionTask) SetID(uid UniqueID) {
|
||||||
|
t.Base.MsgID = uid
|
||||||
|
}
|
||||||
|
|
||||||
|
func (t *truncateCollectionTask) Name() string {
|
||||||
|
return TruncateCollectionTaskName
|
||||||
|
}
|
||||||
|
|
||||||
|
func (t *truncateCollectionTask) Type() commonpb.MsgType {
|
||||||
|
return t.Base.MsgType
|
||||||
|
}
|
||||||
|
|
||||||
|
func (t *truncateCollectionTask) BeginTs() Timestamp {
|
||||||
|
return t.Base.Timestamp
|
||||||
|
}
|
||||||
|
|
||||||
|
func (t *truncateCollectionTask) EndTs() Timestamp {
|
||||||
|
return t.Base.Timestamp
|
||||||
|
}
|
||||||
|
|
||||||
|
func (t *truncateCollectionTask) SetTs(ts Timestamp) {
|
||||||
|
t.Base.Timestamp = ts
|
||||||
|
}
|
||||||
|
|
||||||
|
func (t *truncateCollectionTask) OnEnqueue() error {
|
||||||
|
if t.Base == nil {
|
||||||
|
t.Base = commonpbutil.NewMsgBase()
|
||||||
|
}
|
||||||
|
t.Base.MsgType = commonpb.MsgType_TruncateCollection
|
||||||
|
t.Base.SourceID = paramtable.GetNodeID()
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (t *truncateCollectionTask) PreExecute(ctx context.Context) error {
|
||||||
|
return validateCollectionName(t.CollectionName)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (t *truncateCollectionTask) Execute(ctx context.Context) error {
|
||||||
|
var err error
|
||||||
|
t.result, err = t.mixCoord.TruncateCollection(ctx, t.TruncateCollectionRequest)
|
||||||
|
return merr.CheckRPCCall(t.result, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (t *truncateCollectionTask) PostExecute(ctx context.Context) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
type hasCollectionTask struct {
|
type hasCollectionTask struct {
|
||||||
baseTask
|
baseTask
|
||||||
Condition
|
Condition
|
||||||
|
|||||||
@ -3073,6 +3073,61 @@ func Test_dropCollectionTask_PostExecute(t *testing.T) {
|
|||||||
assert.NoError(t, dct.PostExecute(context.Background()))
|
assert.NoError(t, dct.PostExecute(context.Background()))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Test_truncateCollectionTask_PreExecute(t *testing.T) {
|
||||||
|
tct := &truncateCollectionTask{TruncateCollectionRequest: &milvuspb.TruncateCollectionRequest{
|
||||||
|
Base: &commonpb.MsgBase{},
|
||||||
|
CollectionName: "valid",
|
||||||
|
}}
|
||||||
|
ctx := context.Background()
|
||||||
|
err := tct.PreExecute(ctx)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
// Test invalid collection name
|
||||||
|
tct.CollectionName = "#0xc0de"
|
||||||
|
err = tct.PreExecute(ctx)
|
||||||
|
assert.Error(t, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
func Test_truncateCollectionTask_Execute(t *testing.T) {
|
||||||
|
mockRC := mocks.NewMockMixCoordClient(t)
|
||||||
|
mockRC.On("TruncateCollection",
|
||||||
|
mock.Anything, // context.Context
|
||||||
|
mock.Anything, // *milvuspb.TruncateCollectionRequest
|
||||||
|
mock.Anything,
|
||||||
|
).Return(&milvuspb.TruncateCollectionResponse{
|
||||||
|
Status: merr.Success(),
|
||||||
|
}, func(ctx context.Context, request *milvuspb.TruncateCollectionRequest, opts ...grpc.CallOption) error {
|
||||||
|
switch request.GetCollectionName() {
|
||||||
|
case "c1":
|
||||||
|
return errors.New("error mock TruncateCollection")
|
||||||
|
case "c2":
|
||||||
|
return merr.WrapErrCollectionNotFound("mock")
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
ctx := context.Background()
|
||||||
|
|
||||||
|
tct := &truncateCollectionTask{mixCoord: mockRC, TruncateCollectionRequest: &milvuspb.TruncateCollectionRequest{CollectionName: "normal"}}
|
||||||
|
err := tct.Execute(ctx)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
tct.TruncateCollectionRequest.CollectionName = "c1"
|
||||||
|
err = tct.Execute(ctx)
|
||||||
|
assert.Error(t, err)
|
||||||
|
|
||||||
|
tct.TruncateCollectionRequest.CollectionName = "c2"
|
||||||
|
err = tct.Execute(ctx)
|
||||||
|
assert.Error(t, err)
|
||||||
|
assert.Equal(t, commonpb.ErrorCode_Success, tct.result.GetStatus().GetErrorCode())
|
||||||
|
}
|
||||||
|
|
||||||
|
func Test_truncateCollectionTask_PostExecute(t *testing.T) {
|
||||||
|
tct := &truncateCollectionTask{}
|
||||||
|
assert.NoError(t, tct.PostExecute(context.Background()))
|
||||||
|
}
|
||||||
|
|
||||||
func Test_loadCollectionTask_Execute(t *testing.T) {
|
func Test_loadCollectionTask_Execute(t *testing.T) {
|
||||||
rc := NewMixCoordMock()
|
rc := NewMixCoordMock()
|
||||||
|
|
||||||
|
|||||||
@ -1211,3 +1211,33 @@ func (s *Server) ValidateAnalyzer(ctx context.Context, req *querypb.ValidateAnal
|
|||||||
}
|
}
|
||||||
return resp, nil
|
return resp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ManualUpdateCurrentTarget is used to manually update the current target for TruncateCollection
|
||||||
|
func (s *Server) ManualUpdateCurrentTarget(ctx context.Context, collectionID int64) error {
|
||||||
|
log := log.Ctx(ctx).With(
|
||||||
|
zap.Int64("collectionID", collectionID),
|
||||||
|
)
|
||||||
|
|
||||||
|
log.Info("manual update current target request received")
|
||||||
|
|
||||||
|
if err := merr.CheckHealthy(s.State()); err != nil {
|
||||||
|
log.Warn("failed to manual update current target", zap.Error(err))
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if collection is loaded
|
||||||
|
percentage := s.meta.CollectionManager.CalculateLoadPercentage(ctx, collectionID)
|
||||||
|
if percentage < 0 {
|
||||||
|
log.Info("collection not loaded, skip ManualUpdateCurrentTarget")
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
err := job.WaitCurrentTargetUpdated(ctx, s.targetObserver, collectionID)
|
||||||
|
if err != nil {
|
||||||
|
log.Warn("failed to wait current target updated", zap.Error(err))
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
log.Info("manual update current target done")
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|||||||
@ -2223,6 +2223,45 @@ func (suite *ServiceSuite) fetchHeartbeats(time time.Time) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (suite *ServiceSuite) TestManualUpdateCurrentTarget() {
|
||||||
|
ctx := context.Background()
|
||||||
|
server := suite.server
|
||||||
|
collectionID := suite.collections[0]
|
||||||
|
|
||||||
|
// Test when server is not healthy
|
||||||
|
server.UpdateStateCode(commonpb.StateCode_Initializing)
|
||||||
|
err := server.ManualUpdateCurrentTarget(ctx, collectionID)
|
||||||
|
suite.ErrorIs(err, merr.ErrServiceNotReady)
|
||||||
|
|
||||||
|
// Restore healthy state
|
||||||
|
server.UpdateStateCode(commonpb.StateCode_Healthy)
|
||||||
|
|
||||||
|
// Test collection not loaded case
|
||||||
|
err = server.ManualUpdateCurrentTarget(ctx, collectionID)
|
||||||
|
suite.NoError(err)
|
||||||
|
|
||||||
|
// Load collection for success test cases
|
||||||
|
suite.loadAll()
|
||||||
|
|
||||||
|
// Test success case
|
||||||
|
mockey.PatchConvey("TestManualUpdateCurrentTarget success", suite.T(), func() {
|
||||||
|
m := mockey.Mock(job.WaitCurrentTargetUpdated).Return(nil).Build()
|
||||||
|
defer m.UnPatch()
|
||||||
|
|
||||||
|
err := server.ManualUpdateCurrentTarget(ctx, collectionID)
|
||||||
|
suite.NoError(err)
|
||||||
|
})
|
||||||
|
|
||||||
|
// Test WaitCurrentTargetUpdated error case
|
||||||
|
mockey.PatchConvey("TestManualUpdateCurrentTarget error", suite.T(), func() {
|
||||||
|
m := mockey.Mock(job.WaitCurrentTargetUpdated).Return(errors.New("mock error")).Build()
|
||||||
|
defer m.UnPatch()
|
||||||
|
|
||||||
|
err := server.ManualUpdateCurrentTarget(ctx, collectionID)
|
||||||
|
suite.Error(err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
func (suite *ServiceSuite) TearDownTest() {
|
func (suite *ServiceSuite) TearDownTest() {
|
||||||
suite.targetObserver.Stop()
|
suite.targetObserver.Stop()
|
||||||
suite.collectionObserver.Stop()
|
suite.collectionObserver.Stop()
|
||||||
|
|||||||
@ -78,6 +78,7 @@ func (c *DDLCallback) registerCollectionCallbacks() {
|
|||||||
registry.RegisterCreateCollectionV1AckCallback(c.createCollectionV1AckCallback)
|
registry.RegisterCreateCollectionV1AckCallback(c.createCollectionV1AckCallback)
|
||||||
registry.RegisterAlterCollectionV2AckCallback(c.alterCollectionV2AckCallback)
|
registry.RegisterAlterCollectionV2AckCallback(c.alterCollectionV2AckCallback)
|
||||||
registry.RegisterDropCollectionV1AckCallback(c.dropCollectionV1AckCallback)
|
registry.RegisterDropCollectionV1AckCallback(c.dropCollectionV1AckCallback)
|
||||||
|
registry.RegisterTruncateCollectionV2AckCallback(c.truncateCollectionV2AckCallback)
|
||||||
}
|
}
|
||||||
|
|
||||||
// registerPartitionCallbacks registers the partition callbacks.
|
// registerPartitionCallbacks registers the partition callbacks.
|
||||||
|
|||||||
@ -134,6 +134,24 @@ func TestDDLCallbacksCollectionDDL(t *testing.T) {
|
|||||||
})
|
})
|
||||||
require.NoError(t, merr.CheckRPCCall(status, err))
|
require.NoError(t, merr.CheckRPCCall(status, err))
|
||||||
|
|
||||||
|
// Test TruncateCollection
|
||||||
|
// truncate a collection that collection not exist should return error.
|
||||||
|
resp, err := core.TruncateCollection(ctx, &milvuspb.TruncateCollectionRequest{
|
||||||
|
DbName: dbName,
|
||||||
|
CollectionName: "notExistCollection",
|
||||||
|
})
|
||||||
|
require.Error(t, merr.CheckRPCCall(resp.GetStatus(), err))
|
||||||
|
// truncate the collection should be ok.
|
||||||
|
resp, err = core.TruncateCollection(ctx, &milvuspb.TruncateCollectionRequest{
|
||||||
|
DbName: dbName,
|
||||||
|
CollectionName: collectionName,
|
||||||
|
})
|
||||||
|
require.NoError(t, merr.CheckRPCCall(resp.GetStatus(), err))
|
||||||
|
// verify collection still exists after truncate
|
||||||
|
coll, err = core.meta.GetCollectionByName(ctx, dbName, collectionName, typeutil.MaxTimestamp)
|
||||||
|
require.NoError(t, err)
|
||||||
|
require.Equal(t, coll.Name, collectionName)
|
||||||
|
|
||||||
// Test DropCollection
|
// Test DropCollection
|
||||||
// drop the collection should be ok.
|
// drop the collection should be ok.
|
||||||
status, err = core.DropCollection(ctx, &milvuspb.DropCollectionRequest{
|
status, err = core.DropCollection(ctx, &milvuspb.DropCollectionRequest{
|
||||||
|
|||||||
90
internal/rootcoord/ddl_callbacks_truncate_collection.go
Normal file
90
internal/rootcoord/ddl_callbacks_truncate_collection.go
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
// Licensed to the LF AI & Data foundation under one
|
||||||
|
// or more contributor license agreements. See the NOTICE file
|
||||||
|
// distributed with this work for additional information
|
||||||
|
// regarding copyright ownership. The ASF licenses this file
|
||||||
|
// to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance
|
||||||
|
// with the License. You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
//http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
package rootcoord
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
||||||
|
"github.com/milvus-io/milvus/internal/distributed/streaming"
|
||||||
|
"github.com/milvus-io/milvus/pkg/v2/proto/messagespb"
|
||||||
|
"github.com/milvus-io/milvus/pkg/v2/streaming/util/message"
|
||||||
|
"github.com/milvus-io/milvus/pkg/v2/util/funcutil"
|
||||||
|
"github.com/milvus-io/milvus/pkg/v2/util/typeutil"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (c *Core) broadcastTruncateCollection(ctx context.Context, req *milvuspb.TruncateCollectionRequest) error {
|
||||||
|
broadcaster, err := c.startBroadcastWithCollectionLock(ctx, req.GetDbName(), req.GetCollectionName())
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer broadcaster.Close()
|
||||||
|
|
||||||
|
// get collection info
|
||||||
|
coll, err := c.meta.GetCollectionByName(ctx, req.GetDbName(), req.GetCollectionName(), typeutil.MaxTimestamp)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
header := &messagespb.TruncateCollectionMessageHeader{
|
||||||
|
DbId: coll.DBID,
|
||||||
|
CollectionId: coll.CollectionID,
|
||||||
|
}
|
||||||
|
body := &messagespb.TruncateCollectionMessageBody{}
|
||||||
|
|
||||||
|
channels := make([]string, 0, len(coll.VirtualChannelNames)+1)
|
||||||
|
channels = append(channels, streaming.WAL().ControlChannel())
|
||||||
|
channels = append(channels, coll.VirtualChannelNames...)
|
||||||
|
msg := message.NewTruncateCollectionMessageBuilderV2().
|
||||||
|
WithHeader(header).
|
||||||
|
WithBody(body).
|
||||||
|
WithBroadcast(channels).
|
||||||
|
MustBuildBroadcast()
|
||||||
|
if _, err := broadcaster.Broadcast(ctx, msg); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// truncateCollectionV2AckCallback is called when the truncate collection message is acknowledged
|
||||||
|
func (c *DDLCallback) truncateCollectionV2AckCallback(ctx context.Context, result message.BroadcastResultTruncateCollectionMessageV2) error {
|
||||||
|
msg := result.Message
|
||||||
|
header := msg.Header()
|
||||||
|
|
||||||
|
flushTsList := make(map[string]uint64)
|
||||||
|
for vchannel, result := range result.Results {
|
||||||
|
if funcutil.IsControlChannel(vchannel) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
flushTs := result.TimeTick
|
||||||
|
flushTsList[vchannel] = flushTs
|
||||||
|
}
|
||||||
|
|
||||||
|
// Drop segments that were updated before the flush timestamp
|
||||||
|
err := c.mixCoord.DropSegmentsByTime(ctx, header.CollectionId, flushTsList)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// manually update current target to sync QueryCoord's view
|
||||||
|
err = c.mixCoord.ManualUpdateCurrentTarget(ctx, header.CollectionId)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@ -742,6 +742,17 @@ func withValidMixCoord() Opt {
|
|||||||
merr.Success(), nil,
|
merr.Success(), nil,
|
||||||
)
|
)
|
||||||
mixc.EXPECT().NotifyDropPartition(mock.Anything, mock.Anything, mock.Anything).Return(nil)
|
mixc.EXPECT().NotifyDropPartition(mock.Anything, mock.Anything, mock.Anything).Return(nil)
|
||||||
|
|
||||||
|
mixc.EXPECT().DropSegmentsByTime(mock.Anything, mock.Anything, mock.Anything).Return(nil)
|
||||||
|
|
||||||
|
mixc.EXPECT().ShowLoadCollections(mock.Anything, mock.Anything).Return(
|
||||||
|
&querypb.ShowCollectionsResponse{
|
||||||
|
Status: merr.Status(merr.WrapErrCollectionNotLoaded("test")),
|
||||||
|
}, nil,
|
||||||
|
)
|
||||||
|
|
||||||
|
mixc.EXPECT().ManualUpdateCurrentTarget(mock.Anything, mock.Anything).Return(nil)
|
||||||
|
|
||||||
mixc.EXPECT().UpdateLoadConfig(mock.Anything, mock.Anything).Return(merr.Success(), nil)
|
mixc.EXPECT().UpdateLoadConfig(mock.Anything, mock.Anything).Return(merr.Success(), nil)
|
||||||
return withMixCoord(mixc)
|
return withMixCoord(mixc)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -966,6 +966,37 @@ func (c *Core) DropCollection(ctx context.Context, in *milvuspb.DropCollectionRe
|
|||||||
return merr.Success(), nil
|
return merr.Success(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TruncateCollection truncate collection
|
||||||
|
func (c *Core) TruncateCollection(ctx context.Context, in *milvuspb.TruncateCollectionRequest) (*milvuspb.TruncateCollectionResponse, error) {
|
||||||
|
if err := merr.CheckHealthy(c.GetStateCode()); err != nil {
|
||||||
|
return &milvuspb.TruncateCollectionResponse{
|
||||||
|
Status: merr.Status(err),
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
metrics.RootCoordDDLReqCounter.WithLabelValues("TruncateCollection", metrics.TotalLabel).Inc()
|
||||||
|
tr := timerecord.NewTimeRecorder("TruncateCollection")
|
||||||
|
|
||||||
|
logger := log.Ctx(ctx).With(zap.String("role", typeutil.RootCoordRole),
|
||||||
|
zap.String("dbName", in.GetDbName()),
|
||||||
|
zap.String("name", in.GetCollectionName()))
|
||||||
|
logger.Info("received request to truncate collection")
|
||||||
|
|
||||||
|
if err := c.broadcastTruncateCollection(ctx, in); err != nil {
|
||||||
|
logger.Info("failed to truncate collection", zap.Error(err))
|
||||||
|
metrics.RootCoordDDLReqCounter.WithLabelValues("TruncateCollection", metrics.FailLabel).Inc()
|
||||||
|
return &milvuspb.TruncateCollectionResponse{
|
||||||
|
Status: merr.Status(err),
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
metrics.RootCoordDDLReqCounter.WithLabelValues("TruncateCollection", metrics.SuccessLabel).Inc()
|
||||||
|
metrics.RootCoordDDLReqLatency.WithLabelValues("TruncateCollection").Observe(float64(tr.ElapseSpan().Milliseconds()))
|
||||||
|
logger.Info("done to truncate collection")
|
||||||
|
return &milvuspb.TruncateCollectionResponse{
|
||||||
|
Status: merr.Success(),
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
// HasCollection check collection existence
|
// HasCollection check collection existence
|
||||||
func (c *Core) HasCollection(ctx context.Context, in *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error) {
|
func (c *Core) HasCollection(ctx context.Context, in *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error) {
|
||||||
if err := merr.CheckHealthy(c.GetStateCode()); err != nil {
|
if err := merr.CheckHealthy(c.GetStateCode()); err != nil {
|
||||||
|
|||||||
@ -252,6 +252,16 @@ func TestRootCoord_DropCollection(t *testing.T) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestRootCoord_TruncateCollection(t *testing.T) {
|
||||||
|
t.Run("not healthy", func(t *testing.T) {
|
||||||
|
c := newTestCore(withAbnormalCode())
|
||||||
|
ctx := context.Background()
|
||||||
|
resp, err := c.TruncateCollection(ctx, &milvuspb.TruncateCollectionRequest{})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.NotEqual(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode())
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
func TestRootCoord_CreatePartition(t *testing.T) {
|
func TestRootCoord_CreatePartition(t *testing.T) {
|
||||||
t.Run("not healthy", func(t *testing.T) {
|
t.Run("not healthy", func(t *testing.T) {
|
||||||
c := newTestCore(withAbnormalCode())
|
c := newTestCore(withAbnormalCode())
|
||||||
|
|||||||
@ -29,11 +29,12 @@ var (
|
|||||||
RegisterFlushAllV2AckCallback = registerMessageAckCallback[*message.FlushAllMessageHeader, *message.FlushAllMessageBody]
|
RegisterFlushAllV2AckCallback = registerMessageAckCallback[*message.FlushAllMessageHeader, *message.FlushAllMessageBody]
|
||||||
|
|
||||||
// Collection
|
// Collection
|
||||||
RegisterAlterCollectionV2AckCallback = registerMessageAckCallback[*message.AlterCollectionMessageHeader, *message.AlterCollectionMessageBody]
|
RegisterAlterCollectionV2AckCallback = registerMessageAckCallback[*message.AlterCollectionMessageHeader, *message.AlterCollectionMessageBody]
|
||||||
RegisterCreateCollectionV1AckCallback = registerMessageAckCallback[*message.CreateCollectionMessageHeader, *message.CreateCollectionRequest]
|
RegisterCreateCollectionV1AckCallback = registerMessageAckCallback[*message.CreateCollectionMessageHeader, *message.CreateCollectionRequest]
|
||||||
RegisterDropCollectionV1AckCallback = registerMessageAckCallback[*message.DropCollectionMessageHeader, *message.DropCollectionRequest]
|
RegisterDropCollectionV1AckCallback = registerMessageAckCallback[*message.DropCollectionMessageHeader, *message.DropCollectionRequest]
|
||||||
RegisterAlterLoadConfigV2AckCallback = registerMessageAckCallback[*message.AlterLoadConfigMessageHeader, *message.AlterLoadConfigMessageBody]
|
RegisterTruncateCollectionV2AckCallback = registerMessageAckCallback[*message.TruncateCollectionMessageHeader, *message.TruncateCollectionMessageBody]
|
||||||
RegisterDropLoadConfigV2AckCallback = registerMessageAckCallback[*message.DropLoadConfigMessageHeader, *message.DropLoadConfigMessageBody]
|
RegisterAlterLoadConfigV2AckCallback = registerMessageAckCallback[*message.AlterLoadConfigMessageHeader, *message.AlterLoadConfigMessageBody]
|
||||||
|
RegisterDropLoadConfigV2AckCallback = registerMessageAckCallback[*message.DropLoadConfigMessageHeader, *message.DropLoadConfigMessageBody]
|
||||||
|
|
||||||
// Partition
|
// Partition
|
||||||
RegisterCreatePartitionV1AckCallback = registerMessageAckCallback[*message.CreatePartitionMessageHeader, *message.CreatePartitionRequest]
|
RegisterCreatePartitionV1AckCallback = registerMessageAckCallback[*message.CreatePartitionMessageHeader, *message.CreatePartitionRequest]
|
||||||
@ -81,11 +82,12 @@ func resetMessageAckCallbacks() {
|
|||||||
message.MessageTypeFlushAllV2: syncutil.NewFuture[messageInnerAckCallback](),
|
message.MessageTypeFlushAllV2: syncutil.NewFuture[messageInnerAckCallback](),
|
||||||
|
|
||||||
// Collection
|
// Collection
|
||||||
message.MessageTypeAlterCollectionV2: syncutil.NewFuture[messageInnerAckCallback](),
|
message.MessageTypeAlterCollectionV2: syncutil.NewFuture[messageInnerAckCallback](),
|
||||||
message.MessageTypeCreateCollectionV1: syncutil.NewFuture[messageInnerAckCallback](),
|
message.MessageTypeCreateCollectionV1: syncutil.NewFuture[messageInnerAckCallback](),
|
||||||
message.MessageTypeDropCollectionV1: syncutil.NewFuture[messageInnerAckCallback](),
|
message.MessageTypeDropCollectionV1: syncutil.NewFuture[messageInnerAckCallback](),
|
||||||
message.MessageTypeAlterLoadConfigV2: syncutil.NewFuture[messageInnerAckCallback](),
|
message.MessageTypeTruncateCollectionV2: syncutil.NewFuture[messageInnerAckCallback](),
|
||||||
message.MessageTypeDropLoadConfigV2: syncutil.NewFuture[messageInnerAckCallback](),
|
message.MessageTypeAlterLoadConfigV2: syncutil.NewFuture[messageInnerAckCallback](),
|
||||||
|
message.MessageTypeDropLoadConfigV2: syncutil.NewFuture[messageInnerAckCallback](),
|
||||||
|
|
||||||
// Partition
|
// Partition
|
||||||
message.MessageTypeCreatePartitionV1: syncutil.NewFuture[messageInnerAckCallback](),
|
message.MessageTypeCreatePartitionV1: syncutil.NewFuture[messageInnerAckCallback](),
|
||||||
|
|||||||
@ -126,3 +126,14 @@ func (impl *msgHandlerImpl) HandleSchemaChange(ctx context.Context, msg message.
|
|||||||
func (impl *msgHandlerImpl) HandleAlterCollection(ctx context.Context, putCollectionMsg message.ImmutableAlterCollectionMessageV2) error {
|
func (impl *msgHandlerImpl) HandleAlterCollection(ctx context.Context, putCollectionMsg message.ImmutableAlterCollectionMessageV2) error {
|
||||||
return impl.wbMgr.SealSegments(context.Background(), putCollectionMsg.VChannel(), putCollectionMsg.Header().FlushedSegmentIds)
|
return impl.wbMgr.SealSegments(context.Background(), putCollectionMsg.VChannel(), putCollectionMsg.Header().FlushedSegmentIds)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (impl *msgHandlerImpl) HandleTruncateCollection(flushMsg message.ImmutableTruncateCollectionMessageV2) error {
|
||||||
|
vchannel := flushMsg.VChannel()
|
||||||
|
if err := impl.wbMgr.SealSegments(context.Background(), vchannel, flushMsg.Header().SegmentIds); err != nil {
|
||||||
|
return errors.Wrap(err, "failed to seal segments")
|
||||||
|
}
|
||||||
|
if err := impl.wbMgr.FlushChannel(context.Background(), vchannel, flushMsg.TimeTick()); err != nil {
|
||||||
|
return errors.Wrap(err, "failed to flush channel")
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|||||||
@ -172,3 +172,45 @@ func TestFlushMsgHandler_HandlSchemaChange(t *testing.T) {
|
|||||||
err = handler.HandleSchemaChange(context.Background(), im)
|
err = handler.HandleSchemaChange(context.Background(), im)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestFlushMsgHandler_HandleTruncateCollection(t *testing.T) {
|
||||||
|
vchannel := "ch-0"
|
||||||
|
|
||||||
|
// test failed - SealSegments error
|
||||||
|
wbMgr := writebuffer.NewMockBufferManager(t)
|
||||||
|
wbMgr.EXPECT().SealSegments(mock.Anything, mock.Anything, mock.Anything).Return(errors.New("mock err"))
|
||||||
|
|
||||||
|
msg := message.NewTruncateCollectionMessageBuilderV2().
|
||||||
|
WithBroadcast([]string{vchannel}).
|
||||||
|
WithHeader(&message.TruncateCollectionMessageHeader{
|
||||||
|
CollectionId: 0,
|
||||||
|
SegmentIds: []int64{1, 2},
|
||||||
|
}).
|
||||||
|
WithBody(&message.TruncateCollectionMessageBody{}).
|
||||||
|
MustBuildBroadcast().
|
||||||
|
WithBroadcastID(1).
|
||||||
|
SplitIntoMutableMessage()[0]
|
||||||
|
msg.WithTimeTick(1000)
|
||||||
|
|
||||||
|
handler := newMsgHandler(wbMgr)
|
||||||
|
msgID := mock_message.NewMockMessageID(t)
|
||||||
|
im, err := message.AsImmutableTruncateCollectionMessageV2(msg.IntoImmutableMessage(msgID))
|
||||||
|
assert.NoError(t, err)
|
||||||
|
err = handler.HandleTruncateCollection(im)
|
||||||
|
assert.Error(t, err)
|
||||||
|
|
||||||
|
// test failed - SealSegments success but FlushChannel error
|
||||||
|
wbMgr.EXPECT().SealSegments(mock.Anything, mock.Anything, mock.Anything).Unset()
|
||||||
|
wbMgr.EXPECT().SealSegments(mock.Anything, mock.Anything, mock.Anything).Return(nil)
|
||||||
|
wbMgr.EXPECT().FlushChannel(mock.Anything, mock.Anything, mock.Anything).Return(errors.New("mock err"))
|
||||||
|
|
||||||
|
err = handler.HandleTruncateCollection(im)
|
||||||
|
assert.Error(t, err)
|
||||||
|
|
||||||
|
// test normal
|
||||||
|
wbMgr.EXPECT().FlushChannel(mock.Anything, mock.Anything, mock.Anything).Unset()
|
||||||
|
wbMgr.EXPECT().FlushChannel(mock.Anything, mock.Anything, mock.Anything).Return(nil)
|
||||||
|
|
||||||
|
err = handler.HandleTruncateCollection(im)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
}
|
||||||
|
|||||||
@ -32,18 +32,19 @@ type shardInterceptor struct {
|
|||||||
// initOpTable initializes the operation table for the segment interceptor.
|
// initOpTable initializes the operation table for the segment interceptor.
|
||||||
func (impl *shardInterceptor) initOpTable() {
|
func (impl *shardInterceptor) initOpTable() {
|
||||||
impl.ops = map[message.MessageType]interceptors.AppendInterceptorCall{
|
impl.ops = map[message.MessageType]interceptors.AppendInterceptorCall{
|
||||||
message.MessageTypeCreateCollection: impl.handleCreateCollection,
|
message.MessageTypeCreateCollection: impl.handleCreateCollection,
|
||||||
message.MessageTypeDropCollection: impl.handleDropCollection,
|
message.MessageTypeDropCollection: impl.handleDropCollection,
|
||||||
message.MessageTypeCreatePartition: impl.handleCreatePartition,
|
message.MessageTypeCreatePartition: impl.handleCreatePartition,
|
||||||
message.MessageTypeDropPartition: impl.handleDropPartition,
|
message.MessageTypeDropPartition: impl.handleDropPartition,
|
||||||
message.MessageTypeInsert: impl.handleInsertMessage,
|
message.MessageTypeInsert: impl.handleInsertMessage,
|
||||||
message.MessageTypeDelete: impl.handleDeleteMessage,
|
message.MessageTypeDelete: impl.handleDeleteMessage,
|
||||||
message.MessageTypeManualFlush: impl.handleManualFlushMessage,
|
message.MessageTypeManualFlush: impl.handleManualFlushMessage,
|
||||||
message.MessageTypeSchemaChange: impl.handleSchemaChange,
|
message.MessageTypeSchemaChange: impl.handleSchemaChange,
|
||||||
message.MessageTypeAlterCollection: impl.handleAlterCollection,
|
message.MessageTypeAlterCollection: impl.handleAlterCollection,
|
||||||
message.MessageTypeCreateSegment: impl.handleCreateSegment,
|
message.MessageTypeCreateSegment: impl.handleCreateSegment,
|
||||||
message.MessageTypeFlush: impl.handleFlushSegment,
|
message.MessageTypeFlush: impl.handleFlushSegment,
|
||||||
message.MessageTypeFlushAll: impl.handleFlushAllMessage,
|
message.MessageTypeFlushAll: impl.handleFlushAllMessage,
|
||||||
|
message.MessageTypeTruncateCollection: impl.handleTruncateCollectionMessage,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -307,5 +308,20 @@ func (impl *shardInterceptor) handleFlushAllMessage(ctx context.Context, msg mes
|
|||||||
return appendOp(ctx, msg)
|
return appendOp(ctx, msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// handleTruncateCollectionMessage handles the truncate collection message.
|
||||||
|
func (impl *shardInterceptor) handleTruncateCollectionMessage(ctx context.Context, msg message.MutableMessage, appendOp interceptors.Append) (message.MessageID, error) {
|
||||||
|
truncateCollectionMsg := message.MustAsMutableTruncateCollectionMessageV2(msg)
|
||||||
|
header := truncateCollectionMsg.Header()
|
||||||
|
segmentIDs, err := impl.shardManager.FlushAndFenceSegmentAllocUntil(header.GetCollectionId(), msg.TimeTick())
|
||||||
|
if err != nil {
|
||||||
|
return nil, status.NewUnrecoverableError(err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
|
header.SegmentIds = segmentIDs
|
||||||
|
truncateCollectionMsg.OverwriteHeader(header)
|
||||||
|
|
||||||
|
return appendOp(ctx, msg)
|
||||||
|
}
|
||||||
|
|
||||||
// Close closes the segment interceptor.
|
// Close closes the segment interceptor.
|
||||||
func (impl *shardInterceptor) Close() {}
|
func (impl *shardInterceptor) Close() {}
|
||||||
|
|||||||
@ -252,4 +252,23 @@ func TestShardInterceptor(t *testing.T) {
|
|||||||
msgID, err = i.DoAppend(ctx, msg, appender)
|
msgID, err = i.DoAppend(ctx, msg, appender)
|
||||||
assert.Error(t, err)
|
assert.Error(t, err)
|
||||||
assert.Nil(t, msgID)
|
assert.Nil(t, msgID)
|
||||||
|
|
||||||
|
msg = message.NewTruncateCollectionMessageBuilderV2().
|
||||||
|
WithVChannel(vchannel).
|
||||||
|
WithHeader(&messagespb.TruncateCollectionMessageHeader{
|
||||||
|
CollectionId: 1,
|
||||||
|
}).
|
||||||
|
WithBody(&messagespb.TruncateCollectionMessageBody{}).
|
||||||
|
MustBuildMutable().WithTimeTick(1)
|
||||||
|
shardManager.EXPECT().FlushAndFenceSegmentAllocUntil(mock.Anything, mock.Anything).Unset()
|
||||||
|
shardManager.EXPECT().FlushAndFenceSegmentAllocUntil(mock.Anything, mock.Anything).Return(nil, nil)
|
||||||
|
msgID, err = i.DoAppend(ctx, msg, appender)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.NotNil(t, msgID)
|
||||||
|
|
||||||
|
shardManager.EXPECT().FlushAndFenceSegmentAllocUntil(mock.Anything, mock.Anything).Unset()
|
||||||
|
shardManager.EXPECT().FlushAndFenceSegmentAllocUntil(mock.Anything, mock.Anything).Return(nil, mockErr)
|
||||||
|
msgID, err = i.DoAppend(ctx, msg, appender)
|
||||||
|
assert.Error(t, err)
|
||||||
|
assert.Nil(t, msgID)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -162,7 +162,7 @@ func (m *shardManagerImpl) WaitUntilGrowingSegmentReady(uniquePartitionKey Parti
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FlushAndFenceSegmentAllocUntil flush all segment that contains the message which timetick is less than the incoming timetick.
|
// FlushAndFenceSegmentAllocUntil flush all segment that contains the message which timetick is less than the incoming timetick.
|
||||||
// It will be used for message like ManualFlush, SchemaChange operations that want the exists segment to be flushed.
|
// It will be used for message like ManualFlush, SchemaChange, TruncateCollection operations that want the exists segment to be flushed.
|
||||||
// !!! The returned segmentIDs may be is on-flushing state(which is on-flushing, a segmentFlushWorker is running, but not send into wal yet)
|
// !!! The returned segmentIDs may be is on-flushing state(which is on-flushing, a segmentFlushWorker is running, but not send into wal yet)
|
||||||
// !!! The caller should promise the returned segmentIDs to be flushed.
|
// !!! The caller should promise the returned segmentIDs to be flushed.
|
||||||
func (m *shardManagerImpl) FlushAndFenceSegmentAllocUntil(collectionID int64, timetick uint64) ([]int64, error) {
|
func (m *shardManagerImpl) FlushAndFenceSegmentAllocUntil(collectionID int64, timetick uint64) ([]int64, error) {
|
||||||
|
|||||||
@ -338,6 +338,9 @@ func (r *recoveryStorageImpl) handleMessage(msg message.ImmutableMessage) {
|
|||||||
case message.MessageTypeAlterCollection:
|
case message.MessageTypeAlterCollection:
|
||||||
immutableMsg := message.MustAsImmutableAlterCollectionMessageV2(msg)
|
immutableMsg := message.MustAsImmutableAlterCollectionMessageV2(msg)
|
||||||
r.handleAlterCollection(immutableMsg)
|
r.handleAlterCollection(immutableMsg)
|
||||||
|
case message.MessageTypeTruncateCollection:
|
||||||
|
immutableMsg := message.MustAsImmutableTruncateCollectionMessageV2(msg)
|
||||||
|
r.handleTruncateCollection(immutableMsg)
|
||||||
case message.MessageTypeTimeTick:
|
case message.MessageTypeTimeTick:
|
||||||
// nothing, the time tick message make no recovery operation.
|
// nothing, the time tick message make no recovery operation.
|
||||||
}
|
}
|
||||||
@ -521,6 +524,16 @@ func (r *recoveryStorageImpl) handleAlterCollection(msg message.ImmutableAlterCo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// handleTruncateCollection handles the truncate collection message.
|
||||||
|
func (r *recoveryStorageImpl) handleTruncateCollection(msg message.ImmutableTruncateCollectionMessageV2) {
|
||||||
|
// when truncate collection happens, we need to flush all segments in the collection.
|
||||||
|
segments := make(map[int64]struct{}, len(msg.Header().SegmentIds))
|
||||||
|
for _, segmentID := range msg.Header().SegmentIds {
|
||||||
|
segments[segmentID] = struct{}{}
|
||||||
|
}
|
||||||
|
r.flushSegments(msg, segments)
|
||||||
|
}
|
||||||
|
|
||||||
// detectInconsistency detects the inconsistency in the recovery storage.
|
// detectInconsistency detects the inconsistency in the recovery storage.
|
||||||
func (r *recoveryStorageImpl) detectInconsistency(msg message.ImmutableMessage, reason string, extra ...zap.Field) {
|
func (r *recoveryStorageImpl) detectInconsistency(msg message.ImmutableMessage, reason string, extra ...zap.Field) {
|
||||||
fields := make([]zap.Field, 0, len(extra)+2)
|
fields := make([]zap.Field, 0, len(extra)+2)
|
||||||
|
|||||||
@ -276,6 +276,7 @@ func (b *streamBuilder) generateStreamMessage() []message.ImmutableMessage {
|
|||||||
{op: b.createTxn, rate: 5},
|
{op: b.createTxn, rate: 5},
|
||||||
{op: b.createManualFlush, rate: 2},
|
{op: b.createManualFlush, rate: 2},
|
||||||
{op: b.createSchemaChange, rate: 1},
|
{op: b.createSchemaChange, rate: 1},
|
||||||
|
{op: b.createTruncateCollection, rate: 1},
|
||||||
}
|
}
|
||||||
ops := make([]func() message.ImmutableMessage, 0)
|
ops := make([]func() message.ImmutableMessage, 0)
|
||||||
for _, opRate := range opRates {
|
for _, opRate := range opRates {
|
||||||
@ -631,6 +632,37 @@ func (b *streamBuilder) createInsert() message.ImmutableMessage {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (b *streamBuilder) createTruncateCollection() message.ImmutableMessage {
|
||||||
|
for collectionID, collection := range b.collectionIDs {
|
||||||
|
if rand.Int31n(3) < 1 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
segmentIDs := make([]int64, 0)
|
||||||
|
for partitionID := range collection {
|
||||||
|
for segmentID := range collection[partitionID] {
|
||||||
|
segmentIDs = append(segmentIDs, segmentID)
|
||||||
|
delete(collection[partitionID], segmentID)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if len(segmentIDs) == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
b.nextMessage()
|
||||||
|
return message.NewTruncateCollectionMessageBuilderV2().
|
||||||
|
WithVChannel(b.vchannels[collectionID]).
|
||||||
|
WithHeader(&messagespb.TruncateCollectionMessageHeader{
|
||||||
|
CollectionId: collectionID,
|
||||||
|
SegmentIds: segmentIDs,
|
||||||
|
}).
|
||||||
|
WithBody(&messagespb.TruncateCollectionMessageBody{}).
|
||||||
|
MustBuildMutable().
|
||||||
|
WithTimeTick(b.timetick).
|
||||||
|
WithLastConfirmed(rmq.NewRmqID(b.lastConfirmedMessageID)).
|
||||||
|
IntoImmutableMessage(rmq.NewRmqID(b.messageID))
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (b *streamBuilder) nextMessage() {
|
func (b *streamBuilder) nextMessage() {
|
||||||
b.messageID++
|
b.messageID++
|
||||||
if rand.Int31n(3) < 2 {
|
if rand.Int31n(3) < 2 {
|
||||||
|
|||||||
@ -296,6 +296,10 @@ type MixCoord interface {
|
|||||||
NotifyDropPartition(ctx context.Context, channel string, partitionIDs []int64) error
|
NotifyDropPartition(ctx context.Context, channel string, partitionIDs []int64) error
|
||||||
|
|
||||||
SyncQcFileResource(ctx context.Context, resources []*internalpb.FileResourceInfo, version uint64) error
|
SyncQcFileResource(ctx context.Context, resources []*internalpb.FileResourceInfo, version uint64) error
|
||||||
|
|
||||||
|
DropSegmentsByTime(ctx context.Context, collectionID int64, flushTsList map[string]uint64) error
|
||||||
|
|
||||||
|
ManualUpdateCurrentTarget(ctx context.Context, collectionID int64) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// MixCoordComponent is used by grpc server of MixCoord
|
// MixCoordComponent is used by grpc server of MixCoord
|
||||||
|
|||||||
@ -321,3 +321,7 @@ func (m *GrpcRootCoordClient) Close() error {
|
|||||||
func (m *GrpcRootCoordClient) GetQuotaMetrics(ctx context.Context, in *internalpb.GetQuotaMetricsRequest, opts ...grpc.CallOption) (*internalpb.GetQuotaMetricsResponse, error) {
|
func (m *GrpcRootCoordClient) GetQuotaMetrics(ctx context.Context, in *internalpb.GetQuotaMetricsRequest, opts ...grpc.CallOption) (*internalpb.GetQuotaMetricsResponse, error) {
|
||||||
return &internalpb.GetQuotaMetricsResponse{}, m.Err
|
return &internalpb.GetQuotaMetricsResponse{}, m.Err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *GrpcRootCoordClient) TruncateCollection(ctx context.Context, in *milvuspb.TruncateCollectionRequest, opts ...grpc.CallOption) (*milvuspb.TruncateCollectionResponse, error) {
|
||||||
|
return &milvuspb.TruncateCollectionResponse{}, m.Err
|
||||||
|
}
|
||||||
|
|||||||
@ -1,37 +1,27 @@
|
|||||||
package common
|
package common
|
||||||
|
|
||||||
import "reflect"
|
// MapEqual compares two maps for equality
|
||||||
|
func MapEqual[K comparable, V comparable](m1, m2 map[K]V) bool {
|
||||||
type Str2Str map[string]string
|
|
||||||
|
|
||||||
func (m Str2Str) Clone() Str2Str {
|
|
||||||
if m == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
clone := make(Str2Str)
|
|
||||||
for key, value := range m {
|
|
||||||
clone[key] = value
|
|
||||||
}
|
|
||||||
return clone
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m Str2Str) Equal(other Str2Str) bool {
|
|
||||||
return reflect.DeepEqual(m, other)
|
|
||||||
}
|
|
||||||
|
|
||||||
func CloneStr2Str(m Str2Str) Str2Str {
|
|
||||||
return m.Clone()
|
|
||||||
}
|
|
||||||
|
|
||||||
func MapEquals(m1, m2 map[int64]int64) bool {
|
|
||||||
if len(m1) != len(m2) {
|
if len(m1) != len(m2) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
for k1, v1 := range m1 {
|
for k, v1 := range m1 {
|
||||||
v2, exist := m2[k1]
|
v2, exist := m2[k]
|
||||||
if !exist || v1 != v2 {
|
if !exist || v1 != v2 {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CloneMap clones a map with comparable keys
|
||||||
|
func CloneMap[K comparable, V any](m map[K]V) map[K]V {
|
||||||
|
if m == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
clone := make(map[K]V, len(m))
|
||||||
|
for key, value := range m {
|
||||||
|
clone[key] = value
|
||||||
|
}
|
||||||
|
return clone
|
||||||
|
}
|
||||||
|
|||||||
@ -6,54 +6,77 @@ import (
|
|||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCloneStr2Str(t *testing.T) {
|
|
||||||
type args struct {
|
|
||||||
m Str2Str
|
|
||||||
}
|
|
||||||
tests := []struct {
|
|
||||||
name string
|
|
||||||
args args
|
|
||||||
}{
|
|
||||||
{
|
|
||||||
args: args{
|
|
||||||
m: nil,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
args: args{
|
|
||||||
m: map[string]string{
|
|
||||||
"k1": "v1",
|
|
||||||
"k2": "v2",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
for _, tt := range tests {
|
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
|
||||||
got := CloneStr2Str(tt.args.m)
|
|
||||||
assert.True(t, got.Equal(tt.args.m))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestMapEqual(t *testing.T) {
|
func TestMapEqual(t *testing.T) {
|
||||||
{
|
t.Run("int64 to int64", func(t *testing.T) {
|
||||||
m1 := map[int64]int64{1: 11, 2: 22, 3: 33}
|
m1 := map[int64]int64{1: 11, 2: 22, 3: 33}
|
||||||
m2 := map[int64]int64{1: 11, 2: 22, 3: 33}
|
m2 := map[int64]int64{1: 11, 2: 22, 3: 33}
|
||||||
assert.True(t, MapEquals(m1, m2))
|
assert.True(t, MapEqual(m1, m2))
|
||||||
}
|
|
||||||
{
|
m3 := map[int64]int64{1: 11, 2: 23, 3: 33}
|
||||||
m1 := map[int64]int64{1: 11, 2: 23, 3: 33}
|
assert.False(t, MapEqual(m1, m3))
|
||||||
m2 := map[int64]int64{1: 11, 2: 22, 3: 33}
|
|
||||||
assert.False(t, MapEquals(m1, m2))
|
m4 := map[int64]int64{1: 11, 2: 22}
|
||||||
}
|
assert.False(t, MapEqual(m1, m4))
|
||||||
{
|
|
||||||
m1 := map[int64]int64{1: 11, 2: 23, 3: 33}
|
assert.False(t, MapEqual(m1, nil))
|
||||||
m2 := map[int64]int64{1: 11, 2: 22}
|
assert.True(t, MapEqual(map[int64]int64(nil), map[int64]int64(nil)))
|
||||||
assert.False(t, MapEquals(m1, m2))
|
})
|
||||||
}
|
|
||||||
{
|
t.Run("string to string", func(t *testing.T) {
|
||||||
m1 := map[int64]int64{1: 11, 2: 23, 3: 33}
|
m1 := map[string]string{"a": "1", "b": "2"}
|
||||||
assert.False(t, MapEquals(m1, nil))
|
m2 := map[string]string{"a": "1", "b": "2"}
|
||||||
}
|
assert.True(t, MapEqual(m1, m2))
|
||||||
|
|
||||||
|
m3 := map[string]string{"a": "1", "b": "3"}
|
||||||
|
assert.False(t, MapEqual(m1, m3))
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("string to int", func(t *testing.T) {
|
||||||
|
m1 := map[string]int{"a": 1, "b": 2}
|
||||||
|
m2 := map[string]int{"a": 1, "b": 2}
|
||||||
|
assert.True(t, MapEqual(m1, m2))
|
||||||
|
|
||||||
|
m3 := map[string]int{"a": 1, "b": 3}
|
||||||
|
assert.False(t, MapEqual(m1, m3))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestCloneMap(t *testing.T) {
|
||||||
|
t.Run("nil map", func(t *testing.T) {
|
||||||
|
var m map[string]string = nil
|
||||||
|
cloned := CloneMap(m)
|
||||||
|
assert.Nil(t, cloned)
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("empty map", func(t *testing.T) {
|
||||||
|
m := map[string]string{}
|
||||||
|
cloned := CloneMap(m)
|
||||||
|
assert.NotNil(t, cloned)
|
||||||
|
assert.Equal(t, 0, len(cloned))
|
||||||
|
assert.True(t, MapEqual(m, cloned))
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("string to string", func(t *testing.T) {
|
||||||
|
m := map[string]string{"k1": "v1", "k2": "v2"}
|
||||||
|
cloned := CloneMap(m)
|
||||||
|
assert.True(t, MapEqual(m, cloned))
|
||||||
|
// Ensure it's a deep copy
|
||||||
|
cloned["k3"] = "v3"
|
||||||
|
assert.NotEqual(t, len(m), len(cloned))
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("int64 to int64", func(t *testing.T) {
|
||||||
|
m := map[int64]int64{1: 11, 2: 22, 3: 33}
|
||||||
|
cloned := CloneMap(m)
|
||||||
|
assert.True(t, MapEqual(m, cloned))
|
||||||
|
// Ensure it's a deep copy
|
||||||
|
cloned[4] = 44
|
||||||
|
assert.NotEqual(t, len(m), len(cloned))
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("string to uint64", func(t *testing.T) {
|
||||||
|
m := map[string]uint64{"ch1": 100, "ch2": 200}
|
||||||
|
cloned := CloneMap(m)
|
||||||
|
assert.True(t, MapEqual(m, cloned))
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,7 @@ require (
|
|||||||
github.com/jolestar/go-commons-pool/v2 v2.1.2
|
github.com/jolestar/go-commons-pool/v2 v2.1.2
|
||||||
github.com/json-iterator/go v1.1.13-0.20220915233716-71ac16282d12
|
github.com/json-iterator/go v1.1.13-0.20220915233716-71ac16282d12
|
||||||
github.com/klauspost/compress v1.18.0
|
github.com/klauspost/compress v1.18.0
|
||||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251210030907-6087c9c0bad6
|
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251210064308-0f971c5ee7dc
|
||||||
github.com/minio/minio-go/v7 v7.0.73
|
github.com/minio/minio-go/v7 v7.0.73
|
||||||
github.com/panjf2000/ants/v2 v2.11.3
|
github.com/panjf2000/ants/v2 v2.11.3
|
||||||
github.com/prometheus/client_golang v1.20.5
|
github.com/prometheus/client_golang v1.20.5
|
||||||
|
|||||||
@ -621,8 +621,8 @@ github.com/milvus-io/cgosymbolizer v0.0.0-20250318084424-114f4050c3a6 h1:YHMFI6L
|
|||||||
github.com/milvus-io/cgosymbolizer v0.0.0-20250318084424-114f4050c3a6/go.mod h1:DvXTE/K/RtHehxU8/GtDs4vFtfw64jJ3PaCnFri8CRg=
|
github.com/milvus-io/cgosymbolizer v0.0.0-20250318084424-114f4050c3a6/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 h1:TfeY0NxYxZzUfIfYe5qYDBzt4ZYRqzUjTR6CvUzjat8=
|
||||||
github.com/milvus-io/gorocksdb v0.0.0-20220624081344-8c5f4212846b/go.mod h1:iwW+9cWfIzzDseEBCCeDSN5SD16Tidvy8cwQ7ZY8Qj4=
|
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.6.6-0.20251210030907-6087c9c0bad6 h1:TeHfsRCdjbX30xS7Npcb+POQXd460+AjmXYmmTuxyBA=
|
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251210064308-0f971c5ee7dc h1:ZbtRmUjs+YIcULnIVPwdmOrLa9rpH58gnsCHyaLhqtw=
|
||||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251210030907-6087c9c0bad6/go.mod h1:/6UT4zZl6awVeXLeE7UGDWZvXj3IWkRsh3mqsn0DiAs=
|
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251210064308-0f971c5ee7dc/go.mod h1:/6UT4zZl6awVeXLeE7UGDWZvXj3IWkRsh3mqsn0DiAs=
|
||||||
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
|
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
|
||||||
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
|
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
|
||||||
github.com/minio/minio-go/v7 v7.0.73 h1:qr2vi96Qm7kZ4v7LLebjte+MQh621fFWnv93p12htEo=
|
github.com/minio/minio-go/v7 v7.0.73 h1:qr2vi96Qm7kZ4v7LLebjte+MQh621fFWnv93p12htEo=
|
||||||
|
|||||||
@ -1145,4 +1145,4 @@ message FileResourceInfo {
|
|||||||
|
|
||||||
message CreateExternalCollectionResponse {
|
message CreateExternalCollectionResponse {
|
||||||
common.Status status = 1;
|
common.Status status = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -70,6 +70,7 @@ message CollectionInfo {
|
|||||||
repeated common.KeyValuePair properties = 14;
|
repeated common.KeyValuePair properties = 14;
|
||||||
int64 db_id = 15;
|
int64 db_id = 15;
|
||||||
uint64 UpdateTimestamp = 16;
|
uint64 UpdateTimestamp = 16;
|
||||||
|
map<string, uint64> LastTruncateTimestamps = 17;
|
||||||
}
|
}
|
||||||
|
|
||||||
message PartitionInfo {
|
message PartitionInfo {
|
||||||
|
|||||||
@ -396,6 +396,7 @@ type CollectionInfo struct {
|
|||||||
Properties []*commonpb.KeyValuePair `protobuf:"bytes,14,rep,name=properties,proto3" json:"properties,omitempty"`
|
Properties []*commonpb.KeyValuePair `protobuf:"bytes,14,rep,name=properties,proto3" json:"properties,omitempty"`
|
||||||
DbId int64 `protobuf:"varint,15,opt,name=db_id,json=dbId,proto3" json:"db_id,omitempty"`
|
DbId int64 `protobuf:"varint,15,opt,name=db_id,json=dbId,proto3" json:"db_id,omitempty"`
|
||||||
UpdateTimestamp uint64 `protobuf:"varint,16,opt,name=UpdateTimestamp,proto3" json:"UpdateTimestamp,omitempty"`
|
UpdateTimestamp uint64 `protobuf:"varint,16,opt,name=UpdateTimestamp,proto3" json:"UpdateTimestamp,omitempty"`
|
||||||
|
LastTruncateTimestamps map[string]uint64 `protobuf:"bytes,17,rep,name=LastTruncateTimestamps,proto3" json:"LastTruncateTimestamps,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CollectionInfo) Reset() {
|
func (x *CollectionInfo) Reset() {
|
||||||
@ -542,6 +543,13 @@ func (x *CollectionInfo) GetUpdateTimestamp() uint64 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *CollectionInfo) GetLastTruncateTimestamps() map[string]uint64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.LastTruncateTimestamps
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
type PartitionInfo struct {
|
type PartitionInfo struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@ -1082,8 +1090,8 @@ var file_etcd_meta_proto_rawDesc = []byte{
|
|||||||
0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69,
|
0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69,
|
||||||
0x6c, 0x65, 0x64, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x66, 0x69, 0x6c,
|
0x6c, 0x65, 0x64, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x66, 0x69, 0x6c,
|
||||||
0x65, 0x64, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x49, 0x44, 0x18,
|
0x65, 0x64, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x49, 0x44, 0x18,
|
||||||
0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x49, 0x44, 0x22, 0xba,
|
0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x49, 0x44, 0x22, 0xfc,
|
||||||
0x06, 0x0a, 0x0e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66,
|
0x07, 0x0a, 0x0e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66,
|
||||||
0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49,
|
0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49,
|
||||||
0x44, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28,
|
0x44, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
@ -1134,125 +1142,137 @@ var file_etcd_meta_proto_rawDesc = []byte{
|
|||||||
0x64, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x64, 0x62, 0x49,
|
0x64, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x64, 0x62, 0x49,
|
||||||
0x64, 0x12, 0x28, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73,
|
0x64, 0x12, 0x28, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73,
|
||||||
0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x55, 0x70, 0x64, 0x61,
|
0x74, 0x61, 0x6d, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x55, 0x70, 0x64, 0x61,
|
||||||
0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xf5, 0x01, 0x0a, 0x0d,
|
0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x75, 0x0a, 0x16, 0x4c,
|
||||||
0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x0a,
|
0x61, 0x73, 0x74, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73,
|
||||||
0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01,
|
0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x6d, 0x69,
|
||||||
|
0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x74, 0x63, 0x64, 0x2e,
|
||||||
|
0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c,
|
||||||
|
0x61, 0x73, 0x74, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73,
|
||||||
|
0x74, 0x61, 0x6d, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x16, 0x4c, 0x61, 0x73, 0x74,
|
||||||
|
0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
|
||||||
|
0x70, 0x73, 0x1a, 0x49, 0x0a, 0x1b, 0x4c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61,
|
||||||
|
0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72,
|
||||||
|
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
||||||
|
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||||
|
0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf5, 0x01,
|
||||||
|
0x0a, 0x0d, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12,
|
||||||
|
0x20, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01,
|
||||||
|
0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49,
|
||||||
|
0x44, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61,
|
||||||
|
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74,
|
||||||
|
0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x1b, 0x70, 0x61, 0x72, 0x74, 0x69,
|
||||||
|
0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d,
|
||||||
|
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x19, 0x70, 0x61,
|
||||||
|
0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69,
|
||||||
|
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x6c, 0x65,
|
||||||
|
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c,
|
||||||
|
0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x05,
|
||||||
|
0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6d, 0x69,
|
||||||
|
0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x74, 0x63, 0x64, 0x2e,
|
||||||
|
0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05,
|
||||||
|
0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0xbc, 0x01, 0x0a, 0x09, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x49,
|
||||||
|
0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x5f, 0x6e, 0x61, 0x6d,
|
||||||
|
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x4e, 0x61,
|
||||||
|
0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
|
0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x65,
|
||||||
|
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74,
|
||||||
|
0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x63,
|
||||||
|
0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x73, 0x74,
|
||||||
|
0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6d, 0x69, 0x6c, 0x76,
|
||||||
|
0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x74, 0x63, 0x64, 0x2e, 0x41, 0x6c,
|
||||||
|
0x69, 0x61, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12,
|
||||||
|
0x13, 0x0a, 0x05, 0x64, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04,
|
||||||
|
0x64, 0x62, 0x49, 0x64, 0x22, 0xed, 0x01, 0x0a, 0x0c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,
|
||||||
|
0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f,
|
||||||
|
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74,
|
||||||
|
0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||||
|
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01,
|
||||||
|
0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18,
|
||||||
|
0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70,
|
||||||
|
0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x74, 0x63, 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,
|
||||||
|
0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21,
|
||||||
|
0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05,
|
||||||
|
0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d,
|
||||||
|
0x65, 0x12, 0x41, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18,
|
||||||
|
0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70,
|
||||||
|
0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4b, 0x65, 0x79, 0x56,
|
||||||
|
0x61, 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
|
||||||
|
0x74, 0x69, 0x65, 0x73, 0x22, 0x88, 0x02, 0x0a, 0x10, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74,
|
||||||
|
0x49, 0x6e, 0x64, 0x65, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6c,
|
||||||
|
0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||||
|
0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x20, 0x0a,
|
||||||
|
0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01,
|
||||||
0x28, 0x03, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12,
|
0x28, 0x03, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12,
|
||||||
0x24, 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65,
|
0x1c, 0x0a, 0x09, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01,
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f,
|
0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x18, 0x0a,
|
||||||
0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x1b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69,
|
0x07, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07,
|
||||||
0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73,
|
0x66, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78,
|
||||||
0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x19, 0x70, 0x61, 0x72, 0x74,
|
0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x49,
|
||||||
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65,
|
0x44, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01,
|
||||||
0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
|
0x28, 0x03, 0x52, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x44, 0x12, 0x21, 0x0a, 0x0c, 0x65,
|
||||||
0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x6f,
|
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28,
|
||||||
0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x05, 0x73, 0x74,
|
0x08, 0x52, 0x0b, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1f,
|
||||||
0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6d, 0x69, 0x6c, 0x76,
|
0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20,
|
||||||
0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x74, 0x63, 0x64, 0x2e, 0x50, 0x61,
|
0x01, 0x28, 0x04, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22,
|
||||||
0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74,
|
0xeb, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65,
|
||||||
0x61, 0x74, 0x65, 0x22, 0xbc, 0x01, 0x0a, 0x09, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x49, 0x6e, 0x66,
|
0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02,
|
||||||
0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,
|
0x49, 0x44, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01,
|
||||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x4e, 0x61, 0x6d, 0x65,
|
0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69,
|
0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
|
||||||
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
|
0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d,
|
||||||
0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
|
0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65,
|
||||||
0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x63, 0x72, 0x65,
|
0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69,
|
||||||
0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74,
|
0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x73,
|
||||||
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73,
|
0x18, 0x04, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x49,
|
||||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x74, 0x63, 0x64, 0x2e, 0x41, 0x6c, 0x69, 0x61,
|
0x44, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
|
||||||
0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x13, 0x0a,
|
0x74, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x74,
|
||||||
0x05, 0x64, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x64, 0x62,
|
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x67, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x61, 0x72,
|
||||||
0x49, 0x64, 0x22, 0xed, 0x01, 0x0a, 0x0c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49,
|
0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x03, 0x52,
|
||||||
0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64,
|
0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x22, 0xb7, 0x01,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64,
|
0x0a, 0x0e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f,
|
||||||
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
|
||||||
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
|
0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x12,
|
||||||
0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20,
|
0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
|
||||||
0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f,
|
0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70,
|
||||||
0x74, 0x6f, 0x2e, 0x65, 0x74, 0x63, 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
|
0x74, 0x65, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74,
|
||||||
0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c,
|
0x65, 0x6e, 0x61, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x6e,
|
||||||
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01,
|
0x61, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x73, 0x75, 0x70, 0x65, 0x72, 0x18,
|
||||||
0x28, 0x04, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12,
|
0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x53, 0x75, 0x70, 0x65, 0x72, 0x12, 0x27,
|
||||||
0x41, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20,
|
0x0a, 0x0f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,
|
||||||
0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f,
|
0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x50,
|
||||||
0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c,
|
0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x2a, 0x7e, 0x0a, 0x0d, 0x44, 0x61, 0x74, 0x61, 0x62,
|
||||||
0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69,
|
0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x61, 0x74, 0x61,
|
||||||
0x65, 0x73, 0x22, 0x88, 0x02, 0x0a, 0x10, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e,
|
0x62, 0x61, 0x73, 0x65, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x13, 0x0a,
|
||||||
0x64, 0x65, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x65,
|
0x0f, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
|
||||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63,
|
0x10, 0x01, 0x12, 0x18, 0x0a, 0x10, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x72,
|
||||||
0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x70,
|
0x65, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x14, 0x0a, 0x10,
|
||||||
0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
|
0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x44, 0x72, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67,
|
||||||
0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1c, 0x0a,
|
0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x44, 0x72,
|
||||||
0x09, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
|
0x6f, 0x70, 0x70, 0x65, 0x64, 0x10, 0x04, 0x2a, 0x73, 0x0a, 0x0f, 0x43, 0x6f, 0x6c, 0x6c, 0x65,
|
||||||
0x52, 0x09, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x66,
|
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x6f,
|
||||||
0x69, 0x65, 0x6c, 0x64, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x66, 0x69,
|
0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x10,
|
||||||
0x65, 0x6c, 0x64, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x49, 0x44,
|
0x00, 0x12, 0x1a, 0x0a, 0x12, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43,
|
||||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x49, 0x44, 0x12,
|
0x72, 0x65, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x16, 0x0a,
|
||||||
0x18, 0x0a, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03,
|
0x12, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x72, 0x6f, 0x70, 0x70,
|
||||||
0x52, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x44, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x6e, 0x61,
|
0x69, 0x6e, 0x67, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
|
||||||
0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52,
|
0x69, 0x6f, 0x6e, 0x44, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x10, 0x03, 0x2a, 0x6e, 0x0a, 0x0e,
|
||||||
0x0b, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1f, 0x0a, 0x0b,
|
0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14,
|
||||||
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28,
|
0x0a, 0x10, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||||
0x04, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xeb, 0x01,
|
0x65, 0x64, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f,
|
||||||
0x0a, 0x0e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61,
|
0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12,
|
||||||
0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x44,
|
0x15, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x72, 0x6f, 0x70,
|
||||||
0x12, 0x3d, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
0x70, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74,
|
||||||
0x32, 0x25, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
|
0x69, 0x6f, 0x6e, 0x44, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x10, 0x03, 0x2a, 0x5a, 0x0a, 0x0a,
|
||||||
0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f,
|
0x41, 0x6c, 0x69, 0x61, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x6c,
|
||||||
0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12,
|
0x69, 0x61, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x0d,
|
||||||
0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03,
|
0x41, 0x6c, 0x69, 0x61, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x1a,
|
||||||
0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65,
|
0x02, 0x08, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x44, 0x72, 0x6f, 0x70,
|
||||||
0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x73, 0x18, 0x04,
|
0x70, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x44,
|
||||||
0x20, 0x03, 0x28, 0x03, 0x52, 0x0a, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x73,
|
0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x10, 0x03, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68,
|
||||||
0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61,
|
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2d, 0x69, 0x6f,
|
||||||
0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74,
|
0x2f, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x76, 0x32, 0x2f, 0x70,
|
||||||
0x69, 0x6f, 0x6e, 0x54, 0x61, 0x67, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69,
|
0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x63, 0x64, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||||
0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0c, 0x70,
|
0x74, 0x6f, 0x33,
|
||||||
0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x22, 0xb7, 0x01, 0x0a, 0x0e,
|
|
||||||
0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a,
|
|
||||||
0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
|
||||||
0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x6e,
|
|
||||||
0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
|
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65,
|
|
||||||
0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x6e,
|
|
||||||
0x61, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x6e, 0x61, 0x6e,
|
|
||||||
0x74, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x73, 0x75, 0x70, 0x65, 0x72, 0x18, 0x04, 0x20,
|
|
||||||
0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x53, 0x75, 0x70, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f,
|
|
||||||
0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18,
|
|
||||||
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x50, 0x61, 0x73,
|
|
||||||
0x73, 0x77, 0x6f, 0x72, 0x64, 0x2a, 0x7e, 0x0a, 0x0d, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,
|
|
||||||
0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,
|
|
||||||
0x73, 0x65, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x44,
|
|
||||||
0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x10, 0x01,
|
|
||||||
0x12, 0x18, 0x0a, 0x10, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x72, 0x65, 0x61,
|
|
||||||
0x74, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x61,
|
|
||||||
0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x44, 0x72, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x10, 0x03,
|
|
||||||
0x12, 0x13, 0x0a, 0x0f, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x44, 0x72, 0x6f, 0x70,
|
|
||||||
0x70, 0x65, 0x64, 0x10, 0x04, 0x2a, 0x73, 0x0a, 0x0f, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
|
|
||||||
0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x6f, 0x6c, 0x6c,
|
|
||||||
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x10, 0x00, 0x12,
|
|
||||||
0x1a, 0x0a, 0x12, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65,
|
|
||||||
0x61, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x43,
|
|
||||||
0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x72, 0x6f, 0x70, 0x70, 0x69, 0x6e,
|
|
||||||
0x67, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f,
|
|
||||||
0x6e, 0x44, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x10, 0x03, 0x2a, 0x6e, 0x0a, 0x0e, 0x50, 0x61,
|
|
||||||
0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x10,
|
|
||||||
0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
|
|
||||||
0x10, 0x00, 0x12, 0x19, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x43,
|
|
||||||
0x72, 0x65, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x15, 0x0a,
|
|
||||||
0x11, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x72, 0x6f, 0x70, 0x70, 0x69,
|
|
||||||
0x6e, 0x67, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f,
|
|
||||||
0x6e, 0x44, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x10, 0x03, 0x2a, 0x5a, 0x0a, 0x0a, 0x41, 0x6c,
|
|
||||||
0x69, 0x61, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x6c, 0x69, 0x61,
|
|
||||||
0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x0d, 0x41, 0x6c,
|
|
||||||
0x69, 0x61, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x1a, 0x02, 0x08,
|
|
||||||
0x01, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x44, 0x72, 0x6f, 0x70, 0x70, 0x69,
|
|
||||||
0x6e, 0x67, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x44, 0x72, 0x6f,
|
|
||||||
0x70, 0x70, 0x65, 0x64, 0x10, 0x03, 0x42, 0x31, 0x5a, 0x2f, 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, 0x70, 0x6b, 0x67, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f,
|
|
||||||
0x74, 0x6f, 0x2f, 0x65, 0x74, 0x63, 0x64, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
|
||||||
0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -1268,7 +1288,7 @@ func file_etcd_meta_proto_rawDescGZIP() []byte {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var file_etcd_meta_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
|
var file_etcd_meta_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
|
||||||
var file_etcd_meta_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
var file_etcd_meta_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
|
||||||
var file_etcd_meta_proto_goTypes = []interface{}{
|
var file_etcd_meta_proto_goTypes = []interface{}{
|
||||||
(DatabaseState)(0), // 0: milvus.proto.etcd.DatabaseState
|
(DatabaseState)(0), // 0: milvus.proto.etcd.DatabaseState
|
||||||
(CollectionState)(0), // 1: milvus.proto.etcd.CollectionState
|
(CollectionState)(0), // 1: milvus.proto.etcd.CollectionState
|
||||||
@ -1283,29 +1303,31 @@ var file_etcd_meta_proto_goTypes = []interface{}{
|
|||||||
(*SegmentIndexInfo)(nil), // 10: milvus.proto.etcd.SegmentIndexInfo
|
(*SegmentIndexInfo)(nil), // 10: milvus.proto.etcd.SegmentIndexInfo
|
||||||
(*CollectionMeta)(nil), // 11: milvus.proto.etcd.CollectionMeta
|
(*CollectionMeta)(nil), // 11: milvus.proto.etcd.CollectionMeta
|
||||||
(*CredentialInfo)(nil), // 12: milvus.proto.etcd.CredentialInfo
|
(*CredentialInfo)(nil), // 12: milvus.proto.etcd.CredentialInfo
|
||||||
(*commonpb.KeyValuePair)(nil), // 13: milvus.proto.common.KeyValuePair
|
nil, // 13: milvus.proto.etcd.CollectionInfo.LastTruncateTimestampsEntry
|
||||||
(*schemapb.CollectionSchema)(nil), // 14: milvus.proto.schema.CollectionSchema
|
(*commonpb.KeyValuePair)(nil), // 14: milvus.proto.common.KeyValuePair
|
||||||
(*commonpb.KeyDataPair)(nil), // 15: milvus.proto.common.KeyDataPair
|
(*schemapb.CollectionSchema)(nil), // 15: milvus.proto.schema.CollectionSchema
|
||||||
(commonpb.ConsistencyLevel)(0), // 16: milvus.proto.common.ConsistencyLevel
|
(*commonpb.KeyDataPair)(nil), // 16: milvus.proto.common.KeyDataPair
|
||||||
|
(commonpb.ConsistencyLevel)(0), // 17: milvus.proto.common.ConsistencyLevel
|
||||||
}
|
}
|
||||||
var file_etcd_meta_proto_depIdxs = []int32{
|
var file_etcd_meta_proto_depIdxs = []int32{
|
||||||
13, // 0: milvus.proto.etcd.IndexInfo.index_params:type_name -> milvus.proto.common.KeyValuePair
|
14, // 0: milvus.proto.etcd.IndexInfo.index_params:type_name -> milvus.proto.common.KeyValuePair
|
||||||
14, // 1: milvus.proto.etcd.CollectionInfo.schema:type_name -> milvus.proto.schema.CollectionSchema
|
15, // 1: milvus.proto.etcd.CollectionInfo.schema:type_name -> milvus.proto.schema.CollectionSchema
|
||||||
5, // 2: milvus.proto.etcd.CollectionInfo.field_indexes:type_name -> milvus.proto.etcd.FieldIndexInfo
|
5, // 2: milvus.proto.etcd.CollectionInfo.field_indexes:type_name -> milvus.proto.etcd.FieldIndexInfo
|
||||||
15, // 3: milvus.proto.etcd.CollectionInfo.start_positions:type_name -> milvus.proto.common.KeyDataPair
|
16, // 3: milvus.proto.etcd.CollectionInfo.start_positions:type_name -> milvus.proto.common.KeyDataPair
|
||||||
16, // 4: milvus.proto.etcd.CollectionInfo.consistency_level:type_name -> milvus.proto.common.ConsistencyLevel
|
17, // 4: milvus.proto.etcd.CollectionInfo.consistency_level:type_name -> milvus.proto.common.ConsistencyLevel
|
||||||
1, // 5: milvus.proto.etcd.CollectionInfo.state:type_name -> milvus.proto.etcd.CollectionState
|
1, // 5: milvus.proto.etcd.CollectionInfo.state:type_name -> milvus.proto.etcd.CollectionState
|
||||||
13, // 6: milvus.proto.etcd.CollectionInfo.properties:type_name -> milvus.proto.common.KeyValuePair
|
14, // 6: milvus.proto.etcd.CollectionInfo.properties:type_name -> milvus.proto.common.KeyValuePair
|
||||||
2, // 7: milvus.proto.etcd.PartitionInfo.state:type_name -> milvus.proto.etcd.PartitionState
|
13, // 7: milvus.proto.etcd.CollectionInfo.LastTruncateTimestamps:type_name -> milvus.proto.etcd.CollectionInfo.LastTruncateTimestampsEntry
|
||||||
3, // 8: milvus.proto.etcd.AliasInfo.state:type_name -> milvus.proto.etcd.AliasState
|
2, // 8: milvus.proto.etcd.PartitionInfo.state:type_name -> milvus.proto.etcd.PartitionState
|
||||||
0, // 9: milvus.proto.etcd.DatabaseInfo.state:type_name -> milvus.proto.etcd.DatabaseState
|
3, // 9: milvus.proto.etcd.AliasInfo.state:type_name -> milvus.proto.etcd.AliasState
|
||||||
13, // 10: milvus.proto.etcd.DatabaseInfo.properties:type_name -> milvus.proto.common.KeyValuePair
|
0, // 10: milvus.proto.etcd.DatabaseInfo.state:type_name -> milvus.proto.etcd.DatabaseState
|
||||||
14, // 11: milvus.proto.etcd.CollectionMeta.schema:type_name -> milvus.proto.schema.CollectionSchema
|
14, // 11: milvus.proto.etcd.DatabaseInfo.properties:type_name -> milvus.proto.common.KeyValuePair
|
||||||
12, // [12:12] is the sub-list for method output_type
|
15, // 12: milvus.proto.etcd.CollectionMeta.schema:type_name -> milvus.proto.schema.CollectionSchema
|
||||||
12, // [12:12] is the sub-list for method input_type
|
13, // [13:13] is the sub-list for method output_type
|
||||||
12, // [12:12] is the sub-list for extension type_name
|
13, // [13:13] is the sub-list for method input_type
|
||||||
12, // [12:12] is the sub-list for extension extendee
|
13, // [13:13] is the sub-list for extension type_name
|
||||||
0, // [0:12] is the sub-list for field type_name
|
13, // [13:13] is the sub-list for extension extendee
|
||||||
|
0, // [0:13] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_etcd_meta_proto_init() }
|
func init() { file_etcd_meta_proto_init() }
|
||||||
@ -1429,7 +1451,7 @@ func file_etcd_meta_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_etcd_meta_proto_rawDesc,
|
RawDescriptor: file_etcd_meta_proto_rawDesc,
|
||||||
NumEnums: 4,
|
NumEnums: 4,
|
||||||
NumMessages: 9,
|
NumMessages: 10,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -59,6 +59,7 @@ enum MessageType {
|
|||||||
AlterIndex = 35;
|
AlterIndex = 35;
|
||||||
DropIndex = 36;
|
DropIndex = 36;
|
||||||
FlushAll = 37;
|
FlushAll = 37;
|
||||||
|
TruncateCollection = 38;
|
||||||
|
|
||||||
// AlterReplicateConfig is used to alter the replicate configuration to the current cluster.
|
// AlterReplicateConfig is used to alter the replicate configuration to the current cluster.
|
||||||
// When the AlterReplicateConfig message is received, the replication topology is changed.
|
// When the AlterReplicateConfig message is received, the replication topology is changed.
|
||||||
@ -668,3 +669,14 @@ message CipherHeader {
|
|||||||
bytes safe_key = 3; // the safe key
|
bytes safe_key = 3; // the safe key
|
||||||
int64 payload_bytes = 4; // the size of the payload before encryption
|
int64 payload_bytes = 4; // the size of the payload before encryption
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TruncateCollectionMessageHeader is the header of truncate collection message.
|
||||||
|
message TruncateCollectionMessageHeader {
|
||||||
|
int64 db_id = 1;
|
||||||
|
int64 collection_id = 2;
|
||||||
|
repeated int64 segment_ids = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TruncateCollectionMessageBody is the body of truncate collection message.
|
||||||
|
message TruncateCollectionMessageBody {}
|
||||||
|
|
||||||
|
|||||||
@ -71,6 +71,7 @@ const (
|
|||||||
MessageType_AlterIndex MessageType = 35
|
MessageType_AlterIndex MessageType = 35
|
||||||
MessageType_DropIndex MessageType = 36
|
MessageType_DropIndex MessageType = 36
|
||||||
MessageType_FlushAll MessageType = 37
|
MessageType_FlushAll MessageType = 37
|
||||||
|
MessageType_TruncateCollection MessageType = 38
|
||||||
// AlterReplicateConfig is used to alter the replicate configuration to the current cluster.
|
// AlterReplicateConfig is used to alter the replicate configuration to the current cluster.
|
||||||
// When the AlterReplicateConfig message is received, the replication topology is changed.
|
// When the AlterReplicateConfig message is received, the replication topology is changed.
|
||||||
// Maybe some cluster give up the leader role, no any other message will be received from this cluster.
|
// Maybe some cluster give up the leader role, no any other message will be received from this cluster.
|
||||||
@ -142,6 +143,7 @@ var (
|
|||||||
35: "AlterIndex",
|
35: "AlterIndex",
|
||||||
36: "DropIndex",
|
36: "DropIndex",
|
||||||
37: "FlushAll",
|
37: "FlushAll",
|
||||||
|
38: "TruncateCollection",
|
||||||
800: "AlterReplicateConfig",
|
800: "AlterReplicateConfig",
|
||||||
900: "BeginTxn",
|
900: "BeginTxn",
|
||||||
901: "CommitTxn",
|
901: "CommitTxn",
|
||||||
@ -187,6 +189,7 @@ var (
|
|||||||
"AlterIndex": 35,
|
"AlterIndex": 35,
|
||||||
"DropIndex": 36,
|
"DropIndex": 36,
|
||||||
"FlushAll": 37,
|
"FlushAll": 37,
|
||||||
|
"TruncateCollection": 38,
|
||||||
"AlterReplicateConfig": 800,
|
"AlterReplicateConfig": 800,
|
||||||
"BeginTxn": 900,
|
"BeginTxn": 900,
|
||||||
"CommitTxn": 901,
|
"CommitTxn": 901,
|
||||||
@ -5390,6 +5393,109 @@ func (x *CipherHeader) GetPayloadBytes() int64 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TruncateCollectionMessageHeader is the header of truncate collection message.
|
||||||
|
type TruncateCollectionMessageHeader struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
DbId int64 `protobuf:"varint,1,opt,name=db_id,json=dbId,proto3" json:"db_id,omitempty"`
|
||||||
|
CollectionId int64 `protobuf:"varint,2,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
|
||||||
|
SegmentIds []int64 `protobuf:"varint,3,rep,packed,name=segment_ids,json=segmentIds,proto3" json:"segment_ids,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TruncateCollectionMessageHeader) Reset() {
|
||||||
|
*x = TruncateCollectionMessageHeader{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_messages_proto_msgTypes[97]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TruncateCollectionMessageHeader) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*TruncateCollectionMessageHeader) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *TruncateCollectionMessageHeader) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_messages_proto_msgTypes[97]
|
||||||
|
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 TruncateCollectionMessageHeader.ProtoReflect.Descriptor instead.
|
||||||
|
func (*TruncateCollectionMessageHeader) Descriptor() ([]byte, []int) {
|
||||||
|
return file_messages_proto_rawDescGZIP(), []int{97}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TruncateCollectionMessageHeader) GetDbId() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.DbId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TruncateCollectionMessageHeader) GetCollectionId() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.CollectionId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TruncateCollectionMessageHeader) GetSegmentIds() []int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.SegmentIds
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// TruncateCollectionMessageBody is the body of truncate collection message.
|
||||||
|
type TruncateCollectionMessageBody struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TruncateCollectionMessageBody) Reset() {
|
||||||
|
*x = TruncateCollectionMessageBody{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_messages_proto_msgTypes[98]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TruncateCollectionMessageBody) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*TruncateCollectionMessageBody) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *TruncateCollectionMessageBody) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_messages_proto_msgTypes[98]
|
||||||
|
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 TruncateCollectionMessageBody.ProtoReflect.Descriptor instead.
|
||||||
|
func (*TruncateCollectionMessageBody) Descriptor() ([]byte, []int) {
|
||||||
|
return file_messages_proto_rawDescGZIP(), []int{98}
|
||||||
|
}
|
||||||
|
|
||||||
var File_messages_proto protoreflect.FileDescriptor
|
var File_messages_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_messages_proto_rawDesc = []byte{
|
var file_messages_proto_rawDesc = []byte{
|
||||||
@ -5998,79 +6104,90 @@ var file_messages_proto_rawDesc = []byte{
|
|||||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x61, 0x66, 0x65, 0x4b, 0x65, 0x79, 0x12,
|
0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x61, 0x66, 0x65, 0x4b, 0x65, 0x79, 0x12,
|
||||||
0x23, 0x0a, 0x0d, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73,
|
0x23, 0x0a, 0x0d, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73,
|
||||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42,
|
0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42,
|
||||||
0x79, 0x74, 0x65, 0x73, 0x2a, 0x84, 0x06, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
0x79, 0x74, 0x65, 0x73, 0x22, 0x7c, 0x0a, 0x1f, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65,
|
||||||
0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10,
|
0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
||||||
0x00, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x10, 0x01, 0x12,
|
0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x13, 0x0a, 0x05, 0x64, 0x62, 0x5f, 0x69, 0x64,
|
||||||
0x0a, 0x0a, 0x06, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x44,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x64, 0x62, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d,
|
||||||
0x65, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x6c, 0x75, 0x73, 0x68,
|
0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20,
|
||||||
0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c,
|
0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49,
|
||||||
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x72, 0x6f, 0x70,
|
0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x73,
|
||||||
0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f,
|
0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x49,
|
||||||
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x10,
|
0x64, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x43, 0x6f,
|
||||||
0x07, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x72, 0x6f, 0x70, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69,
|
0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42,
|
||||||
0x6f, 0x6e, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x46, 0x6c,
|
0x6f, 0x64, 0x79, 0x2a, 0x9c, 0x06, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54,
|
||||||
0x75, 0x73, 0x68, 0x10, 0x09, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53,
|
0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00,
|
||||||
0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x0a, 0x12, 0x0a, 0x0a, 0x06, 0x49, 0x6d, 0x70, 0x6f,
|
0x12, 0x0c, 0x0a, 0x08, 0x54, 0x69, 0x6d, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x10, 0x01, 0x12, 0x0a,
|
||||||
0x72, 0x74, 0x10, 0x0b, 0x12, 0x14, 0x0a, 0x0c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x68,
|
0x0a, 0x06, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x65,
|
||||||
0x61, 0x6e, 0x67, 0x65, 0x10, 0x0c, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x6c,
|
0x6c, 0x65, 0x74, 0x65, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x10,
|
||||||
0x74, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x0d, 0x12,
|
0x04, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65,
|
||||||
0x13, 0x0a, 0x0f, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x43, 0x6f, 0x6e, 0x66,
|
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x72, 0x6f, 0x70, 0x43,
|
||||||
0x69, 0x67, 0x10, 0x0e, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x72, 0x6f, 0x70, 0x4c, 0x6f, 0x61, 0x64,
|
0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x43,
|
||||||
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x10, 0x0f, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61,
|
0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x07,
|
||||||
0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x10, 0x10, 0x12, 0x11, 0x0a, 0x0d,
|
0x12, 0x11, 0x0a, 0x0d, 0x44, 0x72, 0x6f, 0x70, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f,
|
||||||
0x41, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x10, 0x11, 0x12,
|
0x6e, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x46, 0x6c, 0x75,
|
||||||
0x10, 0x0a, 0x0c, 0x44, 0x72, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x10,
|
0x73, 0x68, 0x10, 0x09, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65,
|
||||||
0x12, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x10,
|
0x67, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x0a, 0x12, 0x0a, 0x0a, 0x06, 0x49, 0x6d, 0x70, 0x6f, 0x72,
|
||||||
0x13, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x72, 0x6f, 0x70, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x10, 0x14,
|
0x74, 0x10, 0x0b, 0x12, 0x14, 0x0a, 0x0c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x68, 0x61,
|
||||||
0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x42, 0x41, 0x43, 0x10,
|
0x6e, 0x67, 0x65, 0x10, 0x0c, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x6c, 0x74,
|
||||||
0x15, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x10, 0x16,
|
0x65, 0x72, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x0d, 0x12, 0x13,
|
||||||
0x12, 0x0c, 0x0a, 0x08, 0x44, 0x72, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x10, 0x17, 0x12, 0x0d,
|
0x0a, 0x0f, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69,
|
||||||
0x0a, 0x09, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x10, 0x18, 0x12, 0x0c, 0x0a,
|
0x67, 0x10, 0x0e, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x72, 0x6f, 0x70, 0x4c, 0x6f, 0x61, 0x64, 0x43,
|
||||||
0x08, 0x44, 0x72, 0x6f, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x10, 0x19, 0x12, 0x11, 0x0a, 0x0d, 0x41,
|
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x10, 0x0f, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||||
0x6c, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x10, 0x1a, 0x12, 0x10,
|
0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x10, 0x10, 0x12, 0x11, 0x0a, 0x0d, 0x41,
|
||||||
0x0a, 0x0c, 0x44, 0x72, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x10, 0x1b,
|
0x6c, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x10, 0x11, 0x12, 0x10,
|
||||||
0x12, 0x12, 0x0a, 0x0e, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65,
|
0x0a, 0x0c, 0x44, 0x72, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x10, 0x12,
|
||||||
0x67, 0x65, 0x10, 0x1c, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x72, 0x6f, 0x70, 0x50, 0x72, 0x69, 0x76,
|
0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x10, 0x13,
|
||||||
0x69, 0x6c, 0x65, 0x67, 0x65, 0x10, 0x1d, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x6c, 0x74, 0x65, 0x72,
|
0x12, 0x0d, 0x0a, 0x09, 0x44, 0x72, 0x6f, 0x70, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x10, 0x14, 0x12,
|
||||||
0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x10, 0x1e,
|
0x0f, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x42, 0x41, 0x43, 0x10, 0x15,
|
||||||
0x12, 0x16, 0x0a, 0x12, 0x44, 0x72, 0x6f, 0x70, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67,
|
0x12, 0x0d, 0x0a, 0x09, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x10, 0x16, 0x12,
|
||||||
0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x10, 0x1f, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x6c, 0x74, 0x65,
|
0x0c, 0x0a, 0x08, 0x44, 0x72, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x10, 0x17, 0x12, 0x0d, 0x0a,
|
||||||
0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x10, 0x20,
|
0x09, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x10, 0x18, 0x12, 0x0c, 0x0a, 0x08,
|
||||||
0x12, 0x15, 0x0a, 0x11, 0x44, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
0x44, 0x72, 0x6f, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x10, 0x19, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x6c,
|
||||||
0x47, 0x72, 0x6f, 0x75, 0x70, 0x10, 0x21, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74,
|
0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x10, 0x1a, 0x12, 0x10, 0x0a,
|
||||||
0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x10, 0x22, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x6c, 0x74, 0x65,
|
0x0c, 0x44, 0x72, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x10, 0x1b, 0x12,
|
||||||
0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x10, 0x23, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x72, 0x6f, 0x70,
|
0x12, 0x0a, 0x0e, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67,
|
||||||
0x49, 0x6e, 0x64, 0x65, 0x78, 0x10, 0x24, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x6c, 0x75, 0x73, 0x68,
|
0x65, 0x10, 0x1c, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x72, 0x6f, 0x70, 0x50, 0x72, 0x69, 0x76, 0x69,
|
||||||
0x41, 0x6c, 0x6c, 0x10, 0x25, 0x12, 0x19, 0x0a, 0x14, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65,
|
0x6c, 0x65, 0x67, 0x65, 0x10, 0x1d, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x50,
|
||||||
0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x10, 0xa0, 0x06,
|
0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x10, 0x1e, 0x12,
|
||||||
0x12, 0x0d, 0x0a, 0x08, 0x42, 0x65, 0x67, 0x69, 0x6e, 0x54, 0x78, 0x6e, 0x10, 0x84, 0x07, 0x12,
|
0x16, 0x0a, 0x12, 0x44, 0x72, 0x6f, 0x70, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65,
|
||||||
0x0e, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x6e, 0x10, 0x85, 0x07, 0x12,
|
0x47, 0x72, 0x6f, 0x75, 0x70, 0x10, 0x1f, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x6c, 0x74, 0x65, 0x72,
|
||||||
0x10, 0x0a, 0x0b, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x54, 0x78, 0x6e, 0x10, 0x86,
|
0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x10, 0x20, 0x12,
|
||||||
0x07, 0x12, 0x08, 0x0a, 0x03, 0x54, 0x78, 0x6e, 0x10, 0xe7, 0x07, 0x2a, 0x74, 0x0a, 0x08, 0x54,
|
0x15, 0x0a, 0x11, 0x44, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47,
|
||||||
0x78, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x78, 0x6e, 0x55, 0x6e,
|
0x72, 0x6f, 0x75, 0x70, 0x10, 0x21, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||||
0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x78, 0x6e, 0x49, 0x6e,
|
0x49, 0x6e, 0x64, 0x65, 0x78, 0x10, 0x22, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x6c, 0x74, 0x65, 0x72,
|
||||||
0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x78, 0x6e, 0x4f,
|
0x49, 0x6e, 0x64, 0x65, 0x78, 0x10, 0x23, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x72, 0x6f, 0x70, 0x49,
|
||||||
0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x78, 0x6e,
|
0x6e, 0x64, 0x65, 0x78, 0x10, 0x24, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x41,
|
||||||
0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x54,
|
0x6c, 0x6c, 0x10, 0x25, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65,
|
||||||
0x78, 0x6e, 0x4f, 0x6e, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x10, 0x04, 0x12, 0x11,
|
0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x26, 0x12, 0x19, 0x0a, 0x14,
|
||||||
0x0a, 0x0d, 0x54, 0x78, 0x6e, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x10,
|
0x41, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x6f,
|
||||||
0x05, 0x2a, 0xc2, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x6f,
|
0x6e, 0x66, 0x69, 0x67, 0x10, 0xa0, 0x06, 0x12, 0x0d, 0x0a, 0x08, 0x42, 0x65, 0x67, 0x69, 0x6e,
|
||||||
0x6d, 0x61, 0x69, 0x6e, 0x12, 0x19, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
0x54, 0x78, 0x6e, 0x10, 0x84, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
|
||||||
0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12,
|
0x54, 0x78, 0x6e, 0x10, 0x85, 0x07, 0x12, 0x10, 0x0a, 0x0b, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61,
|
||||||
0x21, 0x0a, 0x19, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69,
|
0x63, 0x6b, 0x54, 0x78, 0x6e, 0x10, 0x86, 0x07, 0x12, 0x08, 0x0a, 0x03, 0x54, 0x78, 0x6e, 0x10,
|
||||||
0x6e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x49, 0x44, 0x10, 0x01, 0x1a, 0x02,
|
0xe7, 0x07, 0x2a, 0x74, 0x0a, 0x08, 0x54, 0x78, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e,
|
||||||
0x08, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x6f,
|
0x0a, 0x0a, 0x54, 0x78, 0x6e, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0f,
|
||||||
0x6d, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61,
|
0x0a, 0x0b, 0x54, 0x78, 0x6e, 0x49, 0x6e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x10, 0x01, 0x12,
|
||||||
0x6d, 0x65, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
0x0f, 0x0a, 0x0b, 0x54, 0x78, 0x6e, 0x4f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x10, 0x02,
|
||||||
0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x44, 0x42, 0x4e, 0x61, 0x6d, 0x65, 0x10, 0x03, 0x12, 0x1b,
|
0x12, 0x10, 0x0a, 0x0c, 0x54, 0x78, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64,
|
||||||
0x0a, 0x17, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e,
|
0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x78, 0x6e, 0x4f, 0x6e, 0x52, 0x6f, 0x6c, 0x6c, 0x62,
|
||||||
0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x10, 0x04, 0x12, 0x19, 0x0a, 0x15, 0x52,
|
0x61, 0x63, 0x6b, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x78, 0x6e, 0x52, 0x6f, 0x6c, 0x6c,
|
||||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x43, 0x6c, 0x75,
|
0x62, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x10, 0x05, 0x2a, 0xc2, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x73,
|
||||||
0x73, 0x74, 0x65, 0x72, 0x10, 0x7f, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
|
0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x19, 0x0a, 0x15, 0x52,
|
||||||
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2d, 0x69, 0x6f, 0x2f, 0x6d,
|
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x55, 0x6e, 0x6b,
|
||||||
0x69, 0x6c, 0x76, 0x75, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f,
|
0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x19, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
|
||||||
0x74, 0x6f, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70,
|
0x63, 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x62, 0x49, 0x44, 0x10, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x65, 0x73,
|
||||||
|
0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x6c, 0x6c, 0x65,
|
||||||
|
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x52,
|
||||||
|
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x44, 0x42, 0x4e,
|
||||||
|
0x61, 0x6d, 0x65, 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||||
|
0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65,
|
||||||
|
0x10, 0x04, 0x12, 0x19, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x6f,
|
||||||
|
0x6d, 0x61, 0x69, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x10, 0x7f, 0x42, 0x35, 0x5a,
|
||||||
|
0x33, 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, 0x70, 0x6b, 0x67,
|
||||||
|
0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
||||||
|
0x65, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -6086,7 +6203,7 @@ func file_messages_proto_rawDescGZIP() []byte {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var file_messages_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
|
var file_messages_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
|
||||||
var file_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 100)
|
var file_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 102)
|
||||||
var file_messages_proto_goTypes = []interface{}{
|
var file_messages_proto_goTypes = []interface{}{
|
||||||
(MessageType)(0), // 0: milvus.proto.messages.MessageType
|
(MessageType)(0), // 0: milvus.proto.messages.MessageType
|
||||||
(TxnState)(0), // 1: milvus.proto.messages.TxnState
|
(TxnState)(0), // 1: milvus.proto.messages.TxnState
|
||||||
@ -6188,74 +6305,76 @@ var file_messages_proto_goTypes = []interface{}{
|
|||||||
(*ReplicateHeader)(nil), // 97: milvus.proto.messages.ReplicateHeader
|
(*ReplicateHeader)(nil), // 97: milvus.proto.messages.ReplicateHeader
|
||||||
(*ResourceKey)(nil), // 98: milvus.proto.messages.ResourceKey
|
(*ResourceKey)(nil), // 98: milvus.proto.messages.ResourceKey
|
||||||
(*CipherHeader)(nil), // 99: milvus.proto.messages.CipherHeader
|
(*CipherHeader)(nil), // 99: milvus.proto.messages.CipherHeader
|
||||||
nil, // 100: milvus.proto.messages.Message.PropertiesEntry
|
(*TruncateCollectionMessageHeader)(nil), // 100: milvus.proto.messages.TruncateCollectionMessageHeader
|
||||||
nil, // 101: milvus.proto.messages.AlterResourceGroupMessageHeader.ResourceGroupConfigsEntry
|
(*TruncateCollectionMessageBody)(nil), // 101: milvus.proto.messages.TruncateCollectionMessageBody
|
||||||
nil, // 102: milvus.proto.messages.RMQMessageLayout.PropertiesEntry
|
nil, // 102: milvus.proto.messages.Message.PropertiesEntry
|
||||||
(datapb.SegmentLevel)(0), // 103: milvus.proto.data.SegmentLevel
|
nil, // 103: milvus.proto.messages.AlterResourceGroupMessageHeader.ResourceGroupConfigsEntry
|
||||||
(*commonpb.ReplicateConfiguration)(nil), // 104: milvus.proto.common.ReplicateConfiguration
|
nil, // 104: milvus.proto.messages.RMQMessageLayout.PropertiesEntry
|
||||||
(*schemapb.CollectionSchema)(nil), // 105: milvus.proto.schema.CollectionSchema
|
(datapb.SegmentLevel)(0), // 105: milvus.proto.data.SegmentLevel
|
||||||
(*fieldmaskpb.FieldMask)(nil), // 106: google.protobuf.FieldMask
|
(*commonpb.ReplicateConfiguration)(nil), // 106: milvus.proto.common.ReplicateConfiguration
|
||||||
(commonpb.ConsistencyLevel)(0), // 107: milvus.proto.common.ConsistencyLevel
|
(*schemapb.CollectionSchema)(nil), // 107: milvus.proto.schema.CollectionSchema
|
||||||
(*commonpb.KeyValuePair)(nil), // 108: milvus.proto.common.KeyValuePair
|
(*fieldmaskpb.FieldMask)(nil), // 108: google.protobuf.FieldMask
|
||||||
(commonpb.LoadPriority)(0), // 109: milvus.proto.common.LoadPriority
|
(commonpb.ConsistencyLevel)(0), // 109: milvus.proto.common.ConsistencyLevel
|
||||||
(*milvuspb.UserEntity)(nil), // 110: milvus.proto.milvus.UserEntity
|
(*commonpb.KeyValuePair)(nil), // 110: milvus.proto.common.KeyValuePair
|
||||||
(*internalpb.CredentialInfo)(nil), // 111: milvus.proto.internal.CredentialInfo
|
(commonpb.LoadPriority)(0), // 111: milvus.proto.common.LoadPriority
|
||||||
(*milvuspb.RoleEntity)(nil), // 112: milvus.proto.milvus.RoleEntity
|
(*milvuspb.UserEntity)(nil), // 112: milvus.proto.milvus.UserEntity
|
||||||
(*milvuspb.RBACMeta)(nil), // 113: milvus.proto.milvus.RBACMeta
|
(*internalpb.CredentialInfo)(nil), // 113: milvus.proto.internal.CredentialInfo
|
||||||
(*milvuspb.GrantEntity)(nil), // 114: milvus.proto.milvus.GrantEntity
|
(*milvuspb.RoleEntity)(nil), // 114: milvus.proto.milvus.RoleEntity
|
||||||
(*milvuspb.PrivilegeGroupInfo)(nil), // 115: milvus.proto.milvus.PrivilegeGroupInfo
|
(*milvuspb.RBACMeta)(nil), // 115: milvus.proto.milvus.RBACMeta
|
||||||
(*indexpb.FieldIndex)(nil), // 116: milvus.proto.index.FieldIndex
|
(*milvuspb.GrantEntity)(nil), // 116: milvus.proto.milvus.GrantEntity
|
||||||
(commonpb.MsgType)(0), // 117: milvus.proto.common.MsgType
|
(*milvuspb.PrivilegeGroupInfo)(nil), // 117: milvus.proto.milvus.PrivilegeGroupInfo
|
||||||
(*commonpb.MessageID)(nil), // 118: milvus.proto.common.MessageID
|
(*indexpb.FieldIndex)(nil), // 118: milvus.proto.index.FieldIndex
|
||||||
(*rgpb.ResourceGroupConfig)(nil), // 119: milvus.proto.rg.ResourceGroupConfig
|
(commonpb.MsgType)(0), // 119: milvus.proto.common.MsgType
|
||||||
|
(*commonpb.MessageID)(nil), // 120: milvus.proto.common.MessageID
|
||||||
|
(*rgpb.ResourceGroupConfig)(nil), // 121: milvus.proto.rg.ResourceGroupConfig
|
||||||
}
|
}
|
||||||
var file_messages_proto_depIdxs = []int32{
|
var file_messages_proto_depIdxs = []int32{
|
||||||
100, // 0: milvus.proto.messages.Message.properties:type_name -> milvus.proto.messages.Message.PropertiesEntry
|
102, // 0: milvus.proto.messages.Message.properties:type_name -> milvus.proto.messages.Message.PropertiesEntry
|
||||||
3, // 1: milvus.proto.messages.TxnMessageBody.messages:type_name -> milvus.proto.messages.Message
|
3, // 1: milvus.proto.messages.TxnMessageBody.messages:type_name -> milvus.proto.messages.Message
|
||||||
13, // 2: milvus.proto.messages.InsertMessageHeader.partitions:type_name -> milvus.proto.messages.PartitionSegmentAssignment
|
13, // 2: milvus.proto.messages.InsertMessageHeader.partitions:type_name -> milvus.proto.messages.PartitionSegmentAssignment
|
||||||
14, // 3: milvus.proto.messages.PartitionSegmentAssignment.segment_assignment:type_name -> milvus.proto.messages.SegmentAssignment
|
14, // 3: milvus.proto.messages.PartitionSegmentAssignment.segment_assignment:type_name -> milvus.proto.messages.SegmentAssignment
|
||||||
103, // 4: milvus.proto.messages.CreateSegmentMessageHeader.level:type_name -> milvus.proto.data.SegmentLevel
|
105, // 4: milvus.proto.messages.CreateSegmentMessageHeader.level:type_name -> milvus.proto.data.SegmentLevel
|
||||||
104, // 5: milvus.proto.messages.AlterReplicateConfigMessageHeader.replicate_configuration:type_name -> milvus.proto.common.ReplicateConfiguration
|
106, // 5: milvus.proto.messages.AlterReplicateConfigMessageHeader.replicate_configuration:type_name -> milvus.proto.common.ReplicateConfiguration
|
||||||
105, // 6: milvus.proto.messages.SchemaChangeMessageBody.schema:type_name -> milvus.proto.schema.CollectionSchema
|
107, // 6: milvus.proto.messages.SchemaChangeMessageBody.schema:type_name -> milvus.proto.schema.CollectionSchema
|
||||||
106, // 7: milvus.proto.messages.AlterCollectionMessageHeader.update_mask:type_name -> google.protobuf.FieldMask
|
108, // 7: milvus.proto.messages.AlterCollectionMessageHeader.update_mask:type_name -> google.protobuf.FieldMask
|
||||||
88, // 8: milvus.proto.messages.AlterCollectionMessageHeader.cache_expirations:type_name -> milvus.proto.messages.CacheExpirations
|
88, // 8: milvus.proto.messages.AlterCollectionMessageHeader.cache_expirations:type_name -> milvus.proto.messages.CacheExpirations
|
||||||
34, // 9: milvus.proto.messages.AlterCollectionMessageBody.updates:type_name -> milvus.proto.messages.AlterCollectionMessageUpdates
|
34, // 9: milvus.proto.messages.AlterCollectionMessageBody.updates:type_name -> milvus.proto.messages.AlterCollectionMessageUpdates
|
||||||
105, // 10: milvus.proto.messages.AlterCollectionMessageUpdates.schema:type_name -> milvus.proto.schema.CollectionSchema
|
107, // 10: milvus.proto.messages.AlterCollectionMessageUpdates.schema:type_name -> milvus.proto.schema.CollectionSchema
|
||||||
107, // 11: milvus.proto.messages.AlterCollectionMessageUpdates.consistency_level:type_name -> milvus.proto.common.ConsistencyLevel
|
109, // 11: milvus.proto.messages.AlterCollectionMessageUpdates.consistency_level:type_name -> milvus.proto.common.ConsistencyLevel
|
||||||
108, // 12: milvus.proto.messages.AlterCollectionMessageUpdates.properties:type_name -> milvus.proto.common.KeyValuePair
|
110, // 12: milvus.proto.messages.AlterCollectionMessageUpdates.properties:type_name -> milvus.proto.common.KeyValuePair
|
||||||
35, // 13: milvus.proto.messages.AlterCollectionMessageUpdates.alter_load_config:type_name -> milvus.proto.messages.AlterLoadConfigOfAlterCollection
|
35, // 13: milvus.proto.messages.AlterCollectionMessageUpdates.alter_load_config:type_name -> milvus.proto.messages.AlterLoadConfigOfAlterCollection
|
||||||
38, // 14: milvus.proto.messages.AlterLoadConfigMessageHeader.load_fields:type_name -> milvus.proto.messages.LoadFieldConfig
|
38, // 14: milvus.proto.messages.AlterLoadConfigMessageHeader.load_fields:type_name -> milvus.proto.messages.LoadFieldConfig
|
||||||
39, // 15: milvus.proto.messages.AlterLoadConfigMessageHeader.replicas:type_name -> milvus.proto.messages.LoadReplicaConfig
|
39, // 15: milvus.proto.messages.AlterLoadConfigMessageHeader.replicas:type_name -> milvus.proto.messages.LoadReplicaConfig
|
||||||
109, // 16: milvus.proto.messages.LoadReplicaConfig.priority:type_name -> milvus.proto.common.LoadPriority
|
111, // 16: milvus.proto.messages.LoadReplicaConfig.priority:type_name -> milvus.proto.common.LoadPriority
|
||||||
108, // 17: milvus.proto.messages.CreateDatabaseMessageBody.properties:type_name -> milvus.proto.common.KeyValuePair
|
110, // 17: milvus.proto.messages.CreateDatabaseMessageBody.properties:type_name -> milvus.proto.common.KeyValuePair
|
||||||
108, // 18: milvus.proto.messages.AlterDatabaseMessageBody.properties:type_name -> milvus.proto.common.KeyValuePair
|
110, // 18: milvus.proto.messages.AlterDatabaseMessageBody.properties:type_name -> milvus.proto.common.KeyValuePair
|
||||||
46, // 19: milvus.proto.messages.AlterDatabaseMessageBody.alter_load_config:type_name -> milvus.proto.messages.AlterLoadConfigOfAlterDatabase
|
46, // 19: milvus.proto.messages.AlterDatabaseMessageBody.alter_load_config:type_name -> milvus.proto.messages.AlterLoadConfigOfAlterDatabase
|
||||||
110, // 20: milvus.proto.messages.CreateUserMessageHeader.user_entity:type_name -> milvus.proto.milvus.UserEntity
|
112, // 20: milvus.proto.messages.CreateUserMessageHeader.user_entity:type_name -> milvus.proto.milvus.UserEntity
|
||||||
111, // 21: milvus.proto.messages.CreateUserMessageBody.credential_info:type_name -> milvus.proto.internal.CredentialInfo
|
113, // 21: milvus.proto.messages.CreateUserMessageBody.credential_info:type_name -> milvus.proto.internal.CredentialInfo
|
||||||
110, // 22: milvus.proto.messages.AlterUserMessageHeader.user_entity:type_name -> milvus.proto.milvus.UserEntity
|
112, // 22: milvus.proto.messages.AlterUserMessageHeader.user_entity:type_name -> milvus.proto.milvus.UserEntity
|
||||||
111, // 23: milvus.proto.messages.AlterUserMessageBody.credential_info:type_name -> milvus.proto.internal.CredentialInfo
|
113, // 23: milvus.proto.messages.AlterUserMessageBody.credential_info:type_name -> milvus.proto.internal.CredentialInfo
|
||||||
112, // 24: milvus.proto.messages.AlterRoleMessageHeader.role_entity:type_name -> milvus.proto.milvus.RoleEntity
|
114, // 24: milvus.proto.messages.AlterRoleMessageHeader.role_entity:type_name -> milvus.proto.milvus.RoleEntity
|
||||||
110, // 25: milvus.proto.messages.RoleBinding.user_entity:type_name -> milvus.proto.milvus.UserEntity
|
112, // 25: milvus.proto.messages.RoleBinding.user_entity:type_name -> milvus.proto.milvus.UserEntity
|
||||||
112, // 26: milvus.proto.messages.RoleBinding.role_entity:type_name -> milvus.proto.milvus.RoleEntity
|
114, // 26: milvus.proto.messages.RoleBinding.role_entity:type_name -> milvus.proto.milvus.RoleEntity
|
||||||
63, // 27: milvus.proto.messages.AlterUserRoleMessageHeader.role_binding:type_name -> milvus.proto.messages.RoleBinding
|
63, // 27: milvus.proto.messages.AlterUserRoleMessageHeader.role_binding:type_name -> milvus.proto.messages.RoleBinding
|
||||||
63, // 28: milvus.proto.messages.DropUserRoleMessageHeader.role_binding:type_name -> milvus.proto.messages.RoleBinding
|
63, // 28: milvus.proto.messages.DropUserRoleMessageHeader.role_binding:type_name -> milvus.proto.messages.RoleBinding
|
||||||
113, // 29: milvus.proto.messages.RestoreRBACMessageBody.rbac_meta:type_name -> milvus.proto.milvus.RBACMeta
|
115, // 29: milvus.proto.messages.RestoreRBACMessageBody.rbac_meta:type_name -> milvus.proto.milvus.RBACMeta
|
||||||
114, // 30: milvus.proto.messages.AlterPrivilegeMessageHeader.entity:type_name -> milvus.proto.milvus.GrantEntity
|
116, // 30: milvus.proto.messages.AlterPrivilegeMessageHeader.entity:type_name -> milvus.proto.milvus.GrantEntity
|
||||||
114, // 31: milvus.proto.messages.DropPrivilegeMessageHeader.entity:type_name -> milvus.proto.milvus.GrantEntity
|
116, // 31: milvus.proto.messages.DropPrivilegeMessageHeader.entity:type_name -> milvus.proto.milvus.GrantEntity
|
||||||
115, // 32: milvus.proto.messages.AlterPrivilegeGroupMessageHeader.privilege_group_info:type_name -> milvus.proto.milvus.PrivilegeGroupInfo
|
117, // 32: milvus.proto.messages.AlterPrivilegeGroupMessageHeader.privilege_group_info:type_name -> milvus.proto.milvus.PrivilegeGroupInfo
|
||||||
115, // 33: milvus.proto.messages.DropPrivilegeGroupMessageHeader.privilege_group_info:type_name -> milvus.proto.milvus.PrivilegeGroupInfo
|
117, // 33: milvus.proto.messages.DropPrivilegeGroupMessageHeader.privilege_group_info:type_name -> milvus.proto.milvus.PrivilegeGroupInfo
|
||||||
101, // 34: milvus.proto.messages.AlterResourceGroupMessageHeader.resource_group_configs:type_name -> milvus.proto.messages.AlterResourceGroupMessageHeader.ResourceGroupConfigsEntry
|
103, // 34: milvus.proto.messages.AlterResourceGroupMessageHeader.resource_group_configs:type_name -> milvus.proto.messages.AlterResourceGroupMessageHeader.ResourceGroupConfigsEntry
|
||||||
116, // 35: milvus.proto.messages.CreateIndexMessageBody.field_index:type_name -> milvus.proto.index.FieldIndex
|
118, // 35: milvus.proto.messages.CreateIndexMessageBody.field_index:type_name -> milvus.proto.index.FieldIndex
|
||||||
116, // 36: milvus.proto.messages.AlterIndexMessageBody.field_indexes:type_name -> milvus.proto.index.FieldIndex
|
118, // 36: milvus.proto.messages.AlterIndexMessageBody.field_indexes:type_name -> milvus.proto.index.FieldIndex
|
||||||
89, // 37: milvus.proto.messages.CacheExpirations.cache_expirations:type_name -> milvus.proto.messages.CacheExpiration
|
89, // 37: milvus.proto.messages.CacheExpirations.cache_expirations:type_name -> milvus.proto.messages.CacheExpiration
|
||||||
90, // 38: milvus.proto.messages.CacheExpiration.legacy_proxy_collection_meta_cache:type_name -> milvus.proto.messages.LegacyProxyCollectionMetaCache
|
90, // 38: milvus.proto.messages.CacheExpiration.legacy_proxy_collection_meta_cache:type_name -> milvus.proto.messages.LegacyProxyCollectionMetaCache
|
||||||
117, // 39: milvus.proto.messages.LegacyProxyCollectionMetaCache.msg_type:type_name -> milvus.proto.common.MsgType
|
119, // 39: milvus.proto.messages.LegacyProxyCollectionMetaCache.msg_type:type_name -> milvus.proto.common.MsgType
|
||||||
102, // 40: milvus.proto.messages.RMQMessageLayout.properties:type_name -> milvus.proto.messages.RMQMessageLayout.PropertiesEntry
|
104, // 40: milvus.proto.messages.RMQMessageLayout.properties:type_name -> milvus.proto.messages.RMQMessageLayout.PropertiesEntry
|
||||||
98, // 41: milvus.proto.messages.BroadcastHeader.Resource_keys:type_name -> milvus.proto.messages.ResourceKey
|
98, // 41: milvus.proto.messages.BroadcastHeader.Resource_keys:type_name -> milvus.proto.messages.ResourceKey
|
||||||
118, // 42: milvus.proto.messages.ReplicateHeader.message_id:type_name -> milvus.proto.common.MessageID
|
120, // 42: milvus.proto.messages.ReplicateHeader.message_id:type_name -> milvus.proto.common.MessageID
|
||||||
118, // 43: milvus.proto.messages.ReplicateHeader.last_confirmed_message_id:type_name -> milvus.proto.common.MessageID
|
120, // 43: milvus.proto.messages.ReplicateHeader.last_confirmed_message_id:type_name -> milvus.proto.common.MessageID
|
||||||
2, // 44: milvus.proto.messages.ResourceKey.domain:type_name -> milvus.proto.messages.ResourceDomain
|
2, // 44: milvus.proto.messages.ResourceKey.domain:type_name -> milvus.proto.messages.ResourceDomain
|
||||||
119, // 45: milvus.proto.messages.AlterResourceGroupMessageHeader.ResourceGroupConfigsEntry.value:type_name -> milvus.proto.rg.ResourceGroupConfig
|
121, // 45: milvus.proto.messages.AlterResourceGroupMessageHeader.ResourceGroupConfigsEntry.value:type_name -> milvus.proto.rg.ResourceGroupConfig
|
||||||
46, // [46:46] is the sub-list for method output_type
|
46, // [46:46] is the sub-list for method output_type
|
||||||
46, // [46:46] is the sub-list for method input_type
|
46, // [46:46] is the sub-list for method input_type
|
||||||
46, // [46:46] is the sub-list for extension type_name
|
46, // [46:46] is the sub-list for extension type_name
|
||||||
@ -7433,6 +7552,30 @@ func file_messages_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
file_messages_proto_msgTypes[97].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*TruncateCollectionMessageHeader); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_messages_proto_msgTypes[98].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*TruncateCollectionMessageBody); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
file_messages_proto_msgTypes[86].OneofWrappers = []interface{}{
|
file_messages_proto_msgTypes[86].OneofWrappers = []interface{}{
|
||||||
(*CacheExpiration_LegacyProxyCollectionMetaCache)(nil),
|
(*CacheExpiration_LegacyProxyCollectionMetaCache)(nil),
|
||||||
@ -7443,7 +7586,7 @@ func file_messages_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_messages_proto_rawDesc,
|
RawDescriptor: file_messages_proto_rawDesc,
|
||||||
NumEnums: 3,
|
NumEnums: 3,
|
||||||
NumMessages: 100,
|
NumMessages: 102,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -31,6 +31,15 @@ service RootCoord {
|
|||||||
*/
|
*/
|
||||||
rpc DropCollection(milvus.DropCollectionRequest) returns (common.Status) {}
|
rpc DropCollection(milvus.DropCollectionRequest) returns (common.Status) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This method is used to clear a collection.
|
||||||
|
*
|
||||||
|
* @param TruncateCollectionRequest, collection name is going to be cleared.
|
||||||
|
*
|
||||||
|
* @return Status
|
||||||
|
*/
|
||||||
|
rpc TruncateCollection(milvus.TruncateCollectionRequest) returns (milvus.TruncateCollectionResponse) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This method is used to add collection field.
|
* @brief This method is used to add collection field.
|
||||||
*
|
*
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -28,6 +28,7 @@ const (
|
|||||||
RootCoord_GetStatisticsChannel_FullMethodName = "/milvus.proto.rootcoord.RootCoord/GetStatisticsChannel"
|
RootCoord_GetStatisticsChannel_FullMethodName = "/milvus.proto.rootcoord.RootCoord/GetStatisticsChannel"
|
||||||
RootCoord_CreateCollection_FullMethodName = "/milvus.proto.rootcoord.RootCoord/CreateCollection"
|
RootCoord_CreateCollection_FullMethodName = "/milvus.proto.rootcoord.RootCoord/CreateCollection"
|
||||||
RootCoord_DropCollection_FullMethodName = "/milvus.proto.rootcoord.RootCoord/DropCollection"
|
RootCoord_DropCollection_FullMethodName = "/milvus.proto.rootcoord.RootCoord/DropCollection"
|
||||||
|
RootCoord_TruncateCollection_FullMethodName = "/milvus.proto.rootcoord.RootCoord/TruncateCollection"
|
||||||
RootCoord_AddCollectionField_FullMethodName = "/milvus.proto.rootcoord.RootCoord/AddCollectionField"
|
RootCoord_AddCollectionField_FullMethodName = "/milvus.proto.rootcoord.RootCoord/AddCollectionField"
|
||||||
RootCoord_HasCollection_FullMethodName = "/milvus.proto.rootcoord.RootCoord/HasCollection"
|
RootCoord_HasCollection_FullMethodName = "/milvus.proto.rootcoord.RootCoord/HasCollection"
|
||||||
RootCoord_DescribeCollection_FullMethodName = "/milvus.proto.rootcoord.RootCoord/DescribeCollection"
|
RootCoord_DescribeCollection_FullMethodName = "/milvus.proto.rootcoord.RootCoord/DescribeCollection"
|
||||||
@ -108,6 +109,13 @@ type RootCoordClient interface {
|
|||||||
// @return Status
|
// @return Status
|
||||||
DropCollection(ctx context.Context, in *milvuspb.DropCollectionRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
|
DropCollection(ctx context.Context, in *milvuspb.DropCollectionRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
|
||||||
// *
|
// *
|
||||||
|
// @brief This method is used to clear a collection.
|
||||||
|
//
|
||||||
|
// @param TruncateCollectionRequest, collection name is going to be cleared.
|
||||||
|
//
|
||||||
|
// @return Status
|
||||||
|
TruncateCollection(ctx context.Context, in *milvuspb.TruncateCollectionRequest, opts ...grpc.CallOption) (*milvuspb.TruncateCollectionResponse, error)
|
||||||
|
// *
|
||||||
// @brief This method is used to add collection field.
|
// @brief This method is used to add collection field.
|
||||||
//
|
//
|
||||||
// @param AddCollectionFieldRequest, field schema is going to be added.
|
// @param AddCollectionFieldRequest, field schema is going to be added.
|
||||||
@ -262,6 +270,15 @@ func (c *rootCoordClient) DropCollection(ctx context.Context, in *milvuspb.DropC
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *rootCoordClient) TruncateCollection(ctx context.Context, in *milvuspb.TruncateCollectionRequest, opts ...grpc.CallOption) (*milvuspb.TruncateCollectionResponse, error) {
|
||||||
|
out := new(milvuspb.TruncateCollectionResponse)
|
||||||
|
err := c.cc.Invoke(ctx, RootCoord_TruncateCollection_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (c *rootCoordClient) AddCollectionField(ctx context.Context, in *milvuspb.AddCollectionFieldRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
func (c *rootCoordClient) AddCollectionField(ctx context.Context, in *milvuspb.AddCollectionFieldRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
||||||
out := new(commonpb.Status)
|
out := new(commonpb.Status)
|
||||||
err := c.cc.Invoke(ctx, RootCoord_AddCollectionField_FullMethodName, in, out, opts...)
|
err := c.cc.Invoke(ctx, RootCoord_AddCollectionField_FullMethodName, in, out, opts...)
|
||||||
@ -788,6 +805,13 @@ type RootCoordServer interface {
|
|||||||
// @return Status
|
// @return Status
|
||||||
DropCollection(context.Context, *milvuspb.DropCollectionRequest) (*commonpb.Status, error)
|
DropCollection(context.Context, *milvuspb.DropCollectionRequest) (*commonpb.Status, error)
|
||||||
// *
|
// *
|
||||||
|
// @brief This method is used to clear a collection.
|
||||||
|
//
|
||||||
|
// @param TruncateCollectionRequest, collection name is going to be cleared.
|
||||||
|
//
|
||||||
|
// @return Status
|
||||||
|
TruncateCollection(context.Context, *milvuspb.TruncateCollectionRequest) (*milvuspb.TruncateCollectionResponse, error)
|
||||||
|
// *
|
||||||
// @brief This method is used to add collection field.
|
// @brief This method is used to add collection field.
|
||||||
//
|
//
|
||||||
// @param AddCollectionFieldRequest, field schema is going to be added.
|
// @param AddCollectionFieldRequest, field schema is going to be added.
|
||||||
@ -908,6 +932,9 @@ func (UnimplementedRootCoordServer) CreateCollection(context.Context, *milvuspb.
|
|||||||
func (UnimplementedRootCoordServer) DropCollection(context.Context, *milvuspb.DropCollectionRequest) (*commonpb.Status, error) {
|
func (UnimplementedRootCoordServer) DropCollection(context.Context, *milvuspb.DropCollectionRequest) (*commonpb.Status, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method DropCollection not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method DropCollection not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedRootCoordServer) TruncateCollection(context.Context, *milvuspb.TruncateCollectionRequest) (*milvuspb.TruncateCollectionResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method TruncateCollection not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedRootCoordServer) AddCollectionField(context.Context, *milvuspb.AddCollectionFieldRequest) (*commonpb.Status, error) {
|
func (UnimplementedRootCoordServer) AddCollectionField(context.Context, *milvuspb.AddCollectionFieldRequest) (*commonpb.Status, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method AddCollectionField not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method AddCollectionField not implemented")
|
||||||
}
|
}
|
||||||
@ -1178,6 +1205,24 @@ func _RootCoord_DropCollection_Handler(srv interface{}, ctx context.Context, dec
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _RootCoord_TruncateCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(milvuspb.TruncateCollectionRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(RootCoordServer).TruncateCollection(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: RootCoord_TruncateCollection_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(RootCoordServer).TruncateCollection(ctx, req.(*milvuspb.TruncateCollectionRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
func _RootCoord_AddCollectionField_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _RootCoord_AddCollectionField_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(milvuspb.AddCollectionFieldRequest)
|
in := new(milvuspb.AddCollectionFieldRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -2213,6 +2258,10 @@ var RootCoord_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "DropCollection",
|
MethodName: "DropCollection",
|
||||||
Handler: _RootCoord_DropCollection_Handler,
|
Handler: _RootCoord_DropCollection_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "TruncateCollection",
|
||||||
|
Handler: _RootCoord_TruncateCollection_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "AddCollectionField",
|
MethodName: "AddCollectionField",
|
||||||
Handler: _RootCoord_AddCollectionField_Handler,
|
Handler: _RootCoord_AddCollectionField_Handler,
|
||||||
|
|||||||
@ -141,6 +141,8 @@ func fromMessageToTsMsgV2(msg message.ImmutableMessage) (msgstream.TsMsg, error)
|
|||||||
tsMsg, err = NewSchemaChangeMessageBody(msg)
|
tsMsg, err = NewSchemaChangeMessageBody(msg)
|
||||||
case message.MessageTypeAlterCollection:
|
case message.MessageTypeAlterCollection:
|
||||||
tsMsg, err = NewAlterCollectionMessageBody(msg)
|
tsMsg, err = NewAlterCollectionMessageBody(msg)
|
||||||
|
case message.MessageTypeTruncateCollection:
|
||||||
|
tsMsg, err = NewTruncateCollectionMessageBody(msg)
|
||||||
default:
|
default:
|
||||||
panic("unsupported message type")
|
panic("unsupported message type")
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,20 +6,21 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var messageTypeToCommonpbMsgType = map[message.MessageType]commonpb.MsgType{
|
var messageTypeToCommonpbMsgType = map[message.MessageType]commonpb.MsgType{
|
||||||
message.MessageTypeTimeTick: commonpb.MsgType_TimeTick,
|
message.MessageTypeTimeTick: commonpb.MsgType_TimeTick,
|
||||||
message.MessageTypeInsert: commonpb.MsgType_Insert,
|
message.MessageTypeInsert: commonpb.MsgType_Insert,
|
||||||
message.MessageTypeDelete: commonpb.MsgType_Delete,
|
message.MessageTypeDelete: commonpb.MsgType_Delete,
|
||||||
message.MessageTypeFlush: commonpb.MsgType_FlushSegment,
|
message.MessageTypeFlush: commonpb.MsgType_FlushSegment,
|
||||||
message.MessageTypeManualFlush: commonpb.MsgType_ManualFlush,
|
message.MessageTypeManualFlush: commonpb.MsgType_ManualFlush,
|
||||||
message.MessageTypeFlushAll: commonpb.MsgType_FlushAll,
|
message.MessageTypeFlushAll: commonpb.MsgType_FlushAll,
|
||||||
message.MessageTypeCreateSegment: commonpb.MsgType_CreateSegment,
|
message.MessageTypeCreateSegment: commonpb.MsgType_CreateSegment,
|
||||||
message.MessageTypeCreateCollection: commonpb.MsgType_CreateCollection,
|
message.MessageTypeCreateCollection: commonpb.MsgType_CreateCollection,
|
||||||
message.MessageTypeDropCollection: commonpb.MsgType_DropCollection,
|
message.MessageTypeDropCollection: commonpb.MsgType_DropCollection,
|
||||||
message.MessageTypeCreatePartition: commonpb.MsgType_CreatePartition,
|
message.MessageTypeCreatePartition: commonpb.MsgType_CreatePartition,
|
||||||
message.MessageTypeDropPartition: commonpb.MsgType_DropPartition,
|
message.MessageTypeDropPartition: commonpb.MsgType_DropPartition,
|
||||||
message.MessageTypeImport: commonpb.MsgType_Import,
|
message.MessageTypeImport: commonpb.MsgType_Import,
|
||||||
message.MessageTypeSchemaChange: commonpb.MsgType_AddCollectionField, // TODO change to schema change
|
message.MessageTypeSchemaChange: commonpb.MsgType_AddCollectionField, // TODO change to schema change
|
||||||
message.MessageTypeAlterCollection: commonpb.MsgType_AlterCollection,
|
message.MessageTypeAlterCollection: commonpb.MsgType_AlterCollection,
|
||||||
|
message.MessageTypeTruncateCollection: commonpb.MsgType_TruncateCollection,
|
||||||
}
|
}
|
||||||
|
|
||||||
// MustGetCommonpbMsgTypeFromMessageType returns the commonpb.MsgType from message.MessageType.
|
// MustGetCommonpbMsgTypeFromMessageType returns the commonpb.MsgType from message.MessageType.
|
||||||
|
|||||||
@ -201,3 +201,27 @@ func NewAlterCollectionMessageBody(msg message.ImmutableMessage) (msgstream.TsMs
|
|||||||
AlterCollectionMessage: alterCollMsg,
|
AlterCollectionMessage: alterCollMsg,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type TruncateCollectionMessageBody struct {
|
||||||
|
*tsMsgImpl
|
||||||
|
TruncateCollectionMessage message.ImmutableTruncateCollectionMessageV2
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewTruncateCollectionMessageBody(msg message.ImmutableMessage) (msgstream.TsMsg, error) {
|
||||||
|
truncateCollMsg, err := message.AsImmutableTruncateCollectionMessageV2(msg)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &TruncateCollectionMessageBody{
|
||||||
|
tsMsgImpl: &tsMsgImpl{
|
||||||
|
BaseMsg: msgstream.BaseMsg{
|
||||||
|
BeginTimestamp: msg.TimeTick(),
|
||||||
|
EndTimestamp: msg.TimeTick(),
|
||||||
|
},
|
||||||
|
ts: msg.TimeTick(),
|
||||||
|
sz: msg.EstimateSize(),
|
||||||
|
msgType: MustGetCommonpbMsgTypeFromMessageType(msg.MessageType()),
|
||||||
|
},
|
||||||
|
TruncateCollectionMessage: truncateCollMsg,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|||||||
@ -74,6 +74,16 @@
|
|||||||
"Version": 1
|
"Version": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"MessageSpecializedType": {
|
||||||
|
"HeaderType": "messagespb.TruncateCollectionMessageHeader",
|
||||||
|
"BodyType": "messagespb.TruncateCollectionMessageBody"
|
||||||
|
},
|
||||||
|
"MessageTypeWithVersion": {
|
||||||
|
"MessageType": "MessageTypeTruncateCollection",
|
||||||
|
"Version": 2
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"MessageSpecializedType": {
|
"MessageSpecializedType": {
|
||||||
"HeaderType": "messagespb.CreatePartitionMessageHeader",
|
"HeaderType": "messagespb.CreatePartitionMessageHeader",
|
||||||
|
|||||||
@ -118,6 +118,8 @@ func marshalSpecializedHeader(t MessageType, v Version, h string, enc zapcore.Ob
|
|||||||
enc.AddInt64("collectionID", header.GetCollectionId())
|
enc.AddInt64("collectionID", header.GetCollectionId())
|
||||||
case *DropCollectionMessageHeader:
|
case *DropCollectionMessageHeader:
|
||||||
enc.AddInt64("collectionID", header.GetCollectionId())
|
enc.AddInt64("collectionID", header.GetCollectionId())
|
||||||
|
case *TruncateCollectionMessageHeader:
|
||||||
|
enc.AddInt64("collectionID", header.GetCollectionId())
|
||||||
case *CreatePartitionMessageHeader:
|
case *CreatePartitionMessageHeader:
|
||||||
enc.AddInt64("collectionID", header.GetCollectionId())
|
enc.AddInt64("collectionID", header.GetCollectionId())
|
||||||
enc.AddInt64("partitionID", header.GetPartitionId())
|
enc.AddInt64("partitionID", header.GetPartitionId())
|
||||||
|
|||||||
@ -28,6 +28,7 @@ const (
|
|||||||
MessageTypeDelete MessageType = MessageType(messagespb.MessageType_Delete)
|
MessageTypeDelete MessageType = MessageType(messagespb.MessageType_Delete)
|
||||||
MessageTypeCreateCollection MessageType = MessageType(messagespb.MessageType_CreateCollection)
|
MessageTypeCreateCollection MessageType = MessageType(messagespb.MessageType_CreateCollection)
|
||||||
MessageTypeDropCollection MessageType = MessageType(messagespb.MessageType_DropCollection)
|
MessageTypeDropCollection MessageType = MessageType(messagespb.MessageType_DropCollection)
|
||||||
|
MessageTypeTruncateCollection MessageType = MessageType(messagespb.MessageType_TruncateCollection)
|
||||||
MessageTypeCreatePartition MessageType = MessageType(messagespb.MessageType_CreatePartition)
|
MessageTypeCreatePartition MessageType = MessageType(messagespb.MessageType_CreatePartition)
|
||||||
MessageTypeDropPartition MessageType = MessageType(messagespb.MessageType_DropPartition)
|
MessageTypeDropPartition MessageType = MessageType(messagespb.MessageType_DropPartition)
|
||||||
MessageTypeImport MessageType = MessageType(messagespb.MessageType_Import)
|
MessageTypeImport MessageType = MessageType(messagespb.MessageType_Import)
|
||||||
@ -93,6 +94,8 @@ type (
|
|||||||
CreateCollectionRequest = msgpb.CreateCollectionRequest
|
CreateCollectionRequest = msgpb.CreateCollectionRequest
|
||||||
DropCollectionMessageHeader = messagespb.DropCollectionMessageHeader
|
DropCollectionMessageHeader = messagespb.DropCollectionMessageHeader
|
||||||
DropCollectionRequest = msgpb.DropCollectionRequest
|
DropCollectionRequest = msgpb.DropCollectionRequest
|
||||||
|
TruncateCollectionMessageHeader = messagespb.TruncateCollectionMessageHeader
|
||||||
|
TruncateCollectionMessageBody = messagespb.TruncateCollectionMessageBody
|
||||||
CreatePartitionMessageHeader = messagespb.CreatePartitionMessageHeader
|
CreatePartitionMessageHeader = messagespb.CreatePartitionMessageHeader
|
||||||
CreatePartitionRequest = msgpb.CreatePartitionRequest
|
CreatePartitionRequest = msgpb.CreatePartitionRequest
|
||||||
DropPartitionMessageHeader = messagespb.DropPartitionMessageHeader
|
DropPartitionMessageHeader = messagespb.DropPartitionMessageHeader
|
||||||
@ -374,6 +377,47 @@ var MustAsBroadcastDropCollectionMessageV1 = MustAsSpecializedBroadcastMessage[*
|
|||||||
// NewDropCollectionMessageBuilderV1 creates a new message builder for DropCollectionMessageV1
|
// NewDropCollectionMessageBuilderV1 creates a new message builder for DropCollectionMessageV1
|
||||||
var NewDropCollectionMessageBuilderV1 = newMutableMessageBuilder[*DropCollectionMessageHeader, *DropCollectionRequest]
|
var NewDropCollectionMessageBuilderV1 = newMutableMessageBuilder[*DropCollectionMessageHeader, *DropCollectionRequest]
|
||||||
|
|
||||||
|
// Type aliases for TruncateCollectionMessageV2
|
||||||
|
type (
|
||||||
|
MutableTruncateCollectionMessageV2 = specializedMutableMessage[*TruncateCollectionMessageHeader, *TruncateCollectionMessageBody]
|
||||||
|
ImmutableTruncateCollectionMessageV2 = SpecializedImmutableMessage[*TruncateCollectionMessageHeader, *TruncateCollectionMessageBody]
|
||||||
|
BroadcastTruncateCollectionMessageV2 = SpecializedBroadcastMessage[*TruncateCollectionMessageHeader, *TruncateCollectionMessageBody]
|
||||||
|
BroadcastResultTruncateCollectionMessageV2 = BroadcastResult[*TruncateCollectionMessageHeader, *TruncateCollectionMessageBody]
|
||||||
|
)
|
||||||
|
|
||||||
|
// MessageTypeWithVersion for TruncateCollectionMessageV2
|
||||||
|
var MessageTypeTruncateCollectionV2 = MessageTypeWithVersion{
|
||||||
|
MessageType: MessageTypeTruncateCollection,
|
||||||
|
Version: VersionV2,
|
||||||
|
}
|
||||||
|
|
||||||
|
// MessageSpecializedType for TruncateCollectionMessageV2
|
||||||
|
var SpecializedTypeTruncateCollectionV2 = MessageSpecializedType{
|
||||||
|
BodyType: reflect.TypeOf((*TruncateCollectionMessageBody)(nil)),
|
||||||
|
HeaderType: reflect.TypeOf((*TruncateCollectionMessageHeader)(nil)),
|
||||||
|
}
|
||||||
|
|
||||||
|
// AsMutableTruncateCollectionMessageV2 converts a BasicMessage to MutableTruncateCollectionMessageV2
|
||||||
|
var AsMutableTruncateCollectionMessageV2 = asSpecializedMutableMessage[*TruncateCollectionMessageHeader, *TruncateCollectionMessageBody]
|
||||||
|
|
||||||
|
// MustAsMutableTruncateCollectionMessageV2 converts a BasicMessage to MutableTruncateCollectionMessageV2, panics on error
|
||||||
|
var MustAsMutableTruncateCollectionMessageV2 = mustAsSpecializedMutableMessage[*TruncateCollectionMessageHeader, *TruncateCollectionMessageBody]
|
||||||
|
|
||||||
|
// AsImmutableTruncateCollectionMessageV2 converts an ImmutableMessage to ImmutableTruncateCollectionMessageV2
|
||||||
|
var AsImmutableTruncateCollectionMessageV2 = asSpecializedImmutableMessage[*TruncateCollectionMessageHeader, *TruncateCollectionMessageBody]
|
||||||
|
|
||||||
|
// MustAsImmutableTruncateCollectionMessageV2 converts an ImmutableMessage to ImmutableTruncateCollectionMessageV2, panics on error
|
||||||
|
var MustAsImmutableTruncateCollectionMessageV2 = MustAsSpecializedImmutableMessage[*TruncateCollectionMessageHeader, *TruncateCollectionMessageBody]
|
||||||
|
|
||||||
|
// AsBroadcastTruncateCollectionMessageV2 converts a BasicMessage to BroadcastTruncateCollectionMessageV2
|
||||||
|
var AsBroadcastTruncateCollectionMessageV2 = asSpecializedBroadcastMessage[*TruncateCollectionMessageHeader, *TruncateCollectionMessageBody]
|
||||||
|
|
||||||
|
// MustAsBroadcastTruncateCollectionMessageV2 converts a BasicMessage to BroadcastTruncateCollectionMessageV2, panics on error
|
||||||
|
var MustAsBroadcastTruncateCollectionMessageV2 = MustAsSpecializedBroadcastMessage[*TruncateCollectionMessageHeader, *TruncateCollectionMessageBody]
|
||||||
|
|
||||||
|
// NewTruncateCollectionMessageBuilderV2 creates a new message builder for TruncateCollectionMessageV2
|
||||||
|
var NewTruncateCollectionMessageBuilderV2 = newMutableMessageBuilder[*TruncateCollectionMessageHeader, *TruncateCollectionMessageBody]
|
||||||
|
|
||||||
// Type aliases for CreatePartitionMessageV1
|
// Type aliases for CreatePartitionMessageV1
|
||||||
type (
|
type (
|
||||||
MutableCreatePartitionMessageV1 = specializedMutableMessage[*CreatePartitionMessageHeader, *CreatePartitionRequest]
|
MutableCreatePartitionMessageV1 = specializedMutableMessage[*CreatePartitionMessageHeader, *CreatePartitionRequest]
|
||||||
@ -1913,6 +1957,7 @@ var messageTypeMap = map[reflect.Type]MessageType{
|
|||||||
reflect.TypeOf(&messagespb.RollbackTxnMessageHeader{}): MessageTypeRollbackTxn,
|
reflect.TypeOf(&messagespb.RollbackTxnMessageHeader{}): MessageTypeRollbackTxn,
|
||||||
reflect.TypeOf(&messagespb.SchemaChangeMessageHeader{}): MessageTypeSchemaChange,
|
reflect.TypeOf(&messagespb.SchemaChangeMessageHeader{}): MessageTypeSchemaChange,
|
||||||
reflect.TypeOf(&messagespb.TimeTickMessageHeader{}): MessageTypeTimeTick,
|
reflect.TypeOf(&messagespb.TimeTickMessageHeader{}): MessageTypeTimeTick,
|
||||||
|
reflect.TypeOf(&messagespb.TruncateCollectionMessageHeader{}): MessageTypeTruncateCollection,
|
||||||
reflect.TypeOf(&messagespb.TxnMessageHeader{}): MessageTypeTxn,
|
reflect.TypeOf(&messagespb.TxnMessageHeader{}): MessageTypeTxn,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1975,6 +2020,7 @@ var messageTypeVersionSpecializedMap = map[MessageTypeWithVersion]MessageSpecial
|
|||||||
MessageTypeRollbackTxnV2: SpecializedTypeRollbackTxnV2,
|
MessageTypeRollbackTxnV2: SpecializedTypeRollbackTxnV2,
|
||||||
MessageTypeSchemaChangeV2: SpecializedTypeSchemaChangeV2,
|
MessageTypeSchemaChangeV2: SpecializedTypeSchemaChangeV2,
|
||||||
MessageTypeTimeTickV1: SpecializedTypeTimeTickV1,
|
MessageTypeTimeTickV1: SpecializedTypeTimeTickV1,
|
||||||
|
MessageTypeTruncateCollectionV2: SpecializedTypeTruncateCollectionV2,
|
||||||
MessageTypeTxnV2: SpecializedTypeTxnV2,
|
MessageTypeTxnV2: SpecializedTypeTxnV2,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2021,5 +2067,6 @@ var messageSpecializedTypeVersionMap = map[MessageSpecializedType]MessageTypeWit
|
|||||||
SpecializedTypeRollbackTxnV2: MessageTypeRollbackTxnV2,
|
SpecializedTypeRollbackTxnV2: MessageTypeRollbackTxnV2,
|
||||||
SpecializedTypeSchemaChangeV2: MessageTypeSchemaChangeV2,
|
SpecializedTypeSchemaChangeV2: MessageTypeSchemaChangeV2,
|
||||||
SpecializedTypeTimeTickV1: MessageTypeTimeTickV1,
|
SpecializedTypeTimeTickV1: MessageTypeTimeTickV1,
|
||||||
|
SpecializedTypeTruncateCollectionV2: MessageTypeTruncateCollectionV2,
|
||||||
SpecializedTypeTxnV2: MessageTypeTxnV2,
|
SpecializedTypeTxnV2: MessageTypeTxnV2,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,6 +38,7 @@ var exclusiveRequiredMessageType = map[MessageType]struct{}{
|
|||||||
MessageTypeSchemaChange: {},
|
MessageTypeSchemaChange: {},
|
||||||
MessageTypeAlterReplicateConfig: {},
|
MessageTypeAlterReplicateConfig: {},
|
||||||
MessageTypeAlterCollection: {},
|
MessageTypeAlterCollection: {},
|
||||||
|
MessageTypeTruncateCollection: {},
|
||||||
}
|
}
|
||||||
|
|
||||||
// mustAsSpecializedMutableMessage converts a MutableMessage to a specialized MutableMessage.
|
// mustAsSpecializedMutableMessage converts a MutableMessage to a specialized MutableMessage.
|
||||||
|
|||||||
@ -54,7 +54,7 @@ require (
|
|||||||
github.com/kr/pretty v0.3.1 // indirect
|
github.com/kr/pretty v0.3.1 // indirect
|
||||||
github.com/kr/text v0.2.0 // indirect
|
github.com/kr/text v0.2.0 // indirect
|
||||||
github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a // indirect
|
github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a // indirect
|
||||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251210030907-6087c9c0bad6 // indirect
|
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251210064308-0f971c5ee7dc // indirect
|
||||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||||
|
|||||||
@ -332,8 +332,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5
|
|||||||
github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8=
|
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/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/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251210030907-6087c9c0bad6 h1:TeHfsRCdjbX30xS7Npcb+POQXd460+AjmXYmmTuxyBA=
|
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251210064308-0f971c5ee7dc h1:ZbtRmUjs+YIcULnIVPwdmOrLa9rpH58gnsCHyaLhqtw=
|
||||||
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251210030907-6087c9c0bad6/go.mod h1:/6UT4zZl6awVeXLeE7UGDWZvXj3IWkRsh3mqsn0DiAs=
|
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251210064308-0f971c5ee7dc/go.mod h1:/6UT4zZl6awVeXLeE7UGDWZvXj3IWkRsh3mqsn0DiAs=
|
||||||
github.com/milvus-io/milvus/pkg/v2 v2.6.4-0.20251104142533-a2ce70d25256 h1:M2waty0w2k4YT2HHzJk3fx6EFPD4DKxNJatitIV+gGU=
|
github.com/milvus-io/milvus/pkg/v2 v2.6.4-0.20251104142533-a2ce70d25256 h1:M2waty0w2k4YT2HHzJk3fx6EFPD4DKxNJatitIV+gGU=
|
||||||
github.com/milvus-io/milvus/pkg/v2 v2.6.4-0.20251104142533-a2ce70d25256/go.mod h1:HT6Wxahwj/l8+i+D/C3iwDzCjDa36U9gyVw6CjjK4pE=
|
github.com/milvus-io/milvus/pkg/v2 v2.6.4-0.20251104142533-a2ce70d25256/go.mod h1:HT6Wxahwj/l8+i+D/C3iwDzCjDa36U9gyVw6CjjK4pE=
|
||||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user