mirror of https://github.com/milvus-io/milvus.git
Fix channel checkpoint issues and fix GC (#22027)
/kind bug issue: #21897 Signed-off-by: Yuchen Gao <yuchen.gao@zilliz.com>pull/22076/head
parent
8ed2784212
commit
a28b3c28d2
4
Makefile
4
Makefile
|
@ -305,8 +305,4 @@ mock-datacoord:
|
|||
mock-tnx-kv:
|
||||
mockery --name=TxnKV --dir=$(PWD)/internal/kv --output=$(PWD)/internal/kv/mocks --filename=TxnKV.go --with-expecter
|
||||
|
||||
mock-datacoord:
|
||||
mockery --name=DataCoord --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_datacoord.go --with-expecter
|
||||
|
||||
|
||||
ci-ut: build-cpp-with-coverage generated-proto-go-without-cpp codecov-cpp codecov-go
|
||||
|
|
|
@ -242,25 +242,43 @@ func (gc *garbageCollector) clearEtcd() {
|
|||
if !gc.isExpire(segment.GetDroppedAt()) {
|
||||
continue
|
||||
}
|
||||
// segment gc shall only happen when channel cp is after segment dml cp.
|
||||
if segment.GetDmlPosition().GetTimestamp() > channelCPs[segment.GetInsertChannel()] {
|
||||
log.WithRateGroup("GC_FAIL_CP_BEFORE", 1, 60).RatedInfo(60, "dropped segment dml position after channel cp, skip meta gc",
|
||||
zap.Uint64("dmlPosTs", segment.GetDmlPosition().GetTimestamp()),
|
||||
zap.Uint64("channelCpTs", channelCPs[segment.GetInsertChannel()]),
|
||||
)
|
||||
segInsertChannel := segment.GetInsertChannel()
|
||||
// Ignore segments from potentially dropped collection. Check if collection is to be dropped by checking if channel is dropped.
|
||||
// We do this because collection meta drop relies on all segment being GCed.
|
||||
if gc.meta.catalog.ChannelExists(context.Background(), segInsertChannel) &&
|
||||
segment.GetDmlPosition().GetTimestamp() > channelCPs[segInsertChannel] {
|
||||
// segment gc shall only happen when channel cp is after segment dml cp.
|
||||
log.WithRateGroup("GC_FAIL_CP_BEFORE", 1, 60).
|
||||
RatedInfo(60, "dropped segment dml position after channel cp, skip meta gc",
|
||||
zap.Uint64("dmlPosTs", segment.GetDmlPosition().GetTimestamp()),
|
||||
zap.Uint64("channelCpTs", channelCPs[segInsertChannel]),
|
||||
)
|
||||
continue
|
||||
}
|
||||
// For compact A, B -> C, don't GC A or B if C is not indexed,
|
||||
// guarantee replacing A, B with C won't downgrade performance
|
||||
if to, ok := compactTo[segment.GetID()]; ok && !indexedSet.Contain(to.GetID()) {
|
||||
log.WithRateGroup("GC_FAIL_COMPACT_TO_NOT_INDEXED", 1, 60).
|
||||
RatedWarn(60, "skipping GC when compact target segment is not indexed",
|
||||
zap.Int64("segmentID", to.GetID()))
|
||||
continue
|
||||
}
|
||||
logs := getLogs(segment)
|
||||
log.Info("GC segment",
|
||||
zap.Int64("segmentID", segment.GetID()))
|
||||
log.Info("GC segment", zap.Int64("segmentID", segment.GetID()))
|
||||
if gc.removeLogs(logs) {
|
||||
_ = gc.meta.DropSegment(segment.GetID())
|
||||
}
|
||||
if segList := gc.meta.GetSegmentsByChannel(segInsertChannel); len(segList) == 0 &&
|
||||
!gc.meta.catalog.ChannelExists(context.Background(), segInsertChannel) {
|
||||
log.Info("empty channel found during gc, manually cleanup channel checkpoints",
|
||||
zap.String("vChannel", segInsertChannel))
|
||||
|
||||
if err := gc.meta.DropChannelCheckpoint(segInsertChannel); err != nil {
|
||||
log.Warn("failed to drop channel check point during segment garbage collection",
|
||||
zap.Error(err))
|
||||
// Fail-open as there's nothing to do.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -228,10 +228,10 @@ func (h *ServerHandler) getCollectionStartPos(channel *channel) *internalpb.MsgP
|
|||
}
|
||||
|
||||
// GetChannelSeekPosition gets channel seek position from:
|
||||
// 1. Channel checkpoint meta;
|
||||
// 2. Segments earliest dml position;
|
||||
// 3. Collection start position;
|
||||
// And would return if any position is valid.
|
||||
// 1. Channel checkpoint meta;
|
||||
// 2. Segments earliest dml position;
|
||||
// 3. Collection start position;
|
||||
// And would return if any position is valid.
|
||||
func (h *ServerHandler) GetChannelSeekPosition(channel *channel, partitionID UniqueID) *internalpb.MsgPosition {
|
||||
var seekPosition *internalpb.MsgPosition
|
||||
seekPosition = h.s.meta.GetChannelCheckpoint(channel.Name)
|
||||
|
@ -331,7 +331,7 @@ func (h *ServerHandler) CheckShouldDropChannel(channel string) bool {
|
|||
}
|
||||
}
|
||||
return false*/
|
||||
return h.s.meta.catalog.IsChannelDropped(h.s.ctx, channel)
|
||||
return h.s.meta.catalog.ShouldDropChannel(h.s.ctx, channel)
|
||||
}
|
||||
|
||||
// FinishDropChannel cleans up the remove flag for channels
|
||||
|
@ -342,10 +342,7 @@ func (h *ServerHandler) FinishDropChannel(channel string) error {
|
|||
log.Warn("DropChannel failed", zap.String("vChannel", channel), zap.Error(err))
|
||||
return err
|
||||
}
|
||||
err = h.s.meta.DropChannelCheckpoint(channel)
|
||||
if err != nil {
|
||||
log.Warn("DropChannelCheckpoint failed", zap.String("vChannel", channel), zap.Error(err))
|
||||
return err
|
||||
}
|
||||
log.Info("DropChannel succeeded", zap.String("vChannel", channel))
|
||||
// Channel checkpoints are cleaned up during garbage collection.
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -1198,7 +1198,10 @@ func (m *meta) UpdateChannelCheckpoint(vChannel string, pos *internalpb.MsgPosit
|
|||
}
|
||||
m.channelCPs[vChannel] = pos
|
||||
ts, _ := tsoutil.ParseTS(pos.Timestamp)
|
||||
log.Debug("UpdateChannelCheckpoint done", zap.String("vChannel", vChannel), zap.Time("time", ts))
|
||||
log.Debug("UpdateChannelCheckpoint done",
|
||||
zap.String("vChannel", vChannel),
|
||||
zap.Uint64("ts", pos.Timestamp),
|
||||
zap.Time("time", ts))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -1088,6 +1088,12 @@ func (s *Server) WatchChannels(ctx context.Context, req *datapb.WatchChannelsReq
|
|||
resp.Status.Reason = err.Error()
|
||||
return resp, nil
|
||||
}
|
||||
if err := s.meta.catalog.MarkChannelAdded(ctx, ch.Name); err != nil {
|
||||
// TODO: add background task to periodically cleanup the orphaned channel add marks.
|
||||
log.Error("failed to mark channel added", zap.String("channelName", channelName), zap.Error(err))
|
||||
resp.Status.Reason = err.Error()
|
||||
return resp, nil
|
||||
}
|
||||
}
|
||||
resp.Status.ErrorCode = commonpb.ErrorCode_Success
|
||||
|
||||
|
|
|
@ -667,7 +667,8 @@ func (c *ChannelMeta) getChannelCheckpoint(ttPos *internalpb.MsgPosition) *inter
|
|||
zap.Bool("isCurIBEmpty", seg.curInsertBuf == nil),
|
||||
zap.Bool("isCurDBEmpty", seg.curDeleteBuf == nil),
|
||||
zap.Int("len(hisIB)", len(seg.historyInsertBuf)),
|
||||
zap.Int("len(hisDB)", len(seg.historyDeleteBuf)))
|
||||
zap.Int("len(hisDB)", len(seg.historyDeleteBuf)),
|
||||
zap.Any("newChannelCpTs", channelCP.GetTimestamp()))
|
||||
}
|
||||
// 2. if no data in buffer, use the current tt as channelCP
|
||||
if channelCP.MsgID == nil {
|
||||
|
|
|
@ -71,6 +71,12 @@ func (ttn *ttNode) IsValidInMsg(in []Msg) bool {
|
|||
func (ttn *ttNode) Operate(in []Msg) []Msg {
|
||||
fgMsg := in[0].(*flowGraphMsg)
|
||||
if fgMsg.IsCloseMsg() {
|
||||
if len(fgMsg.endPositions) > 0 {
|
||||
log.Info("flowgraph is closing, force update channel CP",
|
||||
zap.Uint64("endTs", fgMsg.endPositions[0].GetTimestamp()),
|
||||
zap.String("channel", fgMsg.endPositions[0].GetChannelName()))
|
||||
ttn.updateChannelCP(fgMsg.endPositions[0])
|
||||
}
|
||||
return in
|
||||
}
|
||||
|
||||
|
@ -106,7 +112,10 @@ func (ttn *ttNode) updateChannelCP(ttPos *internalpb.MsgPosition) {
|
|||
return
|
||||
}
|
||||
|
||||
log.Info("UpdateChannelCheckpoint success", zap.String("channel", ttn.vChannelName), zap.Time("channelCPTs", channelCPTs))
|
||||
log.Info("UpdateChannelCheckpoint success",
|
||||
zap.String("channel", ttn.vChannelName),
|
||||
zap.Uint64("cpTs", channelPos.Timestamp),
|
||||
zap.Time("cpTime", channelCPTs))
|
||||
}
|
||||
|
||||
func newTTNode(config *nodeConfig, dc types.DataCoord) (*ttNode, error) {
|
||||
|
|
|
@ -111,8 +111,10 @@ type DataCoordCatalog interface {
|
|||
DropSegment(ctx context.Context, segment *datapb.SegmentInfo) error
|
||||
RevertAlterSegmentsAndAddNewSegment(ctx context.Context, segments []*datapb.SegmentInfo, removalSegment *datapb.SegmentInfo) error
|
||||
|
||||
MarkChannelAdded(ctx context.Context, channel string) error
|
||||
MarkChannelDeleted(ctx context.Context, channel string) error
|
||||
IsChannelDropped(ctx context.Context, channel string) bool
|
||||
ShouldDropChannel(ctx context.Context, channel string) bool
|
||||
ChannelExists(ctx context.Context, channel string) bool
|
||||
DropChannel(ctx context.Context, channel string) error
|
||||
|
||||
ListChannelCheckpoint(ctx context.Context) (map[string]*internalpb.MsgPosition, error)
|
||||
|
|
|
@ -25,5 +25,6 @@ const (
|
|||
ChannelRemovePrefix = MetaPrefix + "/channel-removal"
|
||||
ChannelCheckpointPrefix = MetaPrefix + "/channel-cp"
|
||||
|
||||
RemoveFlagTomestone = "removed"
|
||||
NonRemoveFlagTomestone = "non-removed"
|
||||
RemoveFlagTomestone = "removed"
|
||||
)
|
||||
|
|
|
@ -460,6 +460,17 @@ func (kc *Catalog) DropSegment(ctx context.Context, segment *datapb.SegmentInfo)
|
|||
return kc.MetaKv.MultiRemove(keys)
|
||||
}
|
||||
|
||||
func (kc *Catalog) MarkChannelAdded(ctx context.Context, channel string) error {
|
||||
key := buildChannelRemovePath(channel)
|
||||
err := kc.MetaKv.Save(key, NonRemoveFlagTomestone)
|
||||
if err != nil {
|
||||
log.Error("failed to mark channel added", zap.String("channel", channel), zap.Error(err))
|
||||
return err
|
||||
}
|
||||
log.Info("NON remove flag tombstone added", zap.String("channel", channel))
|
||||
return nil
|
||||
}
|
||||
|
||||
func (kc *Catalog) MarkChannelDeleted(ctx context.Context, channel string) error {
|
||||
key := buildChannelRemovePath(channel)
|
||||
err := kc.MetaKv.Save(key, RemoveFlagTomestone)
|
||||
|
@ -467,11 +478,11 @@ func (kc *Catalog) MarkChannelDeleted(ctx context.Context, channel string) error
|
|||
log.Error("Failed to mark channel dropped", zap.String("channel", channel), zap.Error(err))
|
||||
return err
|
||||
}
|
||||
|
||||
log.Info("remove flag tombstone added", zap.String("channel", channel))
|
||||
return nil
|
||||
}
|
||||
|
||||
func (kc *Catalog) IsChannelDropped(ctx context.Context, channel string) bool {
|
||||
func (kc *Catalog) ShouldDropChannel(ctx context.Context, channel string) bool {
|
||||
key := buildChannelRemovePath(channel)
|
||||
v, err := kc.MetaKv.Load(key)
|
||||
if err != nil || v != RemoveFlagTomestone {
|
||||
|
@ -480,9 +491,19 @@ func (kc *Catalog) IsChannelDropped(ctx context.Context, channel string) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
func (kc *Catalog) ChannelExists(ctx context.Context, channel string) bool {
|
||||
key := buildChannelRemovePath(channel)
|
||||
v, err := kc.MetaKv.Load(key)
|
||||
if err == nil && v == NonRemoveFlagTomestone {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// DropChannel removes channel remove flag after whole procedure is finished
|
||||
func (kc *Catalog) DropChannel(ctx context.Context, channel string) error {
|
||||
key := buildChannelRemovePath(channel)
|
||||
log.Info("removing channel remove path", zap.String("channel", channel))
|
||||
return kc.MetaKv.Remove(key)
|
||||
}
|
||||
|
||||
|
|
|
@ -723,6 +723,27 @@ func Test_MarkChannelDeleted_SaveError(t *testing.T) {
|
|||
assert.Error(t, err)
|
||||
}
|
||||
|
||||
func Test_MarkChannelAdded_SaveError(t *testing.T) {
|
||||
txn := mocks.NewMetaKv(t)
|
||||
txn.EXPECT().
|
||||
Save(mock.Anything, mock.Anything).
|
||||
Return(errors.New("mock error"))
|
||||
|
||||
catalog := NewCatalog(txn, rootPath, "")
|
||||
err := catalog.MarkChannelAdded(context.TODO(), "test_channel_1")
|
||||
assert.Error(t, err)
|
||||
}
|
||||
|
||||
func Test_ChannelExists_SaveError(t *testing.T) {
|
||||
txn := mocks.NewMetaKv(t)
|
||||
txn.EXPECT().
|
||||
Load(mock.Anything).
|
||||
Return("", errors.New("mock error"))
|
||||
|
||||
catalog := NewCatalog(txn, rootPath, "")
|
||||
assert.False(t, catalog.ChannelExists(context.TODO(), "test_channel_1"))
|
||||
}
|
||||
|
||||
func Test_parseBinlogKey(t *testing.T) {
|
||||
catalog := NewCatalog(nil, "", "")
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by mockery v2.16.0. DO NOT EDIT.
|
||||
// Code generated by mockery v2.15.0. DO NOT EDIT.
|
||||
|
||||
package mocks
|
||||
|
||||
|
@ -44,8 +44,8 @@ type DataCoordCatalog_AddSegment_Call struct {
|
|||
}
|
||||
|
||||
// AddSegment is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - segment *datapb.SegmentInfo
|
||||
// - ctx context.Context
|
||||
// - segment *datapb.SegmentInfo
|
||||
func (_e *DataCoordCatalog_Expecter) AddSegment(ctx interface{}, segment interface{}) *DataCoordCatalog_AddSegment_Call {
|
||||
return &DataCoordCatalog_AddSegment_Call{Call: _e.mock.On("AddSegment", ctx, segment)}
|
||||
}
|
||||
|
@ -82,9 +82,9 @@ type DataCoordCatalog_AlterSegment_Call struct {
|
|||
}
|
||||
|
||||
// AlterSegment is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - newSegment *datapb.SegmentInfo
|
||||
// - oldSegment *datapb.SegmentInfo
|
||||
// - ctx context.Context
|
||||
// - newSegment *datapb.SegmentInfo
|
||||
// - oldSegment *datapb.SegmentInfo
|
||||
func (_e *DataCoordCatalog_Expecter) AlterSegment(ctx interface{}, newSegment interface{}, oldSegment interface{}) *DataCoordCatalog_AlterSegment_Call {
|
||||
return &DataCoordCatalog_AlterSegment_Call{Call: _e.mock.On("AlterSegment", ctx, newSegment, oldSegment)}
|
||||
}
|
||||
|
@ -121,8 +121,8 @@ type DataCoordCatalog_AlterSegments_Call struct {
|
|||
}
|
||||
|
||||
// AlterSegments is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - newSegments []*datapb.SegmentInfo
|
||||
// - ctx context.Context
|
||||
// - newSegments []*datapb.SegmentInfo
|
||||
func (_e *DataCoordCatalog_Expecter) AlterSegments(ctx interface{}, newSegments interface{}) *DataCoordCatalog_AlterSegments_Call {
|
||||
return &DataCoordCatalog_AlterSegments_Call{Call: _e.mock.On("AlterSegments", ctx, newSegments)}
|
||||
}
|
||||
|
@ -159,9 +159,9 @@ type DataCoordCatalog_AlterSegmentsAndAddNewSegment_Call struct {
|
|||
}
|
||||
|
||||
// AlterSegmentsAndAddNewSegment is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - segments []*datapb.SegmentInfo
|
||||
// - newSegment *datapb.SegmentInfo
|
||||
// - ctx context.Context
|
||||
// - segments []*datapb.SegmentInfo
|
||||
// - newSegment *datapb.SegmentInfo
|
||||
func (_e *DataCoordCatalog_Expecter) AlterSegmentsAndAddNewSegment(ctx interface{}, segments interface{}, newSegment interface{}) *DataCoordCatalog_AlterSegmentsAndAddNewSegment_Call {
|
||||
return &DataCoordCatalog_AlterSegmentsAndAddNewSegment_Call{Call: _e.mock.On("AlterSegmentsAndAddNewSegment", ctx, segments, newSegment)}
|
||||
}
|
||||
|
@ -178,6 +178,44 @@ func (_c *DataCoordCatalog_AlterSegmentsAndAddNewSegment_Call) Return(_a0 error)
|
|||
return _c
|
||||
}
|
||||
|
||||
// ChannelExists provides a mock function with given fields: ctx, channel
|
||||
func (_m *DataCoordCatalog) ChannelExists(ctx context.Context, channel string) bool {
|
||||
ret := _m.Called(ctx, channel)
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok {
|
||||
r0 = rf(ctx, channel)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// DataCoordCatalog_ChannelExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChannelExists'
|
||||
type DataCoordCatalog_ChannelExists_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// ChannelExists is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - channel string
|
||||
func (_e *DataCoordCatalog_Expecter) ChannelExists(ctx interface{}, channel interface{}) *DataCoordCatalog_ChannelExists_Call {
|
||||
return &DataCoordCatalog_ChannelExists_Call{Call: _e.mock.On("ChannelExists", ctx, channel)}
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_ChannelExists_Call) Run(run func(ctx context.Context, channel string)) *DataCoordCatalog_ChannelExists_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(string))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_ChannelExists_Call) Return(_a0 bool) *DataCoordCatalog_ChannelExists_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
// DropChannel provides a mock function with given fields: ctx, channel
|
||||
func (_m *DataCoordCatalog) DropChannel(ctx context.Context, channel string) error {
|
||||
ret := _m.Called(ctx, channel)
|
||||
|
@ -198,8 +236,8 @@ type DataCoordCatalog_DropChannel_Call struct {
|
|||
}
|
||||
|
||||
// DropChannel is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - channel string
|
||||
// - ctx context.Context
|
||||
// - channel string
|
||||
func (_e *DataCoordCatalog_Expecter) DropChannel(ctx interface{}, channel interface{}) *DataCoordCatalog_DropChannel_Call {
|
||||
return &DataCoordCatalog_DropChannel_Call{Call: _e.mock.On("DropChannel", ctx, channel)}
|
||||
}
|
||||
|
@ -236,8 +274,8 @@ type DataCoordCatalog_DropChannelCheckpoint_Call struct {
|
|||
}
|
||||
|
||||
// DropChannelCheckpoint is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - vChannel string
|
||||
// - ctx context.Context
|
||||
// - vChannel string
|
||||
func (_e *DataCoordCatalog_Expecter) DropChannelCheckpoint(ctx interface{}, vChannel interface{}) *DataCoordCatalog_DropChannelCheckpoint_Call {
|
||||
return &DataCoordCatalog_DropChannelCheckpoint_Call{Call: _e.mock.On("DropChannelCheckpoint", ctx, vChannel)}
|
||||
}
|
||||
|
@ -274,8 +312,8 @@ type DataCoordCatalog_DropSegment_Call struct {
|
|||
}
|
||||
|
||||
// DropSegment is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - segment *datapb.SegmentInfo
|
||||
// - ctx context.Context
|
||||
// - segment *datapb.SegmentInfo
|
||||
func (_e *DataCoordCatalog_Expecter) DropSegment(ctx interface{}, segment interface{}) *DataCoordCatalog_DropSegment_Call {
|
||||
return &DataCoordCatalog_DropSegment_Call{Call: _e.mock.On("DropSegment", ctx, segment)}
|
||||
}
|
||||
|
@ -312,9 +350,9 @@ type DataCoordCatalog_GcConfirm_Call struct {
|
|||
}
|
||||
|
||||
// GcConfirm is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - collectionID int64
|
||||
// - partitionID int64
|
||||
// - ctx context.Context
|
||||
// - collectionID int64
|
||||
// - partitionID int64
|
||||
func (_e *DataCoordCatalog_Expecter) GcConfirm(ctx interface{}, collectionID interface{}, partitionID interface{}) *DataCoordCatalog_GcConfirm_Call {
|
||||
return &DataCoordCatalog_GcConfirm_Call{Call: _e.mock.On("GcConfirm", ctx, collectionID, partitionID)}
|
||||
}
|
||||
|
@ -331,44 +369,6 @@ func (_c *DataCoordCatalog_GcConfirm_Call) Return(_a0 bool) *DataCoordCatalog_Gc
|
|||
return _c
|
||||
}
|
||||
|
||||
// IsChannelDropped provides a mock function with given fields: ctx, channel
|
||||
func (_m *DataCoordCatalog) IsChannelDropped(ctx context.Context, channel string) bool {
|
||||
ret := _m.Called(ctx, channel)
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok {
|
||||
r0 = rf(ctx, channel)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// DataCoordCatalog_IsChannelDropped_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsChannelDropped'
|
||||
type DataCoordCatalog_IsChannelDropped_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// IsChannelDropped is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - channel string
|
||||
func (_e *DataCoordCatalog_Expecter) IsChannelDropped(ctx interface{}, channel interface{}) *DataCoordCatalog_IsChannelDropped_Call {
|
||||
return &DataCoordCatalog_IsChannelDropped_Call{Call: _e.mock.On("IsChannelDropped", ctx, channel)}
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_IsChannelDropped_Call) Run(run func(ctx context.Context, channel string)) *DataCoordCatalog_IsChannelDropped_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(string))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_IsChannelDropped_Call) Return(_a0 bool) *DataCoordCatalog_IsChannelDropped_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
// ListChannelCheckpoint provides a mock function with given fields: ctx
|
||||
func (_m *DataCoordCatalog) ListChannelCheckpoint(ctx context.Context) (map[string]*internalpb.MsgPosition, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
@ -398,7 +398,7 @@ type DataCoordCatalog_ListChannelCheckpoint_Call struct {
|
|||
}
|
||||
|
||||
// ListChannelCheckpoint is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - ctx context.Context
|
||||
func (_e *DataCoordCatalog_Expecter) ListChannelCheckpoint(ctx interface{}) *DataCoordCatalog_ListChannelCheckpoint_Call {
|
||||
return &DataCoordCatalog_ListChannelCheckpoint_Call{Call: _e.mock.On("ListChannelCheckpoint", ctx)}
|
||||
}
|
||||
|
@ -444,7 +444,7 @@ type DataCoordCatalog_ListSegments_Call struct {
|
|||
}
|
||||
|
||||
// ListSegments is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - ctx context.Context
|
||||
func (_e *DataCoordCatalog_Expecter) ListSegments(ctx interface{}) *DataCoordCatalog_ListSegments_Call {
|
||||
return &DataCoordCatalog_ListSegments_Call{Call: _e.mock.On("ListSegments", ctx)}
|
||||
}
|
||||
|
@ -461,6 +461,44 @@ func (_c *DataCoordCatalog_ListSegments_Call) Return(_a0 []*datapb.SegmentInfo,
|
|||
return _c
|
||||
}
|
||||
|
||||
// MarkChannelAdded provides a mock function with given fields: ctx, channel
|
||||
func (_m *DataCoordCatalog) MarkChannelAdded(ctx context.Context, channel string) error {
|
||||
ret := _m.Called(ctx, channel)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
||||
r0 = rf(ctx, channel)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// DataCoordCatalog_MarkChannelAdded_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarkChannelAdded'
|
||||
type DataCoordCatalog_MarkChannelAdded_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// MarkChannelAdded is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - channel string
|
||||
func (_e *DataCoordCatalog_Expecter) MarkChannelAdded(ctx interface{}, channel interface{}) *DataCoordCatalog_MarkChannelAdded_Call {
|
||||
return &DataCoordCatalog_MarkChannelAdded_Call{Call: _e.mock.On("MarkChannelAdded", ctx, channel)}
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_MarkChannelAdded_Call) Run(run func(ctx context.Context, channel string)) *DataCoordCatalog_MarkChannelAdded_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(string))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_MarkChannelAdded_Call) Return(_a0 error) *DataCoordCatalog_MarkChannelAdded_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
// MarkChannelDeleted provides a mock function with given fields: ctx, channel
|
||||
func (_m *DataCoordCatalog) MarkChannelDeleted(ctx context.Context, channel string) error {
|
||||
ret := _m.Called(ctx, channel)
|
||||
|
@ -481,8 +519,8 @@ type DataCoordCatalog_MarkChannelDeleted_Call struct {
|
|||
}
|
||||
|
||||
// MarkChannelDeleted is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - channel string
|
||||
// - ctx context.Context
|
||||
// - channel string
|
||||
func (_e *DataCoordCatalog_Expecter) MarkChannelDeleted(ctx interface{}, channel interface{}) *DataCoordCatalog_MarkChannelDeleted_Call {
|
||||
return &DataCoordCatalog_MarkChannelDeleted_Call{Call: _e.mock.On("MarkChannelDeleted", ctx, channel)}
|
||||
}
|
||||
|
@ -519,9 +557,9 @@ type DataCoordCatalog_RevertAlterSegmentsAndAddNewSegment_Call struct {
|
|||
}
|
||||
|
||||
// RevertAlterSegmentsAndAddNewSegment is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - segments []*datapb.SegmentInfo
|
||||
// - removalSegment *datapb.SegmentInfo
|
||||
// - ctx context.Context
|
||||
// - segments []*datapb.SegmentInfo
|
||||
// - removalSegment *datapb.SegmentInfo
|
||||
func (_e *DataCoordCatalog_Expecter) RevertAlterSegmentsAndAddNewSegment(ctx interface{}, segments interface{}, removalSegment interface{}) *DataCoordCatalog_RevertAlterSegmentsAndAddNewSegment_Call {
|
||||
return &DataCoordCatalog_RevertAlterSegmentsAndAddNewSegment_Call{Call: _e.mock.On("RevertAlterSegmentsAndAddNewSegment", ctx, segments, removalSegment)}
|
||||
}
|
||||
|
@ -558,9 +596,9 @@ type DataCoordCatalog_SaveChannelCheckpoint_Call struct {
|
|||
}
|
||||
|
||||
// SaveChannelCheckpoint is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - vChannel string
|
||||
// - pos *internalpb.MsgPosition
|
||||
// - ctx context.Context
|
||||
// - vChannel string
|
||||
// - pos *internalpb.MsgPosition
|
||||
func (_e *DataCoordCatalog_Expecter) SaveChannelCheckpoint(ctx interface{}, vChannel interface{}, pos interface{}) *DataCoordCatalog_SaveChannelCheckpoint_Call {
|
||||
return &DataCoordCatalog_SaveChannelCheckpoint_Call{Call: _e.mock.On("SaveChannelCheckpoint", ctx, vChannel, pos)}
|
||||
}
|
||||
|
@ -597,8 +635,8 @@ type DataCoordCatalog_SaveDroppedSegmentsInBatch_Call struct {
|
|||
}
|
||||
|
||||
// SaveDroppedSegmentsInBatch is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - segments []*datapb.SegmentInfo
|
||||
// - ctx context.Context
|
||||
// - segments []*datapb.SegmentInfo
|
||||
func (_e *DataCoordCatalog_Expecter) SaveDroppedSegmentsInBatch(ctx interface{}, segments interface{}) *DataCoordCatalog_SaveDroppedSegmentsInBatch_Call {
|
||||
return &DataCoordCatalog_SaveDroppedSegmentsInBatch_Call{Call: _e.mock.On("SaveDroppedSegmentsInBatch", ctx, segments)}
|
||||
}
|
||||
|
@ -615,6 +653,44 @@ func (_c *DataCoordCatalog_SaveDroppedSegmentsInBatch_Call) Return(_a0 error) *D
|
|||
return _c
|
||||
}
|
||||
|
||||
// ShouldDropChannel provides a mock function with given fields: ctx, channel
|
||||
func (_m *DataCoordCatalog) ShouldDropChannel(ctx context.Context, channel string) bool {
|
||||
ret := _m.Called(ctx, channel)
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok {
|
||||
r0 = rf(ctx, channel)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// DataCoordCatalog_ShouldDropChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShouldDropChannel'
|
||||
type DataCoordCatalog_ShouldDropChannel_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// ShouldDropChannel is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - channel string
|
||||
func (_e *DataCoordCatalog_Expecter) ShouldDropChannel(ctx interface{}, channel interface{}) *DataCoordCatalog_ShouldDropChannel_Call {
|
||||
return &DataCoordCatalog_ShouldDropChannel_Call{Call: _e.mock.On("ShouldDropChannel", ctx, channel)}
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_ShouldDropChannel_Call) Run(run func(ctx context.Context, channel string)) *DataCoordCatalog_ShouldDropChannel_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(string))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_ShouldDropChannel_Call) Return(_a0 bool) *DataCoordCatalog_ShouldDropChannel_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewDataCoordCatalog interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by mockery v2.16.0. DO NOT EDIT.
|
||||
// Code generated by mockery v2.15.0. DO NOT EDIT.
|
||||
|
||||
package mocks
|
||||
|
||||
|
@ -58,8 +58,8 @@ type DataCoord_AcquireSegmentLock_Call struct {
|
|||
}
|
||||
|
||||
// AcquireSegmentLock is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.AcquireSegmentLockRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.AcquireSegmentLockRequest
|
||||
func (_e *DataCoord_Expecter) AcquireSegmentLock(ctx interface{}, req interface{}) *DataCoord_AcquireSegmentLock_Call {
|
||||
return &DataCoord_AcquireSegmentLock_Call{Call: _e.mock.On("AcquireSegmentLock", ctx, req)}
|
||||
}
|
||||
|
@ -105,8 +105,8 @@ type DataCoord_AssignSegmentID_Call struct {
|
|||
}
|
||||
|
||||
// AssignSegmentID is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.AssignSegmentIDRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.AssignSegmentIDRequest
|
||||
func (_e *DataCoord_Expecter) AssignSegmentID(ctx interface{}, req interface{}) *DataCoord_AssignSegmentID_Call {
|
||||
return &DataCoord_AssignSegmentID_Call{Call: _e.mock.On("AssignSegmentID", ctx, req)}
|
||||
}
|
||||
|
@ -152,8 +152,8 @@ type DataCoord_BroadcastAlteredCollection_Call struct {
|
|||
}
|
||||
|
||||
// BroadcastAlteredCollection is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.AlterCollectionRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.AlterCollectionRequest
|
||||
func (_e *DataCoord_Expecter) BroadcastAlteredCollection(ctx interface{}, req interface{}) *DataCoord_BroadcastAlteredCollection_Call {
|
||||
return &DataCoord_BroadcastAlteredCollection_Call{Call: _e.mock.On("BroadcastAlteredCollection", ctx, req)}
|
||||
}
|
||||
|
@ -199,8 +199,8 @@ type DataCoord_CheckHealth_Call struct {
|
|||
}
|
||||
|
||||
// CheckHealth is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *milvuspb.CheckHealthRequest
|
||||
// - ctx context.Context
|
||||
// - req *milvuspb.CheckHealthRequest
|
||||
func (_e *DataCoord_Expecter) CheckHealth(ctx interface{}, req interface{}) *DataCoord_CheckHealth_Call {
|
||||
return &DataCoord_CheckHealth_Call{Call: _e.mock.On("CheckHealth", ctx, req)}
|
||||
}
|
||||
|
@ -246,8 +246,8 @@ type DataCoord_DropVirtualChannel_Call struct {
|
|||
}
|
||||
|
||||
// DropVirtualChannel is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.DropVirtualChannelRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.DropVirtualChannelRequest
|
||||
func (_e *DataCoord_Expecter) DropVirtualChannel(ctx interface{}, req interface{}) *DataCoord_DropVirtualChannel_Call {
|
||||
return &DataCoord_DropVirtualChannel_Call{Call: _e.mock.On("DropVirtualChannel", ctx, req)}
|
||||
}
|
||||
|
@ -293,8 +293,8 @@ type DataCoord_Flush_Call struct {
|
|||
}
|
||||
|
||||
// Flush is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.FlushRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.FlushRequest
|
||||
func (_e *DataCoord_Expecter) Flush(ctx interface{}, req interface{}) *DataCoord_Flush_Call {
|
||||
return &DataCoord_Flush_Call{Call: _e.mock.On("Flush", ctx, req)}
|
||||
}
|
||||
|
@ -340,8 +340,8 @@ type DataCoord_GcConfirm_Call struct {
|
|||
}
|
||||
|
||||
// GcConfirm is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - request *datapb.GcConfirmRequest
|
||||
// - ctx context.Context
|
||||
// - request *datapb.GcConfirmRequest
|
||||
func (_e *DataCoord_Expecter) GcConfirm(ctx interface{}, request interface{}) *DataCoord_GcConfirm_Call {
|
||||
return &DataCoord_GcConfirm_Call{Call: _e.mock.On("GcConfirm", ctx, request)}
|
||||
}
|
||||
|
@ -387,8 +387,8 @@ type DataCoord_GetCollectionStatistics_Call struct {
|
|||
}
|
||||
|
||||
// GetCollectionStatistics is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.GetCollectionStatisticsRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.GetCollectionStatisticsRequest
|
||||
func (_e *DataCoord_Expecter) GetCollectionStatistics(ctx interface{}, req interface{}) *DataCoord_GetCollectionStatistics_Call {
|
||||
return &DataCoord_GetCollectionStatistics_Call{Call: _e.mock.On("GetCollectionStatistics", ctx, req)}
|
||||
}
|
||||
|
@ -434,8 +434,8 @@ type DataCoord_GetCompactionState_Call struct {
|
|||
}
|
||||
|
||||
// GetCompactionState is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *milvuspb.GetCompactionStateRequest
|
||||
// - ctx context.Context
|
||||
// - req *milvuspb.GetCompactionStateRequest
|
||||
func (_e *DataCoord_Expecter) GetCompactionState(ctx interface{}, req interface{}) *DataCoord_GetCompactionState_Call {
|
||||
return &DataCoord_GetCompactionState_Call{Call: _e.mock.On("GetCompactionState", ctx, req)}
|
||||
}
|
||||
|
@ -481,8 +481,8 @@ type DataCoord_GetCompactionStateWithPlans_Call struct {
|
|||
}
|
||||
|
||||
// GetCompactionStateWithPlans is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *milvuspb.GetCompactionPlansRequest
|
||||
// - ctx context.Context
|
||||
// - req *milvuspb.GetCompactionPlansRequest
|
||||
func (_e *DataCoord_Expecter) GetCompactionStateWithPlans(ctx interface{}, req interface{}) *DataCoord_GetCompactionStateWithPlans_Call {
|
||||
return &DataCoord_GetCompactionStateWithPlans_Call{Call: _e.mock.On("GetCompactionStateWithPlans", ctx, req)}
|
||||
}
|
||||
|
@ -528,7 +528,7 @@ type DataCoord_GetComponentStates_Call struct {
|
|||
}
|
||||
|
||||
// GetComponentStates is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - ctx context.Context
|
||||
func (_e *DataCoord_Expecter) GetComponentStates(ctx interface{}) *DataCoord_GetComponentStates_Call {
|
||||
return &DataCoord_GetComponentStates_Call{Call: _e.mock.On("GetComponentStates", ctx)}
|
||||
}
|
||||
|
@ -574,8 +574,8 @@ type DataCoord_GetFlushState_Call struct {
|
|||
}
|
||||
|
||||
// GetFlushState is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *milvuspb.GetFlushStateRequest
|
||||
// - ctx context.Context
|
||||
// - req *milvuspb.GetFlushStateRequest
|
||||
func (_e *DataCoord_Expecter) GetFlushState(ctx interface{}, req interface{}) *DataCoord_GetFlushState_Call {
|
||||
return &DataCoord_GetFlushState_Call{Call: _e.mock.On("GetFlushState", ctx, req)}
|
||||
}
|
||||
|
@ -621,8 +621,8 @@ type DataCoord_GetFlushedSegments_Call struct {
|
|||
}
|
||||
|
||||
// GetFlushedSegments is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.GetFlushedSegmentsRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.GetFlushedSegmentsRequest
|
||||
func (_e *DataCoord_Expecter) GetFlushedSegments(ctx interface{}, req interface{}) *DataCoord_GetFlushedSegments_Call {
|
||||
return &DataCoord_GetFlushedSegments_Call{Call: _e.mock.On("GetFlushedSegments", ctx, req)}
|
||||
}
|
||||
|
@ -668,8 +668,8 @@ type DataCoord_GetInsertBinlogPaths_Call struct {
|
|||
}
|
||||
|
||||
// GetInsertBinlogPaths is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.GetInsertBinlogPathsRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.GetInsertBinlogPathsRequest
|
||||
func (_e *DataCoord_Expecter) GetInsertBinlogPaths(ctx interface{}, req interface{}) *DataCoord_GetInsertBinlogPaths_Call {
|
||||
return &DataCoord_GetInsertBinlogPaths_Call{Call: _e.mock.On("GetInsertBinlogPaths", ctx, req)}
|
||||
}
|
||||
|
@ -715,8 +715,8 @@ type DataCoord_GetMetrics_Call struct {
|
|||
}
|
||||
|
||||
// GetMetrics is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *milvuspb.GetMetricsRequest
|
||||
// - ctx context.Context
|
||||
// - req *milvuspb.GetMetricsRequest
|
||||
func (_e *DataCoord_Expecter) GetMetrics(ctx interface{}, req interface{}) *DataCoord_GetMetrics_Call {
|
||||
return &DataCoord_GetMetrics_Call{Call: _e.mock.On("GetMetrics", ctx, req)}
|
||||
}
|
||||
|
@ -762,8 +762,8 @@ type DataCoord_GetPartitionStatistics_Call struct {
|
|||
}
|
||||
|
||||
// GetPartitionStatistics is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.GetPartitionStatisticsRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.GetPartitionStatisticsRequest
|
||||
func (_e *DataCoord_Expecter) GetPartitionStatistics(ctx interface{}, req interface{}) *DataCoord_GetPartitionStatistics_Call {
|
||||
return &DataCoord_GetPartitionStatistics_Call{Call: _e.mock.On("GetPartitionStatistics", ctx, req)}
|
||||
}
|
||||
|
@ -809,8 +809,8 @@ type DataCoord_GetRecoveryInfo_Call struct {
|
|||
}
|
||||
|
||||
// GetRecoveryInfo is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.GetRecoveryInfoRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.GetRecoveryInfoRequest
|
||||
func (_e *DataCoord_Expecter) GetRecoveryInfo(ctx interface{}, req interface{}) *DataCoord_GetRecoveryInfo_Call {
|
||||
return &DataCoord_GetRecoveryInfo_Call{Call: _e.mock.On("GetRecoveryInfo", ctx, req)}
|
||||
}
|
||||
|
@ -856,8 +856,8 @@ type DataCoord_GetSegmentInfo_Call struct {
|
|||
}
|
||||
|
||||
// GetSegmentInfo is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.GetSegmentInfoRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.GetSegmentInfoRequest
|
||||
func (_e *DataCoord_Expecter) GetSegmentInfo(ctx interface{}, req interface{}) *DataCoord_GetSegmentInfo_Call {
|
||||
return &DataCoord_GetSegmentInfo_Call{Call: _e.mock.On("GetSegmentInfo", ctx, req)}
|
||||
}
|
||||
|
@ -903,7 +903,7 @@ type DataCoord_GetSegmentInfoChannel_Call struct {
|
|||
}
|
||||
|
||||
// GetSegmentInfoChannel is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - ctx context.Context
|
||||
func (_e *DataCoord_Expecter) GetSegmentInfoChannel(ctx interface{}) *DataCoord_GetSegmentInfoChannel_Call {
|
||||
return &DataCoord_GetSegmentInfoChannel_Call{Call: _e.mock.On("GetSegmentInfoChannel", ctx)}
|
||||
}
|
||||
|
@ -949,8 +949,8 @@ type DataCoord_GetSegmentStates_Call struct {
|
|||
}
|
||||
|
||||
// GetSegmentStates is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.GetSegmentStatesRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.GetSegmentStatesRequest
|
||||
func (_e *DataCoord_Expecter) GetSegmentStates(ctx interface{}, req interface{}) *DataCoord_GetSegmentStates_Call {
|
||||
return &DataCoord_GetSegmentStates_Call{Call: _e.mock.On("GetSegmentStates", ctx, req)}
|
||||
}
|
||||
|
@ -996,8 +996,8 @@ type DataCoord_GetSegmentsByStates_Call struct {
|
|||
}
|
||||
|
||||
// GetSegmentsByStates is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.GetSegmentsByStatesRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.GetSegmentsByStatesRequest
|
||||
func (_e *DataCoord_Expecter) GetSegmentsByStates(ctx interface{}, req interface{}) *DataCoord_GetSegmentsByStates_Call {
|
||||
return &DataCoord_GetSegmentsByStates_Call{Call: _e.mock.On("GetSegmentsByStates", ctx, req)}
|
||||
}
|
||||
|
@ -1043,7 +1043,7 @@ type DataCoord_GetStatisticsChannel_Call struct {
|
|||
}
|
||||
|
||||
// GetStatisticsChannel is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - ctx context.Context
|
||||
func (_e *DataCoord_Expecter) GetStatisticsChannel(ctx interface{}) *DataCoord_GetStatisticsChannel_Call {
|
||||
return &DataCoord_GetStatisticsChannel_Call{Call: _e.mock.On("GetStatisticsChannel", ctx)}
|
||||
}
|
||||
|
@ -1089,7 +1089,7 @@ type DataCoord_GetTimeTickChannel_Call struct {
|
|||
}
|
||||
|
||||
// GetTimeTickChannel is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - ctx context.Context
|
||||
func (_e *DataCoord_Expecter) GetTimeTickChannel(ctx interface{}) *DataCoord_GetTimeTickChannel_Call {
|
||||
return &DataCoord_GetTimeTickChannel_Call{Call: _e.mock.On("GetTimeTickChannel", ctx)}
|
||||
}
|
||||
|
@ -1135,8 +1135,8 @@ type DataCoord_Import_Call struct {
|
|||
}
|
||||
|
||||
// Import is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.ImportTaskRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.ImportTaskRequest
|
||||
func (_e *DataCoord_Expecter) Import(ctx interface{}, req interface{}) *DataCoord_Import_Call {
|
||||
return &DataCoord_Import_Call{Call: _e.mock.On("Import", ctx, req)}
|
||||
}
|
||||
|
@ -1218,8 +1218,8 @@ type DataCoord_ManualCompaction_Call struct {
|
|||
}
|
||||
|
||||
// ManualCompaction is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *milvuspb.ManualCompactionRequest
|
||||
// - ctx context.Context
|
||||
// - req *milvuspb.ManualCompactionRequest
|
||||
func (_e *DataCoord_Expecter) ManualCompaction(ctx interface{}, req interface{}) *DataCoord_ManualCompaction_Call {
|
||||
return &DataCoord_ManualCompaction_Call{Call: _e.mock.On("ManualCompaction", ctx, req)}
|
||||
}
|
||||
|
@ -1265,8 +1265,8 @@ type DataCoord_MarkSegmentsDropped_Call struct {
|
|||
}
|
||||
|
||||
// MarkSegmentsDropped is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.MarkSegmentsDroppedRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.MarkSegmentsDroppedRequest
|
||||
func (_e *DataCoord_Expecter) MarkSegmentsDropped(ctx interface{}, req interface{}) *DataCoord_MarkSegmentsDropped_Call {
|
||||
return &DataCoord_MarkSegmentsDropped_Call{Call: _e.mock.On("MarkSegmentsDropped", ctx, req)}
|
||||
}
|
||||
|
@ -1348,8 +1348,8 @@ type DataCoord_ReleaseSegmentLock_Call struct {
|
|||
}
|
||||
|
||||
// ReleaseSegmentLock is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.ReleaseSegmentLockRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.ReleaseSegmentLockRequest
|
||||
func (_e *DataCoord_Expecter) ReleaseSegmentLock(ctx interface{}, req interface{}) *DataCoord_ReleaseSegmentLock_Call {
|
||||
return &DataCoord_ReleaseSegmentLock_Call{Call: _e.mock.On("ReleaseSegmentLock", ctx, req)}
|
||||
}
|
||||
|
@ -1395,8 +1395,8 @@ type DataCoord_SaveBinlogPaths_Call struct {
|
|||
}
|
||||
|
||||
// SaveBinlogPaths is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.SaveBinlogPathsRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.SaveBinlogPathsRequest
|
||||
func (_e *DataCoord_Expecter) SaveBinlogPaths(ctx interface{}, req interface{}) *DataCoord_SaveBinlogPaths_Call {
|
||||
return &DataCoord_SaveBinlogPaths_Call{Call: _e.mock.On("SaveBinlogPaths", ctx, req)}
|
||||
}
|
||||
|
@ -1442,8 +1442,8 @@ type DataCoord_SaveImportSegment_Call struct {
|
|||
}
|
||||
|
||||
// SaveImportSegment is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.SaveImportSegmentRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.SaveImportSegmentRequest
|
||||
func (_e *DataCoord_Expecter) SaveImportSegment(ctx interface{}, req interface{}) *DataCoord_SaveImportSegment_Call {
|
||||
return &DataCoord_SaveImportSegment_Call{Call: _e.mock.On("SaveImportSegment", ctx, req)}
|
||||
}
|
||||
|
@ -1489,8 +1489,8 @@ type DataCoord_SetSegmentState_Call struct {
|
|||
}
|
||||
|
||||
// SetSegmentState is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.SetSegmentStateRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.SetSegmentStateRequest
|
||||
func (_e *DataCoord_Expecter) SetSegmentState(ctx interface{}, req interface{}) *DataCoord_SetSegmentState_Call {
|
||||
return &DataCoord_SetSegmentState_Call{Call: _e.mock.On("SetSegmentState", ctx, req)}
|
||||
}
|
||||
|
@ -1536,8 +1536,8 @@ type DataCoord_ShowConfigurations_Call struct {
|
|||
}
|
||||
|
||||
// ShowConfigurations is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *internalpb.ShowConfigurationsRequest
|
||||
// - ctx context.Context
|
||||
// - req *internalpb.ShowConfigurationsRequest
|
||||
func (_e *DataCoord_Expecter) ShowConfigurations(ctx interface{}, req interface{}) *DataCoord_ShowConfigurations_Call {
|
||||
return &DataCoord_ShowConfigurations_Call{Call: _e.mock.On("ShowConfigurations", ctx, req)}
|
||||
}
|
||||
|
@ -1655,8 +1655,8 @@ type DataCoord_UnsetIsImportingState_Call struct {
|
|||
}
|
||||
|
||||
// UnsetIsImportingState is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.UnsetIsImportingStateRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.UnsetIsImportingStateRequest
|
||||
func (_e *DataCoord_Expecter) UnsetIsImportingState(ctx interface{}, req interface{}) *DataCoord_UnsetIsImportingState_Call {
|
||||
return &DataCoord_UnsetIsImportingState_Call{Call: _e.mock.On("UnsetIsImportingState", ctx, req)}
|
||||
}
|
||||
|
@ -1702,8 +1702,8 @@ type DataCoord_UpdateChannelCheckpoint_Call struct {
|
|||
}
|
||||
|
||||
// UpdateChannelCheckpoint is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.UpdateChannelCheckpointRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.UpdateChannelCheckpointRequest
|
||||
func (_e *DataCoord_Expecter) UpdateChannelCheckpoint(ctx interface{}, req interface{}) *DataCoord_UpdateChannelCheckpoint_Call {
|
||||
return &DataCoord_UpdateChannelCheckpoint_Call{Call: _e.mock.On("UpdateChannelCheckpoint", ctx, req)}
|
||||
}
|
||||
|
@ -1749,8 +1749,8 @@ type DataCoord_UpdateSegmentStatistics_Call struct {
|
|||
}
|
||||
|
||||
// UpdateSegmentStatistics is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.UpdateSegmentStatisticsRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.UpdateSegmentStatisticsRequest
|
||||
func (_e *DataCoord_Expecter) UpdateSegmentStatistics(ctx interface{}, req interface{}) *DataCoord_UpdateSegmentStatistics_Call {
|
||||
return &DataCoord_UpdateSegmentStatistics_Call{Call: _e.mock.On("UpdateSegmentStatistics", ctx, req)}
|
||||
}
|
||||
|
@ -1796,8 +1796,8 @@ type DataCoord_WatchChannels_Call struct {
|
|||
}
|
||||
|
||||
// WatchChannels is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - req *datapb.WatchChannelsRequest
|
||||
// - ctx context.Context
|
||||
// - req *datapb.WatchChannelsRequest
|
||||
func (_e *DataCoord_Expecter) WatchChannels(ctx interface{}, req interface{}) *DataCoord_WatchChannels_Call {
|
||||
return &DataCoord_WatchChannels_Call{Call: _e.mock.On("WatchChannels", ctx, req)}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by mockery v2.14.0. DO NOT EDIT.
|
||||
// Code generated by mockery v2.15.0. DO NOT EDIT.
|
||||
|
||||
package mocks
|
||||
|
||||
|
@ -9,8 +9,6 @@ import (
|
|||
internalpb "github.com/milvus-io/milvus/internal/proto/internalpb"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
model "github.com/milvus-io/milvus/internal/metastore/model"
|
||||
)
|
||||
|
||||
// DataCoordCatalog is an autogenerated mock type for the DataCoordCatalog type
|
||||
|
@ -46,8 +44,8 @@ type DataCoordCatalog_AddSegment_Call struct {
|
|||
}
|
||||
|
||||
// AddSegment is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - segment *datapb.SegmentInfo
|
||||
// - ctx context.Context
|
||||
// - segment *datapb.SegmentInfo
|
||||
func (_e *DataCoordCatalog_Expecter) AddSegment(ctx interface{}, segment interface{}) *DataCoordCatalog_AddSegment_Call {
|
||||
return &DataCoordCatalog_AddSegment_Call{Call: _e.mock.On("AddSegment", ctx, segment)}
|
||||
}
|
||||
|
@ -64,82 +62,6 @@ func (_c *DataCoordCatalog_AddSegment_Call) Return(_a0 error) *DataCoordCatalog_
|
|||
return _c
|
||||
}
|
||||
|
||||
// AlterIndex provides a mock function with given fields: ctx, newIndex
|
||||
func (_m *DataCoordCatalog) AlterIndex(ctx context.Context, newIndex *model.Index) error {
|
||||
ret := _m.Called(ctx, newIndex)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Index) error); ok {
|
||||
r0 = rf(ctx, newIndex)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// DataCoordCatalog_AlterIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterIndex'
|
||||
type DataCoordCatalog_AlterIndex_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// AlterIndex is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - newIndex *model.Index
|
||||
func (_e *DataCoordCatalog_Expecter) AlterIndex(ctx interface{}, newIndex interface{}) *DataCoordCatalog_AlterIndex_Call {
|
||||
return &DataCoordCatalog_AlterIndex_Call{Call: _e.mock.On("AlterIndex", ctx, newIndex)}
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_AlterIndex_Call) Run(run func(ctx context.Context, newIndex *model.Index)) *DataCoordCatalog_AlterIndex_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(*model.Index))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_AlterIndex_Call) Return(_a0 error) *DataCoordCatalog_AlterIndex_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
// AlterIndexes provides a mock function with given fields: ctx, newIndexes
|
||||
func (_m *DataCoordCatalog) AlterIndexes(ctx context.Context, newIndexes []*model.Index) error {
|
||||
ret := _m.Called(ctx, newIndexes)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, []*model.Index) error); ok {
|
||||
r0 = rf(ctx, newIndexes)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// DataCoordCatalog_AlterIndexes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterIndexes'
|
||||
type DataCoordCatalog_AlterIndexes_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// AlterIndexes is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - newIndexes []*model.Index
|
||||
func (_e *DataCoordCatalog_Expecter) AlterIndexes(ctx interface{}, newIndexes interface{}) *DataCoordCatalog_AlterIndexes_Call {
|
||||
return &DataCoordCatalog_AlterIndexes_Call{Call: _e.mock.On("AlterIndexes", ctx, newIndexes)}
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_AlterIndexes_Call) Run(run func(ctx context.Context, newIndexes []*model.Index)) *DataCoordCatalog_AlterIndexes_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].([]*model.Index))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_AlterIndexes_Call) Return(_a0 error) *DataCoordCatalog_AlterIndexes_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
// AlterSegment provides a mock function with given fields: ctx, newSegment, oldSegment
|
||||
func (_m *DataCoordCatalog) AlterSegment(ctx context.Context, newSegment *datapb.SegmentInfo, oldSegment *datapb.SegmentInfo) error {
|
||||
ret := _m.Called(ctx, newSegment, oldSegment)
|
||||
|
@ -160,9 +82,9 @@ type DataCoordCatalog_AlterSegment_Call struct {
|
|||
}
|
||||
|
||||
// AlterSegment is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - newSegment *datapb.SegmentInfo
|
||||
// - oldSegment *datapb.SegmentInfo
|
||||
// - ctx context.Context
|
||||
// - newSegment *datapb.SegmentInfo
|
||||
// - oldSegment *datapb.SegmentInfo
|
||||
func (_e *DataCoordCatalog_Expecter) AlterSegment(ctx interface{}, newSegment interface{}, oldSegment interface{}) *DataCoordCatalog_AlterSegment_Call {
|
||||
return &DataCoordCatalog_AlterSegment_Call{Call: _e.mock.On("AlterSegment", ctx, newSegment, oldSegment)}
|
||||
}
|
||||
|
@ -179,82 +101,6 @@ func (_c *DataCoordCatalog_AlterSegment_Call) Return(_a0 error) *DataCoordCatalo
|
|||
return _c
|
||||
}
|
||||
|
||||
// AlterSegmentIndex provides a mock function with given fields: ctx, newSegIndex
|
||||
func (_m *DataCoordCatalog) AlterSegmentIndex(ctx context.Context, newSegIndex *model.SegmentIndex) error {
|
||||
ret := _m.Called(ctx, newSegIndex)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.SegmentIndex) error); ok {
|
||||
r0 = rf(ctx, newSegIndex)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// DataCoordCatalog_AlterSegmentIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterSegmentIndex'
|
||||
type DataCoordCatalog_AlterSegmentIndex_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// AlterSegmentIndex is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - newSegIndex *model.SegmentIndex
|
||||
func (_e *DataCoordCatalog_Expecter) AlterSegmentIndex(ctx interface{}, newSegIndex interface{}) *DataCoordCatalog_AlterSegmentIndex_Call {
|
||||
return &DataCoordCatalog_AlterSegmentIndex_Call{Call: _e.mock.On("AlterSegmentIndex", ctx, newSegIndex)}
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_AlterSegmentIndex_Call) Run(run func(ctx context.Context, newSegIndex *model.SegmentIndex)) *DataCoordCatalog_AlterSegmentIndex_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(*model.SegmentIndex))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_AlterSegmentIndex_Call) Return(_a0 error) *DataCoordCatalog_AlterSegmentIndex_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
// AlterSegmentIndexes provides a mock function with given fields: ctx, newSegIdxes
|
||||
func (_m *DataCoordCatalog) AlterSegmentIndexes(ctx context.Context, newSegIdxes []*model.SegmentIndex) error {
|
||||
ret := _m.Called(ctx, newSegIdxes)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, []*model.SegmentIndex) error); ok {
|
||||
r0 = rf(ctx, newSegIdxes)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// DataCoordCatalog_AlterSegmentIndexes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterSegmentIndexes'
|
||||
type DataCoordCatalog_AlterSegmentIndexes_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// AlterSegmentIndexes is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - newSegIdxes []*model.SegmentIndex
|
||||
func (_e *DataCoordCatalog_Expecter) AlterSegmentIndexes(ctx interface{}, newSegIdxes interface{}) *DataCoordCatalog_AlterSegmentIndexes_Call {
|
||||
return &DataCoordCatalog_AlterSegmentIndexes_Call{Call: _e.mock.On("AlterSegmentIndexes", ctx, newSegIdxes)}
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_AlterSegmentIndexes_Call) Run(run func(ctx context.Context, newSegIdxes []*model.SegmentIndex)) *DataCoordCatalog_AlterSegmentIndexes_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].([]*model.SegmentIndex))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_AlterSegmentIndexes_Call) Return(_a0 error) *DataCoordCatalog_AlterSegmentIndexes_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
// AlterSegments provides a mock function with given fields: ctx, newSegments
|
||||
func (_m *DataCoordCatalog) AlterSegments(ctx context.Context, newSegments []*datapb.SegmentInfo) error {
|
||||
ret := _m.Called(ctx, newSegments)
|
||||
|
@ -275,8 +121,8 @@ type DataCoordCatalog_AlterSegments_Call struct {
|
|||
}
|
||||
|
||||
// AlterSegments is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - newSegments []*datapb.SegmentInfo
|
||||
// - ctx context.Context
|
||||
// - newSegments []*datapb.SegmentInfo
|
||||
func (_e *DataCoordCatalog_Expecter) AlterSegments(ctx interface{}, newSegments interface{}) *DataCoordCatalog_AlterSegments_Call {
|
||||
return &DataCoordCatalog_AlterSegments_Call{Call: _e.mock.On("AlterSegments", ctx, newSegments)}
|
||||
}
|
||||
|
@ -313,9 +159,9 @@ type DataCoordCatalog_AlterSegmentsAndAddNewSegment_Call struct {
|
|||
}
|
||||
|
||||
// AlterSegmentsAndAddNewSegment is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - segments []*datapb.SegmentInfo
|
||||
// - newSegment *datapb.SegmentInfo
|
||||
// - ctx context.Context
|
||||
// - segments []*datapb.SegmentInfo
|
||||
// - newSegment *datapb.SegmentInfo
|
||||
func (_e *DataCoordCatalog_Expecter) AlterSegmentsAndAddNewSegment(ctx interface{}, segments interface{}, newSegment interface{}) *DataCoordCatalog_AlterSegmentsAndAddNewSegment_Call {
|
||||
return &DataCoordCatalog_AlterSegmentsAndAddNewSegment_Call{Call: _e.mock.On("AlterSegmentsAndAddNewSegment", ctx, segments, newSegment)}
|
||||
}
|
||||
|
@ -332,78 +178,40 @@ func (_c *DataCoordCatalog_AlterSegmentsAndAddNewSegment_Call) Return(_a0 error)
|
|||
return _c
|
||||
}
|
||||
|
||||
// CreateIndex provides a mock function with given fields: ctx, index
|
||||
func (_m *DataCoordCatalog) CreateIndex(ctx context.Context, index *model.Index) error {
|
||||
ret := _m.Called(ctx, index)
|
||||
// ChannelExists provides a mock function with given fields: ctx, channel
|
||||
func (_m *DataCoordCatalog) ChannelExists(ctx context.Context, channel string) bool {
|
||||
ret := _m.Called(ctx, channel)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.Index) error); ok {
|
||||
r0 = rf(ctx, index)
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok {
|
||||
r0 = rf(ctx, channel)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// DataCoordCatalog_CreateIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateIndex'
|
||||
type DataCoordCatalog_CreateIndex_Call struct {
|
||||
// DataCoordCatalog_ChannelExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChannelExists'
|
||||
type DataCoordCatalog_ChannelExists_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// CreateIndex is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - index *model.Index
|
||||
func (_e *DataCoordCatalog_Expecter) CreateIndex(ctx interface{}, index interface{}) *DataCoordCatalog_CreateIndex_Call {
|
||||
return &DataCoordCatalog_CreateIndex_Call{Call: _e.mock.On("CreateIndex", ctx, index)}
|
||||
// ChannelExists is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - channel string
|
||||
func (_e *DataCoordCatalog_Expecter) ChannelExists(ctx interface{}, channel interface{}) *DataCoordCatalog_ChannelExists_Call {
|
||||
return &DataCoordCatalog_ChannelExists_Call{Call: _e.mock.On("ChannelExists", ctx, channel)}
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_CreateIndex_Call) Run(run func(ctx context.Context, index *model.Index)) *DataCoordCatalog_CreateIndex_Call {
|
||||
func (_c *DataCoordCatalog_ChannelExists_Call) Run(run func(ctx context.Context, channel string)) *DataCoordCatalog_ChannelExists_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(*model.Index))
|
||||
run(args[0].(context.Context), args[1].(string))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_CreateIndex_Call) Return(_a0 error) *DataCoordCatalog_CreateIndex_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
// CreateSegmentIndex provides a mock function with given fields: ctx, segIdx
|
||||
func (_m *DataCoordCatalog) CreateSegmentIndex(ctx context.Context, segIdx *model.SegmentIndex) error {
|
||||
ret := _m.Called(ctx, segIdx)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *model.SegmentIndex) error); ok {
|
||||
r0 = rf(ctx, segIdx)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// DataCoordCatalog_CreateSegmentIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateSegmentIndex'
|
||||
type DataCoordCatalog_CreateSegmentIndex_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// CreateSegmentIndex is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - segIdx *model.SegmentIndex
|
||||
func (_e *DataCoordCatalog_Expecter) CreateSegmentIndex(ctx interface{}, segIdx interface{}) *DataCoordCatalog_CreateSegmentIndex_Call {
|
||||
return &DataCoordCatalog_CreateSegmentIndex_Call{Call: _e.mock.On("CreateSegmentIndex", ctx, segIdx)}
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_CreateSegmentIndex_Call) Run(run func(ctx context.Context, segIdx *model.SegmentIndex)) *DataCoordCatalog_CreateSegmentIndex_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(*model.SegmentIndex))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_CreateSegmentIndex_Call) Return(_a0 error) *DataCoordCatalog_CreateSegmentIndex_Call {
|
||||
func (_c *DataCoordCatalog_ChannelExists_Call) Return(_a0 bool) *DataCoordCatalog_ChannelExists_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
@ -428,8 +236,8 @@ type DataCoordCatalog_DropChannel_Call struct {
|
|||
}
|
||||
|
||||
// DropChannel is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - channel string
|
||||
// - ctx context.Context
|
||||
// - channel string
|
||||
func (_e *DataCoordCatalog_Expecter) DropChannel(ctx interface{}, channel interface{}) *DataCoordCatalog_DropChannel_Call {
|
||||
return &DataCoordCatalog_DropChannel_Call{Call: _e.mock.On("DropChannel", ctx, channel)}
|
||||
}
|
||||
|
@ -466,8 +274,8 @@ type DataCoordCatalog_DropChannelCheckpoint_Call struct {
|
|||
}
|
||||
|
||||
// DropChannelCheckpoint is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - vChannel string
|
||||
// - ctx context.Context
|
||||
// - vChannel string
|
||||
func (_e *DataCoordCatalog_Expecter) DropChannelCheckpoint(ctx interface{}, vChannel interface{}) *DataCoordCatalog_DropChannelCheckpoint_Call {
|
||||
return &DataCoordCatalog_DropChannelCheckpoint_Call{Call: _e.mock.On("DropChannelCheckpoint", ctx, vChannel)}
|
||||
}
|
||||
|
@ -484,45 +292,6 @@ func (_c *DataCoordCatalog_DropChannelCheckpoint_Call) Return(_a0 error) *DataCo
|
|||
return _c
|
||||
}
|
||||
|
||||
// DropIndex provides a mock function with given fields: ctx, collID, dropIdxID
|
||||
func (_m *DataCoordCatalog) DropIndex(ctx context.Context, collID int64, dropIdxID int64) error {
|
||||
ret := _m.Called(ctx, collID, dropIdxID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, int64) error); ok {
|
||||
r0 = rf(ctx, collID, dropIdxID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// DataCoordCatalog_DropIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropIndex'
|
||||
type DataCoordCatalog_DropIndex_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// DropIndex is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - collID int64
|
||||
// - dropIdxID int64
|
||||
func (_e *DataCoordCatalog_Expecter) DropIndex(ctx interface{}, collID interface{}, dropIdxID interface{}) *DataCoordCatalog_DropIndex_Call {
|
||||
return &DataCoordCatalog_DropIndex_Call{Call: _e.mock.On("DropIndex", ctx, collID, dropIdxID)}
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_DropIndex_Call) Run(run func(ctx context.Context, collID int64, dropIdxID int64)) *DataCoordCatalog_DropIndex_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(int64), args[2].(int64))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_DropIndex_Call) Return(_a0 error) *DataCoordCatalog_DropIndex_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
// DropSegment provides a mock function with given fields: ctx, segment
|
||||
func (_m *DataCoordCatalog) DropSegment(ctx context.Context, segment *datapb.SegmentInfo) error {
|
||||
ret := _m.Called(ctx, segment)
|
||||
|
@ -543,8 +312,8 @@ type DataCoordCatalog_DropSegment_Call struct {
|
|||
}
|
||||
|
||||
// DropSegment is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - segment *datapb.SegmentInfo
|
||||
// - ctx context.Context
|
||||
// - segment *datapb.SegmentInfo
|
||||
func (_e *DataCoordCatalog_Expecter) DropSegment(ctx interface{}, segment interface{}) *DataCoordCatalog_DropSegment_Call {
|
||||
return &DataCoordCatalog_DropSegment_Call{Call: _e.mock.On("DropSegment", ctx, segment)}
|
||||
}
|
||||
|
@ -561,47 +330,6 @@ func (_c *DataCoordCatalog_DropSegment_Call) Return(_a0 error) *DataCoordCatalog
|
|||
return _c
|
||||
}
|
||||
|
||||
// DropSegmentIndex provides a mock function with given fields: ctx, collID, partID, segID, buildID
|
||||
func (_m *DataCoordCatalog) DropSegmentIndex(ctx context.Context, collID int64, partID int64, segID int64, buildID int64) error {
|
||||
ret := _m.Called(ctx, collID, partID, segID, buildID)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, int64, int64, int64, int64) error); ok {
|
||||
r0 = rf(ctx, collID, partID, segID, buildID)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// DataCoordCatalog_DropSegmentIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropSegmentIndex'
|
||||
type DataCoordCatalog_DropSegmentIndex_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// DropSegmentIndex is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - collID int64
|
||||
// - partID int64
|
||||
// - segID int64
|
||||
// - buildID int64
|
||||
func (_e *DataCoordCatalog_Expecter) DropSegmentIndex(ctx interface{}, collID interface{}, partID interface{}, segID interface{}, buildID interface{}) *DataCoordCatalog_DropSegmentIndex_Call {
|
||||
return &DataCoordCatalog_DropSegmentIndex_Call{Call: _e.mock.On("DropSegmentIndex", ctx, collID, partID, segID, buildID)}
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_DropSegmentIndex_Call) Run(run func(ctx context.Context, collID int64, partID int64, segID int64, buildID int64)) *DataCoordCatalog_DropSegmentIndex_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(int64), args[2].(int64), args[3].(int64), args[4].(int64))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_DropSegmentIndex_Call) Return(_a0 error) *DataCoordCatalog_DropSegmentIndex_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
// GcConfirm provides a mock function with given fields: ctx, collectionID, partitionID
|
||||
func (_m *DataCoordCatalog) GcConfirm(ctx context.Context, collectionID int64, partitionID int64) bool {
|
||||
ret := _m.Called(ctx, collectionID, partitionID)
|
||||
|
@ -622,9 +350,9 @@ type DataCoordCatalog_GcConfirm_Call struct {
|
|||
}
|
||||
|
||||
// GcConfirm is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - collectionID int64
|
||||
// - partitionID int64
|
||||
// - ctx context.Context
|
||||
// - collectionID int64
|
||||
// - partitionID int64
|
||||
func (_e *DataCoordCatalog_Expecter) GcConfirm(ctx interface{}, collectionID interface{}, partitionID interface{}) *DataCoordCatalog_GcConfirm_Call {
|
||||
return &DataCoordCatalog_GcConfirm_Call{Call: _e.mock.On("GcConfirm", ctx, collectionID, partitionID)}
|
||||
}
|
||||
|
@ -641,44 +369,6 @@ func (_c *DataCoordCatalog_GcConfirm_Call) Return(_a0 bool) *DataCoordCatalog_Gc
|
|||
return _c
|
||||
}
|
||||
|
||||
// IsChannelDropped provides a mock function with given fields: ctx, channel
|
||||
func (_m *DataCoordCatalog) IsChannelDropped(ctx context.Context, channel string) bool {
|
||||
ret := _m.Called(ctx, channel)
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok {
|
||||
r0 = rf(ctx, channel)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// DataCoordCatalog_IsChannelDropped_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsChannelDropped'
|
||||
type DataCoordCatalog_IsChannelDropped_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// IsChannelDropped is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - channel string
|
||||
func (_e *DataCoordCatalog_Expecter) IsChannelDropped(ctx interface{}, channel interface{}) *DataCoordCatalog_IsChannelDropped_Call {
|
||||
return &DataCoordCatalog_IsChannelDropped_Call{Call: _e.mock.On("IsChannelDropped", ctx, channel)}
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_IsChannelDropped_Call) Run(run func(ctx context.Context, channel string)) *DataCoordCatalog_IsChannelDropped_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(string))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_IsChannelDropped_Call) Return(_a0 bool) *DataCoordCatalog_IsChannelDropped_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
// ListChannelCheckpoint provides a mock function with given fields: ctx
|
||||
func (_m *DataCoordCatalog) ListChannelCheckpoint(ctx context.Context) (map[string]*internalpb.MsgPosition, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
@ -708,7 +398,7 @@ type DataCoordCatalog_ListChannelCheckpoint_Call struct {
|
|||
}
|
||||
|
||||
// ListChannelCheckpoint is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - ctx context.Context
|
||||
func (_e *DataCoordCatalog_Expecter) ListChannelCheckpoint(ctx interface{}) *DataCoordCatalog_ListChannelCheckpoint_Call {
|
||||
return &DataCoordCatalog_ListChannelCheckpoint_Call{Call: _e.mock.On("ListChannelCheckpoint", ctx)}
|
||||
}
|
||||
|
@ -725,98 +415,6 @@ func (_c *DataCoordCatalog_ListChannelCheckpoint_Call) Return(_a0 map[string]*in
|
|||
return _c
|
||||
}
|
||||
|
||||
// ListIndexes provides a mock function with given fields: ctx
|
||||
func (_m *DataCoordCatalog) ListIndexes(ctx context.Context) ([]*model.Index, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
var r0 []*model.Index
|
||||
if rf, ok := ret.Get(0).(func(context.Context) []*model.Index); ok {
|
||||
r0 = rf(ctx)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.Index)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
||||
r1 = rf(ctx)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// DataCoordCatalog_ListIndexes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListIndexes'
|
||||
type DataCoordCatalog_ListIndexes_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// ListIndexes is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
func (_e *DataCoordCatalog_Expecter) ListIndexes(ctx interface{}) *DataCoordCatalog_ListIndexes_Call {
|
||||
return &DataCoordCatalog_ListIndexes_Call{Call: _e.mock.On("ListIndexes", ctx)}
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_ListIndexes_Call) Run(run func(ctx context.Context)) *DataCoordCatalog_ListIndexes_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_ListIndexes_Call) Return(_a0 []*model.Index, _a1 error) *DataCoordCatalog_ListIndexes_Call {
|
||||
_c.Call.Return(_a0, _a1)
|
||||
return _c
|
||||
}
|
||||
|
||||
// ListSegmentIndexes provides a mock function with given fields: ctx
|
||||
func (_m *DataCoordCatalog) ListSegmentIndexes(ctx context.Context) ([]*model.SegmentIndex, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
||||
var r0 []*model.SegmentIndex
|
||||
if rf, ok := ret.Get(0).(func(context.Context) []*model.SegmentIndex); ok {
|
||||
r0 = rf(ctx)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.SegmentIndex)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
|
||||
r1 = rf(ctx)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// DataCoordCatalog_ListSegmentIndexes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSegmentIndexes'
|
||||
type DataCoordCatalog_ListSegmentIndexes_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// ListSegmentIndexes is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
func (_e *DataCoordCatalog_Expecter) ListSegmentIndexes(ctx interface{}) *DataCoordCatalog_ListSegmentIndexes_Call {
|
||||
return &DataCoordCatalog_ListSegmentIndexes_Call{Call: _e.mock.On("ListSegmentIndexes", ctx)}
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_ListSegmentIndexes_Call) Run(run func(ctx context.Context)) *DataCoordCatalog_ListSegmentIndexes_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_ListSegmentIndexes_Call) Return(_a0 []*model.SegmentIndex, _a1 error) *DataCoordCatalog_ListSegmentIndexes_Call {
|
||||
_c.Call.Return(_a0, _a1)
|
||||
return _c
|
||||
}
|
||||
|
||||
// ListSegments provides a mock function with given fields: ctx
|
||||
func (_m *DataCoordCatalog) ListSegments(ctx context.Context) ([]*datapb.SegmentInfo, error) {
|
||||
ret := _m.Called(ctx)
|
||||
|
@ -846,7 +444,7 @@ type DataCoordCatalog_ListSegments_Call struct {
|
|||
}
|
||||
|
||||
// ListSegments is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - ctx context.Context
|
||||
func (_e *DataCoordCatalog_Expecter) ListSegments(ctx interface{}) *DataCoordCatalog_ListSegments_Call {
|
||||
return &DataCoordCatalog_ListSegments_Call{Call: _e.mock.On("ListSegments", ctx)}
|
||||
}
|
||||
|
@ -863,6 +461,44 @@ func (_c *DataCoordCatalog_ListSegments_Call) Return(_a0 []*datapb.SegmentInfo,
|
|||
return _c
|
||||
}
|
||||
|
||||
// MarkChannelAdded provides a mock function with given fields: ctx, channel
|
||||
func (_m *DataCoordCatalog) MarkChannelAdded(ctx context.Context, channel string) error {
|
||||
ret := _m.Called(ctx, channel)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
||||
r0 = rf(ctx, channel)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// DataCoordCatalog_MarkChannelAdded_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarkChannelAdded'
|
||||
type DataCoordCatalog_MarkChannelAdded_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// MarkChannelAdded is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - channel string
|
||||
func (_e *DataCoordCatalog_Expecter) MarkChannelAdded(ctx interface{}, channel interface{}) *DataCoordCatalog_MarkChannelAdded_Call {
|
||||
return &DataCoordCatalog_MarkChannelAdded_Call{Call: _e.mock.On("MarkChannelAdded", ctx, channel)}
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_MarkChannelAdded_Call) Run(run func(ctx context.Context, channel string)) *DataCoordCatalog_MarkChannelAdded_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(string))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_MarkChannelAdded_Call) Return(_a0 error) *DataCoordCatalog_MarkChannelAdded_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
// MarkChannelDeleted provides a mock function with given fields: ctx, channel
|
||||
func (_m *DataCoordCatalog) MarkChannelDeleted(ctx context.Context, channel string) error {
|
||||
ret := _m.Called(ctx, channel)
|
||||
|
@ -883,8 +519,8 @@ type DataCoordCatalog_MarkChannelDeleted_Call struct {
|
|||
}
|
||||
|
||||
// MarkChannelDeleted is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - channel string
|
||||
// - ctx context.Context
|
||||
// - channel string
|
||||
func (_e *DataCoordCatalog_Expecter) MarkChannelDeleted(ctx interface{}, channel interface{}) *DataCoordCatalog_MarkChannelDeleted_Call {
|
||||
return &DataCoordCatalog_MarkChannelDeleted_Call{Call: _e.mock.On("MarkChannelDeleted", ctx, channel)}
|
||||
}
|
||||
|
@ -921,9 +557,9 @@ type DataCoordCatalog_RevertAlterSegmentsAndAddNewSegment_Call struct {
|
|||
}
|
||||
|
||||
// RevertAlterSegmentsAndAddNewSegment is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - segments []*datapb.SegmentInfo
|
||||
// - removalSegment *datapb.SegmentInfo
|
||||
// - ctx context.Context
|
||||
// - segments []*datapb.SegmentInfo
|
||||
// - removalSegment *datapb.SegmentInfo
|
||||
func (_e *DataCoordCatalog_Expecter) RevertAlterSegmentsAndAddNewSegment(ctx interface{}, segments interface{}, removalSegment interface{}) *DataCoordCatalog_RevertAlterSegmentsAndAddNewSegment_Call {
|
||||
return &DataCoordCatalog_RevertAlterSegmentsAndAddNewSegment_Call{Call: _e.mock.On("RevertAlterSegmentsAndAddNewSegment", ctx, segments, removalSegment)}
|
||||
}
|
||||
|
@ -960,9 +596,9 @@ type DataCoordCatalog_SaveChannelCheckpoint_Call struct {
|
|||
}
|
||||
|
||||
// SaveChannelCheckpoint is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - vChannel string
|
||||
// - pos *internalpb.MsgPosition
|
||||
// - ctx context.Context
|
||||
// - vChannel string
|
||||
// - pos *internalpb.MsgPosition
|
||||
func (_e *DataCoordCatalog_Expecter) SaveChannelCheckpoint(ctx interface{}, vChannel interface{}, pos interface{}) *DataCoordCatalog_SaveChannelCheckpoint_Call {
|
||||
return &DataCoordCatalog_SaveChannelCheckpoint_Call{Call: _e.mock.On("SaveChannelCheckpoint", ctx, vChannel, pos)}
|
||||
}
|
||||
|
@ -999,8 +635,8 @@ type DataCoordCatalog_SaveDroppedSegmentsInBatch_Call struct {
|
|||
}
|
||||
|
||||
// SaveDroppedSegmentsInBatch is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - segments []*datapb.SegmentInfo
|
||||
// - ctx context.Context
|
||||
// - segments []*datapb.SegmentInfo
|
||||
func (_e *DataCoordCatalog_Expecter) SaveDroppedSegmentsInBatch(ctx interface{}, segments interface{}) *DataCoordCatalog_SaveDroppedSegmentsInBatch_Call {
|
||||
return &DataCoordCatalog_SaveDroppedSegmentsInBatch_Call{Call: _e.mock.On("SaveDroppedSegmentsInBatch", ctx, segments)}
|
||||
}
|
||||
|
@ -1017,6 +653,44 @@ func (_c *DataCoordCatalog_SaveDroppedSegmentsInBatch_Call) Return(_a0 error) *D
|
|||
return _c
|
||||
}
|
||||
|
||||
// ShouldDropChannel provides a mock function with given fields: ctx, channel
|
||||
func (_m *DataCoordCatalog) ShouldDropChannel(ctx context.Context, channel string) bool {
|
||||
ret := _m.Called(ctx, channel)
|
||||
|
||||
var r0 bool
|
||||
if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok {
|
||||
r0 = rf(ctx, channel)
|
||||
} else {
|
||||
r0 = ret.Get(0).(bool)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// DataCoordCatalog_ShouldDropChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShouldDropChannel'
|
||||
type DataCoordCatalog_ShouldDropChannel_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// ShouldDropChannel is a helper method to define mock.On call
|
||||
// - ctx context.Context
|
||||
// - channel string
|
||||
func (_e *DataCoordCatalog_Expecter) ShouldDropChannel(ctx interface{}, channel interface{}) *DataCoordCatalog_ShouldDropChannel_Call {
|
||||
return &DataCoordCatalog_ShouldDropChannel_Call{Call: _e.mock.On("ShouldDropChannel", ctx, channel)}
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_ShouldDropChannel_Call) Run(run func(ctx context.Context, channel string)) *DataCoordCatalog_ShouldDropChannel_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(context.Context), args[1].(string))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *DataCoordCatalog_ShouldDropChannel_Call) Return(_a0 bool) *DataCoordCatalog_ShouldDropChannel_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewDataCoordCatalog interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
|
|
Loading…
Reference in New Issue