diff --git a/internal/querynodev2/cluster/mock_manager.go b/internal/querynodev2/cluster/mock_manager.go index 3b032f1bce1fc..06593f204ccbe 100644 --- a/internal/querynodev2/cluster/mock_manager.go +++ b/internal/querynodev2/cluster/mock_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.46.0. DO NOT EDIT. package cluster @@ -25,6 +25,10 @@ func (_m *MockManager) EXPECT() *MockManager_Expecter { func (_m *MockManager) GetWorker(ctx context.Context, nodeID int64) (Worker, error) { ret := _m.Called(ctx, nodeID) + if len(ret) == 0 { + panic("no return value specified for GetWorker") + } + var r0 Worker var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64) (Worker, error)); ok { diff --git a/internal/querynodev2/cluster/mock_worker.go b/internal/querynodev2/cluster/mock_worker.go index ba573bf89d0b3..0eb5104b909cd 100644 --- a/internal/querynodev2/cluster/mock_worker.go +++ b/internal/querynodev2/cluster/mock_worker.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.46.0. DO NOT EDIT. package cluster @@ -30,6 +30,10 @@ func (_m *MockWorker) EXPECT() *MockWorker_Expecter { func (_m *MockWorker) Delete(ctx context.Context, req *querypb.DeleteRequest) error { ret := _m.Called(ctx, req) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *querypb.DeleteRequest) error); ok { r0 = rf(ctx, req) @@ -73,6 +77,10 @@ func (_c *MockWorker_Delete_Call) RunAndReturn(run func(context.Context, *queryp func (_m *MockWorker) GetStatistics(ctx context.Context, req *querypb.GetStatisticsRequest) (*internalpb.GetStatisticsResponse, error) { ret := _m.Called(ctx, req) + if len(ret) == 0 { + panic("no return value specified for GetStatistics") + } + var r0 *internalpb.GetStatisticsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetStatisticsRequest) (*internalpb.GetStatisticsResponse, error)); ok { @@ -128,6 +136,10 @@ func (_c *MockWorker_GetStatistics_Call) RunAndReturn(run func(context.Context, func (_m *MockWorker) IsHealthy() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for IsHealthy") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -169,6 +181,10 @@ func (_c *MockWorker_IsHealthy_Call) RunAndReturn(run func() bool) *MockWorker_I func (_m *MockWorker) LoadSegments(_a0 context.Context, _a1 *querypb.LoadSegmentsRequest) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for LoadSegments") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *querypb.LoadSegmentsRequest) error); ok { r0 = rf(_a0, _a1) @@ -212,6 +228,10 @@ func (_c *MockWorker_LoadSegments_Call) RunAndReturn(run func(context.Context, * func (_m *MockWorker) QuerySegments(ctx context.Context, req *querypb.QueryRequest) (*internalpb.RetrieveResults, error) { ret := _m.Called(ctx, req) + if len(ret) == 0 { + panic("no return value specified for QuerySegments") + } + var r0 *internalpb.RetrieveResults var r1 error if rf, ok := ret.Get(0).(func(context.Context, *querypb.QueryRequest) (*internalpb.RetrieveResults, error)); ok { @@ -267,6 +287,10 @@ func (_c *MockWorker_QuerySegments_Call) RunAndReturn(run func(context.Context, func (_m *MockWorker) QueryStreamSegments(ctx context.Context, req *querypb.QueryRequest, srv streamrpc.QueryStreamServer) error { ret := _m.Called(ctx, req, srv) + if len(ret) == 0 { + panic("no return value specified for QueryStreamSegments") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *querypb.QueryRequest, streamrpc.QueryStreamServer) error); ok { r0 = rf(ctx, req, srv) @@ -311,6 +335,10 @@ func (_c *MockWorker_QueryStreamSegments_Call) RunAndReturn(run func(context.Con func (_m *MockWorker) ReleaseSegments(_a0 context.Context, _a1 *querypb.ReleaseSegmentsRequest) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ReleaseSegments") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *querypb.ReleaseSegmentsRequest) error); ok { r0 = rf(_a0, _a1) @@ -354,6 +382,10 @@ func (_c *MockWorker_ReleaseSegments_Call) RunAndReturn(run func(context.Context func (_m *MockWorker) SearchSegments(ctx context.Context, req *querypb.SearchRequest) (*internalpb.SearchResults, error) { ret := _m.Called(ctx, req) + if len(ret) == 0 { + panic("no return value specified for SearchSegments") + } + var r0 *internalpb.SearchResults var r1 error if rf, ok := ret.Get(0).(func(context.Context, *querypb.SearchRequest) (*internalpb.SearchResults, error)); ok { diff --git a/internal/querynodev2/delegator/mock_delegator.go b/internal/querynodev2/delegator/mock_delegator.go index 4cc49950a95b3..3ef1a03ea87cb 100644 --- a/internal/querynodev2/delegator/mock_delegator.go +++ b/internal/querynodev2/delegator/mock_delegator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.46.0. DO NOT EDIT. package delegator @@ -97,6 +97,10 @@ func (_c *MockShardDelegator_Close_Call) RunAndReturn(run func()) *MockShardDele func (_m *MockShardDelegator) Collection() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Collection") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -138,6 +142,10 @@ func (_c *MockShardDelegator_Collection_Call) RunAndReturn(run func() int64) *Mo func (_m *MockShardDelegator) GetDeleteBufferSize() (int64, int64) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetDeleteBufferSize") + } + var r0 int64 var r1 int64 if rf, ok := ret.Get(0).(func() (int64, int64)); ok { @@ -189,6 +197,10 @@ func (_c *MockShardDelegator_GetDeleteBufferSize_Call) RunAndReturn(run func() ( func (_m *MockShardDelegator) GetPartitionStatsVersions(ctx context.Context) map[int64]int64 { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetPartitionStatsVersions") + } + var r0 map[int64]int64 if rf, ok := ret.Get(0).(func(context.Context) map[int64]int64); ok { r0 = rf(ctx) @@ -233,6 +245,10 @@ func (_c *MockShardDelegator_GetPartitionStatsVersions_Call) RunAndReturn(run fu func (_m *MockShardDelegator) GetSegmentInfo(readable bool) ([]SnapshotItem, []SegmentEntry) { ret := _m.Called(readable) + if len(ret) == 0 { + panic("no return value specified for GetSegmentInfo") + } + var r0 []SnapshotItem var r1 []SegmentEntry if rf, ok := ret.Get(0).(func(bool) ([]SnapshotItem, []SegmentEntry)); ok { @@ -289,6 +305,10 @@ func (_c *MockShardDelegator_GetSegmentInfo_Call) RunAndReturn(run func(bool) ([ func (_m *MockShardDelegator) GetStatistics(ctx context.Context, req *querypb.GetStatisticsRequest) ([]*internalpb.GetStatisticsResponse, error) { ret := _m.Called(ctx, req) + if len(ret) == 0 { + panic("no return value specified for GetStatistics") + } + var r0 []*internalpb.GetStatisticsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetStatisticsRequest) ([]*internalpb.GetStatisticsResponse, error)); ok { @@ -344,6 +364,10 @@ func (_c *MockShardDelegator_GetStatistics_Call) RunAndReturn(run func(context.C func (_m *MockShardDelegator) GetTargetVersion() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetTargetVersion") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -385,6 +409,10 @@ func (_c *MockShardDelegator_GetTargetVersion_Call) RunAndReturn(run func() int6 func (_m *MockShardDelegator) LoadGrowing(ctx context.Context, infos []*querypb.SegmentLoadInfo, version int64) error { ret := _m.Called(ctx, infos, version) + if len(ret) == 0 { + panic("no return value specified for LoadGrowing") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, []*querypb.SegmentLoadInfo, int64) error); ok { r0 = rf(ctx, infos, version) @@ -429,6 +457,10 @@ func (_c *MockShardDelegator_LoadGrowing_Call) RunAndReturn(run func(context.Con func (_m *MockShardDelegator) LoadSegments(ctx context.Context, req *querypb.LoadSegmentsRequest) error { ret := _m.Called(ctx, req) + if len(ret) == 0 { + panic("no return value specified for LoadSegments") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *querypb.LoadSegmentsRequest) error); ok { r0 = rf(ctx, req) @@ -539,6 +571,10 @@ func (_c *MockShardDelegator_ProcessInsert_Call) RunAndReturn(run func(map[int64 func (_m *MockShardDelegator) Query(ctx context.Context, req *querypb.QueryRequest) ([]*internalpb.RetrieveResults, error) { ret := _m.Called(ctx, req) + if len(ret) == 0 { + panic("no return value specified for Query") + } + var r0 []*internalpb.RetrieveResults var r1 error if rf, ok := ret.Get(0).(func(context.Context, *querypb.QueryRequest) ([]*internalpb.RetrieveResults, error)); ok { @@ -594,6 +630,10 @@ func (_c *MockShardDelegator_Query_Call) RunAndReturn(run func(context.Context, func (_m *MockShardDelegator) QueryStream(ctx context.Context, req *querypb.QueryRequest, srv streamrpc.QueryStreamServer) error { ret := _m.Called(ctx, req, srv) + if len(ret) == 0 { + panic("no return value specified for QueryStream") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *querypb.QueryRequest, streamrpc.QueryStreamServer) error); ok { r0 = rf(ctx, req, srv) @@ -638,6 +678,10 @@ func (_c *MockShardDelegator_QueryStream_Call) RunAndReturn(run func(context.Con func (_m *MockShardDelegator) ReleaseSegments(ctx context.Context, req *querypb.ReleaseSegmentsRequest, force bool) error { ret := _m.Called(ctx, req, force) + if len(ret) == 0 { + panic("no return value specified for ReleaseSegments") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *querypb.ReleaseSegmentsRequest, bool) error); ok { r0 = rf(ctx, req, force) @@ -682,6 +726,10 @@ func (_c *MockShardDelegator_ReleaseSegments_Call) RunAndReturn(run func(context func (_m *MockShardDelegator) Search(ctx context.Context, req *querypb.SearchRequest) ([]*internalpb.SearchResults, error) { ret := _m.Called(ctx, req) + if len(ret) == 0 { + panic("no return value specified for Search") + } + var r0 []*internalpb.SearchResults var r1 error if rf, ok := ret.Get(0).(func(context.Context, *querypb.SearchRequest) ([]*internalpb.SearchResults, error)); ok { @@ -737,6 +785,10 @@ func (_c *MockShardDelegator_Search_Call) RunAndReturn(run func(context.Context, func (_m *MockShardDelegator) Serviceable() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Serviceable") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -962,6 +1014,10 @@ func (_c *MockShardDelegator_TryCleanExcludedSegments_Call) RunAndReturn(run fun func (_m *MockShardDelegator) VerifyExcludedSegments(segmentID int64, ts uint64) bool { ret := _m.Called(segmentID, ts) + if len(ret) == 0 { + panic("no return value specified for VerifyExcludedSegments") + } + var r0 bool if rf, ok := ret.Get(0).(func(int64, uint64) bool); ok { r0 = rf(segmentID, ts) @@ -1005,6 +1061,10 @@ func (_c *MockShardDelegator_VerifyExcludedSegments_Call) RunAndReturn(run func( func (_m *MockShardDelegator) Version() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Version") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() diff --git a/internal/querynodev2/optimizers/mock_query_hook.go b/internal/querynodev2/optimizers/mock_query_hook.go index 7c9f5dab88f20..6b084d7098fe4 100644 --- a/internal/querynodev2/optimizers/mock_query_hook.go +++ b/internal/querynodev2/optimizers/mock_query_hook.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.46.0. DO NOT EDIT. package optimizers @@ -21,6 +21,10 @@ func (_m *MockQueryHook) EXPECT() *MockQueryHook_Expecter { func (_m *MockQueryHook) DeleteTuningConfig(_a0 string) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for DeleteTuningConfig") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(_a0) @@ -63,6 +67,10 @@ func (_c *MockQueryHook_DeleteTuningConfig_Call) RunAndReturn(run func(string) e func (_m *MockQueryHook) Init(_a0 string) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Init") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(_a0) @@ -105,6 +113,10 @@ func (_c *MockQueryHook_Init_Call) RunAndReturn(run func(string) error) *MockQue func (_m *MockQueryHook) InitTuningConfig(_a0 map[string]string) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for InitTuningConfig") + } + var r0 error if rf, ok := ret.Get(0).(func(map[string]string) error); ok { r0 = rf(_a0) @@ -147,6 +159,10 @@ func (_c *MockQueryHook_InitTuningConfig_Call) RunAndReturn(run func(map[string] func (_m *MockQueryHook) Run(_a0 map[string]interface{}) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Run") + } + var r0 error if rf, ok := ret.Get(0).(func(map[string]interface{}) error); ok { r0 = rf(_a0) diff --git a/internal/querynodev2/segments/mock_collection_manager.go b/internal/querynodev2/segments/mock_collection_manager.go index 049b326c714b1..496134100f45c 100644 --- a/internal/querynodev2/segments/mock_collection_manager.go +++ b/internal/querynodev2/segments/mock_collection_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.46.0. DO NOT EDIT. package segments @@ -27,6 +27,10 @@ func (_m *MockCollectionManager) EXPECT() *MockCollectionManager_Expecter { func (_m *MockCollectionManager) Get(collectionID int64) *Collection { ret := _m.Called(collectionID) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *Collection if rf, ok := ret.Get(0).(func(int64) *Collection); ok { r0 = rf(collectionID) @@ -71,6 +75,10 @@ func (_c *MockCollectionManager_Get_Call) RunAndReturn(run func(int64) *Collecti func (_m *MockCollectionManager) List() []int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 []int64 if rf, ok := ret.Get(0).(func() []int64); ok { r0 = rf() @@ -150,6 +158,10 @@ func (_c *MockCollectionManager_PutOrRef_Call) RunAndReturn(run func(int64, *sch func (_m *MockCollectionManager) Ref(collectionID int64, count uint32) bool { ret := _m.Called(collectionID, count) + if len(ret) == 0 { + panic("no return value specified for Ref") + } + var r0 bool if rf, ok := ret.Get(0).(func(int64, uint32) bool); ok { r0 = rf(collectionID, count) @@ -193,6 +205,10 @@ func (_c *MockCollectionManager_Ref_Call) RunAndReturn(run func(int64, uint32) b func (_m *MockCollectionManager) Unref(collectionID int64, count uint32) bool { ret := _m.Called(collectionID, count) + if len(ret) == 0 { + panic("no return value specified for Unref") + } + var r0 bool if rf, ok := ret.Get(0).(func(int64, uint32) bool); ok { r0 = rf(collectionID, count) diff --git a/internal/querynodev2/segments/mock_loader.go b/internal/querynodev2/segments/mock_loader.go index 6d906d74bbb86..9b5141cdc42fc 100644 --- a/internal/querynodev2/segments/mock_loader.go +++ b/internal/querynodev2/segments/mock_loader.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.46.0. DO NOT EDIT. package segments @@ -40,6 +40,10 @@ func (_m *MockLoader) Load(ctx context.Context, collectionID int64, segmentType _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Load") + } + var r0 []Segment var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64, commonpb.SegmentState, int64, ...*querypb.SegmentLoadInfo) ([]Segment, error)); ok { @@ -112,6 +116,10 @@ func (_m *MockLoader) LoadBloomFilterSet(ctx context.Context, collectionID int64 _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for LoadBloomFilterSet") + } + var r0 []*pkoracle.BloomFilterSet var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64, int64, ...*querypb.SegmentLoadInfo) ([]*pkoracle.BloomFilterSet, error)); ok { @@ -176,6 +184,10 @@ func (_c *MockLoader_LoadBloomFilterSet_Call) RunAndReturn(run func(context.Cont func (_m *MockLoader) LoadDeltaLogs(ctx context.Context, segment Segment, deltaLogs []*datapb.FieldBinlog) error { ret := _m.Called(ctx, segment, deltaLogs) + if len(ret) == 0 { + panic("no return value specified for LoadDeltaLogs") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, Segment, []*datapb.FieldBinlog) error); ok { r0 = rf(ctx, segment, deltaLogs) @@ -220,6 +232,10 @@ func (_c *MockLoader_LoadDeltaLogs_Call) RunAndReturn(run func(context.Context, func (_m *MockLoader) LoadIndex(ctx context.Context, segment Segment, info *querypb.SegmentLoadInfo, version int64) error { ret := _m.Called(ctx, segment, info, version) + if len(ret) == 0 { + panic("no return value specified for LoadIndex") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, Segment, *querypb.SegmentLoadInfo, int64) error); ok { r0 = rf(ctx, segment, info, version) @@ -265,6 +281,10 @@ func (_c *MockLoader_LoadIndex_Call) RunAndReturn(run func(context.Context, Segm func (_m *MockLoader) LoadLazySegment(ctx context.Context, segment Segment, loadInfo *querypb.SegmentLoadInfo) error { ret := _m.Called(ctx, segment, loadInfo) + if len(ret) == 0 { + panic("no return value specified for LoadLazySegment") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, Segment, *querypb.SegmentLoadInfo) error); ok { r0 = rf(ctx, segment, loadInfo) diff --git a/internal/querynodev2/segments/mock_segment.go b/internal/querynodev2/segments/mock_segment.go index a0d3df97ba8c0..52183c9c2474b 100644 --- a/internal/querynodev2/segments/mock_segment.go +++ b/internal/querynodev2/segments/mock_segment.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.46.0. DO NOT EDIT. package segments @@ -39,6 +39,10 @@ func (_m *MockSegment) EXPECT() *MockSegment_Expecter { func (_m *MockSegment) BatchPkExist(lc *storage.BatchLocationsCache) []bool { ret := _m.Called(lc) + if len(ret) == 0 { + panic("no return value specified for BatchPkExist") + } + var r0 []bool if rf, ok := ret.Get(0).(func(*storage.BatchLocationsCache) []bool); ok { r0 = rf(lc) @@ -83,6 +87,10 @@ func (_c *MockSegment_BatchPkExist_Call) RunAndReturn(run func(*storage.BatchLoc func (_m *MockSegment) CASVersion(_a0 int64, _a1 int64) bool { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CASVersion") + } + var r0 bool if rf, ok := ret.Get(0).(func(int64, int64) bool); ok { r0 = rf(_a0, _a1) @@ -126,6 +134,10 @@ func (_c *MockSegment_CASVersion_Call) RunAndReturn(run func(int64, int64) bool) func (_m *MockSegment) Collection() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Collection") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -167,6 +179,10 @@ func (_c *MockSegment_Collection_Call) RunAndReturn(run func() int64) *MockSegme func (_m *MockSegment) DatabaseName() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DatabaseName") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -208,6 +224,10 @@ func (_c *MockSegment_DatabaseName_Call) RunAndReturn(run func() string) *MockSe func (_m *MockSegment) Delete(ctx context.Context, primaryKeys []storage.PrimaryKey, timestamps []uint64) error { ret := _m.Called(ctx, primaryKeys, timestamps) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, []storage.PrimaryKey, []uint64) error); ok { r0 = rf(ctx, primaryKeys, timestamps) @@ -252,6 +272,10 @@ func (_c *MockSegment_Delete_Call) RunAndReturn(run func(context.Context, []stor func (_m *MockSegment) ExistIndex(fieldID int64) bool { ret := _m.Called(fieldID) + if len(ret) == 0 { + panic("no return value specified for ExistIndex") + } + var r0 bool if rf, ok := ret.Get(0).(func(int64) bool); ok { r0 = rf(fieldID) @@ -294,6 +318,10 @@ func (_c *MockSegment_ExistIndex_Call) RunAndReturn(run func(int64) bool) *MockS func (_m *MockSegment) GetIndex(fieldID int64) *IndexedFieldInfo { ret := _m.Called(fieldID) + if len(ret) == 0 { + panic("no return value specified for GetIndex") + } + var r0 *IndexedFieldInfo if rf, ok := ret.Get(0).(func(int64) *IndexedFieldInfo); ok { r0 = rf(fieldID) @@ -338,6 +366,10 @@ func (_c *MockSegment_GetIndex_Call) RunAndReturn(run func(int64) *IndexedFieldI func (_m *MockSegment) HasRawData(fieldID int64) bool { ret := _m.Called(fieldID) + if len(ret) == 0 { + panic("no return value specified for HasRawData") + } + var r0 bool if rf, ok := ret.Get(0).(func(int64) bool); ok { r0 = rf(fieldID) @@ -380,6 +412,10 @@ func (_c *MockSegment_HasRawData_Call) RunAndReturn(run func(int64) bool) *MockS func (_m *MockSegment) ID() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ID") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -421,6 +457,10 @@ func (_c *MockSegment_ID_Call) RunAndReturn(run func() int64) *MockSegment_ID_Ca func (_m *MockSegment) Indexes() []*IndexedFieldInfo { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Indexes") + } + var r0 []*IndexedFieldInfo if rf, ok := ret.Get(0).(func() []*IndexedFieldInfo); ok { r0 = rf() @@ -464,6 +504,10 @@ func (_c *MockSegment_Indexes_Call) RunAndReturn(run func() []*IndexedFieldInfo) func (_m *MockSegment) Insert(ctx context.Context, rowIDs []int64, timestamps []uint64, record *segcorepb.InsertRecord) error { ret := _m.Called(ctx, rowIDs, timestamps, record) + if len(ret) == 0 { + panic("no return value specified for Insert") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, []int64, []uint64, *segcorepb.InsertRecord) error); ok { r0 = rf(ctx, rowIDs, timestamps, record) @@ -509,6 +553,10 @@ func (_c *MockSegment_Insert_Call) RunAndReturn(run func(context.Context, []int6 func (_m *MockSegment) InsertCount() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for InsertCount") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -550,6 +598,10 @@ func (_c *MockSegment_InsertCount_Call) RunAndReturn(run func() int64) *MockSegm func (_m *MockSegment) IsLazyLoad() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for IsLazyLoad") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -591,6 +643,10 @@ func (_c *MockSegment_IsLazyLoad_Call) RunAndReturn(run func() bool) *MockSegmen func (_m *MockSegment) IsSorted() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for IsSorted") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -628,10 +684,61 @@ func (_c *MockSegment_IsSorted_Call) RunAndReturn(run func() bool) *MockSegment_ return _c } +// JsonIndexes provides a mock function with given fields: +func (_m *MockSegment) JsonIndexes() []*IndexedFieldInfo { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for JsonIndexes") + } + + var r0 []*IndexedFieldInfo + if rf, ok := ret.Get(0).(func() []*IndexedFieldInfo); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*IndexedFieldInfo) + } + } + + return r0 +} + +// MockSegment_JsonIndexes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'JsonIndexes' +type MockSegment_JsonIndexes_Call struct { + *mock.Call +} + +// JsonIndexes is a helper method to define mock.On call +func (_e *MockSegment_Expecter) JsonIndexes() *MockSegment_JsonIndexes_Call { + return &MockSegment_JsonIndexes_Call{Call: _e.mock.On("JsonIndexes")} +} + +func (_c *MockSegment_JsonIndexes_Call) Run(run func()) *MockSegment_JsonIndexes_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockSegment_JsonIndexes_Call) Return(_a0 []*IndexedFieldInfo) *MockSegment_JsonIndexes_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockSegment_JsonIndexes_Call) RunAndReturn(run func() []*IndexedFieldInfo) *MockSegment_JsonIndexes_Call { + _c.Call.Return(run) + return _c +} + // LastDeltaTimestamp provides a mock function with given fields: func (_m *MockSegment) LastDeltaTimestamp() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LastDeltaTimestamp") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -673,6 +780,10 @@ func (_c *MockSegment_LastDeltaTimestamp_Call) RunAndReturn(run func() uint64) * func (_m *MockSegment) Level() datapb.SegmentLevel { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Level") + } + var r0 datapb.SegmentLevel if rf, ok := ret.Get(0).(func() datapb.SegmentLevel); ok { r0 = rf() @@ -714,6 +825,10 @@ func (_c *MockSegment_Level_Call) RunAndReturn(run func() datapb.SegmentLevel) * func (_m *MockSegment) LoadDeltaData(ctx context.Context, deltaData *storage.DeleteData) error { ret := _m.Called(ctx, deltaData) + if len(ret) == 0 { + panic("no return value specified for LoadDeltaData") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *storage.DeleteData) error); ok { r0 = rf(ctx, deltaData) @@ -757,6 +872,10 @@ func (_c *MockSegment_LoadDeltaData_Call) RunAndReturn(run func(context.Context, func (_m *MockSegment) LoadInfo() *querypb.SegmentLoadInfo { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LoadInfo") + } + var r0 *querypb.SegmentLoadInfo if rf, ok := ret.Get(0).(func() *querypb.SegmentLoadInfo); ok { r0 = rf() @@ -800,6 +919,10 @@ func (_c *MockSegment_LoadInfo_Call) RunAndReturn(run func() *querypb.SegmentLoa func (_m *MockSegment) MayPkExist(lc *storage.LocationsCache) bool { ret := _m.Called(lc) + if len(ret) == 0 { + panic("no return value specified for MayPkExist") + } + var r0 bool if rf, ok := ret.Get(0).(func(*storage.LocationsCache) bool); ok { r0 = rf(lc) @@ -842,6 +965,10 @@ func (_c *MockSegment_MayPkExist_Call) RunAndReturn(run func(*storage.LocationsC func (_m *MockSegment) MemSize() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for MemSize") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -883,6 +1010,10 @@ func (_c *MockSegment_MemSize_Call) RunAndReturn(run func() int64) *MockSegment_ func (_m *MockSegment) NeedUpdatedVersion() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NeedUpdatedVersion") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -924,6 +1055,10 @@ func (_c *MockSegment_NeedUpdatedVersion_Call) RunAndReturn(run func() int64) *M func (_m *MockSegment) Partition() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Partition") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -965,6 +1100,10 @@ func (_c *MockSegment_Partition_Call) RunAndReturn(run func() int64) *MockSegmen func (_m *MockSegment) PinIfNotReleased() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PinIfNotReleased") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -1054,6 +1193,10 @@ func (_c *MockSegment_Release_Call) RunAndReturn(run func(context.Context, ...re func (_m *MockSegment) RemoveUnusedFieldFiles() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RemoveUnusedFieldFiles") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -1128,6 +1271,10 @@ func (_c *MockSegment_ResetIndexesLazyLoad_Call) RunAndReturn(run func(bool)) *M func (_m *MockSegment) ResourceGroup() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ResourceGroup") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -1169,6 +1316,10 @@ func (_c *MockSegment_ResourceGroup_Call) RunAndReturn(run func() string) *MockS func (_m *MockSegment) ResourceUsageEstimate() ResourceUsage { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ResourceUsageEstimate") + } + var r0 ResourceUsage if rf, ok := ret.Get(0).(func() ResourceUsage); ok { r0 = rf() @@ -1210,6 +1361,10 @@ func (_c *MockSegment_ResourceUsageEstimate_Call) RunAndReturn(run func() Resour func (_m *MockSegment) Retrieve(ctx context.Context, plan *RetrievePlan) (*segcorepb.RetrieveResults, error) { ret := _m.Called(ctx, plan) + if len(ret) == 0 { + panic("no return value specified for Retrieve") + } + var r0 *segcorepb.RetrieveResults var r1 error if rf, ok := ret.Get(0).(func(context.Context, *RetrievePlan) (*segcorepb.RetrieveResults, error)); ok { @@ -1265,6 +1420,10 @@ func (_c *MockSegment_Retrieve_Call) RunAndReturn(run func(context.Context, *Ret func (_m *MockSegment) RetrieveByOffsets(ctx context.Context, plan *RetrievePlan, offsets []int64) (*segcorepb.RetrieveResults, error) { ret := _m.Called(ctx, plan, offsets) + if len(ret) == 0 { + panic("no return value specified for RetrieveByOffsets") + } + var r0 *segcorepb.RetrieveResults var r1 error if rf, ok := ret.Get(0).(func(context.Context, *RetrievePlan, []int64) (*segcorepb.RetrieveResults, error)); ok { @@ -1321,6 +1480,10 @@ func (_c *MockSegment_RetrieveByOffsets_Call) RunAndReturn(run func(context.Cont func (_m *MockSegment) RowNum() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RowNum") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -1362,6 +1525,10 @@ func (_c *MockSegment_RowNum_Call) RunAndReturn(run func() int64) *MockSegment_R func (_m *MockSegment) Search(ctx context.Context, searchReq *SearchRequest) (*SearchResult, error) { ret := _m.Called(ctx, searchReq) + if len(ret) == 0 { + panic("no return value specified for Search") + } + var r0 *SearchResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, *SearchRequest) (*SearchResult, error)); ok { @@ -1417,6 +1584,10 @@ func (_c *MockSegment_Search_Call) RunAndReturn(run func(context.Context, *Searc func (_m *MockSegment) Shard() metautil.Channel { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Shard") + } + var r0 metautil.Channel if rf, ok := ret.Get(0).(func() metautil.Channel); ok { r0 = rf() @@ -1458,6 +1629,10 @@ func (_c *MockSegment_Shard_Call) RunAndReturn(run func() metautil.Channel) *Moc func (_m *MockSegment) StartPosition() *msgpb.MsgPosition { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StartPosition") + } + var r0 *msgpb.MsgPosition if rf, ok := ret.Get(0).(func() *msgpb.MsgPosition); ok { r0 = rf() @@ -1501,6 +1676,10 @@ func (_c *MockSegment_StartPosition_Call) RunAndReturn(run func() *msgpb.MsgPosi func (_m *MockSegment) Type() commonpb.SegmentState { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Type") + } + var r0 commonpb.SegmentState if rf, ok := ret.Get(0).(func() commonpb.SegmentState); ok { r0 = rf() @@ -1607,6 +1786,10 @@ func (_c *MockSegment_UpdateBloomFilter_Call) RunAndReturn(run func([]storage.Pr func (_m *MockSegment) Version() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Version") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() diff --git a/internal/querynodev2/segments/mock_segment_manager.go b/internal/querynodev2/segments/mock_segment_manager.go index 01d1cb6cca3dd..a4598e665d5d7 100644 --- a/internal/querynodev2/segments/mock_segment_manager.go +++ b/internal/querynodev2/segments/mock_segment_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.46.0. DO NOT EDIT. package segments @@ -62,6 +62,10 @@ func (_c *MockSegmentManager_Clear_Call) RunAndReturn(run func(context.Context)) func (_m *MockSegmentManager) Empty() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Empty") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -103,6 +107,10 @@ func (_c *MockSegmentManager_Empty_Call) RunAndReturn(run func() bool) *MockSegm func (_m *MockSegmentManager) Exist(segmentID int64, typ commonpb.SegmentState) bool { ret := _m.Called(segmentID, typ) + if len(ret) == 0 { + panic("no return value specified for Exist") + } + var r0 bool if rf, ok := ret.Get(0).(func(int64, commonpb.SegmentState) bool); ok { r0 = rf(segmentID, typ) @@ -146,6 +154,10 @@ func (_c *MockSegmentManager_Exist_Call) RunAndReturn(run func(int64, commonpb.S func (_m *MockSegmentManager) Get(segmentID int64) Segment { ret := _m.Called(segmentID) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 Segment if rf, ok := ret.Get(0).(func(int64) Segment); ok { r0 = rf(segmentID) @@ -197,6 +209,10 @@ func (_m *MockSegmentManager) GetAndPin(segments []int64, filters ...SegmentFilt _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetAndPin") + } + var r0 []Segment var r1 error if rf, ok := ret.Get(0).(func([]int64, ...SegmentFilter) ([]Segment, error)); ok { @@ -265,6 +281,10 @@ func (_m *MockSegmentManager) GetAndPinBy(filters ...SegmentFilter) ([]Segment, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetAndPinBy") + } + var r0 []Segment var r1 error if rf, ok := ret.Get(0).(func(...SegmentFilter) ([]Segment, error)); ok { @@ -332,6 +352,10 @@ func (_m *MockSegmentManager) GetBy(filters ...SegmentFilter) []Segment { _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetBy") + } + var r0 []Segment if rf, ok := ret.Get(0).(func(...SegmentFilter) []Segment); ok { r0 = rf(filters...) @@ -383,6 +407,10 @@ func (_c *MockSegmentManager_GetBy_Call) RunAndReturn(run func(...SegmentFilter) func (_m *MockSegmentManager) GetGrowing(segmentID int64) Segment { ret := _m.Called(segmentID) + if len(ret) == 0 { + panic("no return value specified for GetGrowing") + } + var r0 Segment if rf, ok := ret.Get(0).(func(int64) Segment); ok { r0 = rf(segmentID) @@ -427,6 +455,10 @@ func (_c *MockSegmentManager_GetGrowing_Call) RunAndReturn(run func(int64) Segme func (_m *MockSegmentManager) GetSealed(segmentID int64) Segment { ret := _m.Called(segmentID) + if len(ret) == 0 { + panic("no return value specified for GetSealed") + } + var r0 Segment if rf, ok := ret.Get(0).(func(int64) Segment); ok { r0 = rf(segmentID) @@ -471,6 +503,10 @@ func (_c *MockSegmentManager_GetSealed_Call) RunAndReturn(run func(int64) Segmen func (_m *MockSegmentManager) GetWithType(segmentID int64, typ commonpb.SegmentState) Segment { ret := _m.Called(segmentID, typ) + if len(ret) == 0 { + panic("no return value specified for GetWithType") + } + var r0 Segment if rf, ok := ret.Get(0).(func(int64, commonpb.SegmentState) Segment); ok { r0 = rf(segmentID, typ) @@ -565,6 +601,10 @@ func (_c *MockSegmentManager_Put_Call) RunAndReturn(run func(context.Context, co func (_m *MockSegmentManager) Remove(ctx context.Context, segmentID int64, scope querypb.DataScope) (int, int) { ret := _m.Called(ctx, segmentID, scope) + if len(ret) == 0 { + panic("no return value specified for Remove") + } + var r0 int var r1 int if rf, ok := ret.Get(0).(func(context.Context, int64, querypb.DataScope) (int, int)); ok { @@ -626,6 +666,10 @@ func (_m *MockSegmentManager) RemoveBy(ctx context.Context, filters ...SegmentFi _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for RemoveBy") + } + var r0 int var r1 int if rf, ok := ret.Get(0).(func(context.Context, ...SegmentFilter) (int, int)); ok { @@ -726,6 +770,10 @@ func (_m *MockSegmentManager) UpdateBy(action SegmentAction, filters ...SegmentF _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UpdateBy") + } + var r0 int if rf, ok := ret.Get(0).(func(SegmentAction, ...SegmentFilter) int); ok { r0 = rf(action, filters...)