Documentation ¶
Index ¶
- type BM25StatsFactory
- type MetaCache
- type MockMetaCache
- func (_m *MockMetaCache) AddSegment(segInfo *datapb.SegmentInfo, pkFactory PkStatsFactory, ...)
- func (_m *MockMetaCache) Collection() int64
- func (_m *MockMetaCache) DetectMissingSegments(segments map[int64]struct{}) []int64
- func (_m *MockMetaCache) EXPECT() *MockMetaCache_Expecter
- func (_m *MockMetaCache) GetSegmentByID(id int64, filters ...SegmentFilter) (*SegmentInfo, bool)
- func (_m *MockMetaCache) GetSegmentIDsBy(filters ...SegmentFilter) []int64
- func (_m *MockMetaCache) GetSegmentsBy(filters ...SegmentFilter) []*SegmentInfo
- func (_m *MockMetaCache) PredictSegments(pk storage.PrimaryKey, filters ...SegmentFilter) ([]int64, bool)
- func (_m *MockMetaCache) RemoveSegments(filters ...SegmentFilter) []int64
- func (_m *MockMetaCache) Schema() *schemapb.CollectionSchema
- func (_m *MockMetaCache) UpdateSegmentView(partitionID int64, newSegments []*datapb.SyncSegmentInfo, ...)
- func (_m *MockMetaCache) UpdateSegments(action SegmentAction, filters ...SegmentFilter)
- type MockMetaCache_AddSegment_Call
- func (_c *MockMetaCache_AddSegment_Call) Return() *MockMetaCache_AddSegment_Call
- func (_c *MockMetaCache_AddSegment_Call) Run(run func(segInfo *datapb.SegmentInfo, pkFactory PkStatsFactory, ...)) *MockMetaCache_AddSegment_Call
- func (_c *MockMetaCache_AddSegment_Call) RunAndReturn(...) *MockMetaCache_AddSegment_Call
- type MockMetaCache_Collection_Call
- type MockMetaCache_DetectMissingSegments_Call
- func (_c *MockMetaCache_DetectMissingSegments_Call) Return(_a0 []int64) *MockMetaCache_DetectMissingSegments_Call
- func (_c *MockMetaCache_DetectMissingSegments_Call) Run(run func(segments map[int64]struct{})) *MockMetaCache_DetectMissingSegments_Call
- func (_c *MockMetaCache_DetectMissingSegments_Call) RunAndReturn(run func(map[int64]struct{}) []int64) *MockMetaCache_DetectMissingSegments_Call
- type MockMetaCache_Expecter
- func (_e *MockMetaCache_Expecter) AddSegment(segInfo interface{}, pkFactory interface{}, bmFactory interface{}, ...) *MockMetaCache_AddSegment_Call
- func (_e *MockMetaCache_Expecter) Collection() *MockMetaCache_Collection_Call
- func (_e *MockMetaCache_Expecter) DetectMissingSegments(segments interface{}) *MockMetaCache_DetectMissingSegments_Call
- func (_e *MockMetaCache_Expecter) GetSegmentByID(id interface{}, filters ...interface{}) *MockMetaCache_GetSegmentByID_Call
- func (_e *MockMetaCache_Expecter) GetSegmentIDsBy(filters ...interface{}) *MockMetaCache_GetSegmentIDsBy_Call
- func (_e *MockMetaCache_Expecter) GetSegmentsBy(filters ...interface{}) *MockMetaCache_GetSegmentsBy_Call
- func (_e *MockMetaCache_Expecter) PredictSegments(pk interface{}, filters ...interface{}) *MockMetaCache_PredictSegments_Call
- func (_e *MockMetaCache_Expecter) RemoveSegments(filters ...interface{}) *MockMetaCache_RemoveSegments_Call
- func (_e *MockMetaCache_Expecter) Schema() *MockMetaCache_Schema_Call
- func (_e *MockMetaCache_Expecter) UpdateSegmentView(partitionID interface{}, newSegments interface{}, newSegmentsBF interface{}, ...) *MockMetaCache_UpdateSegmentView_Call
- func (_e *MockMetaCache_Expecter) UpdateSegments(action interface{}, filters ...interface{}) *MockMetaCache_UpdateSegments_Call
- type MockMetaCache_GetSegmentByID_Call
- func (_c *MockMetaCache_GetSegmentByID_Call) Return(_a0 *SegmentInfo, _a1 bool) *MockMetaCache_GetSegmentByID_Call
- func (_c *MockMetaCache_GetSegmentByID_Call) Run(run func(id int64, filters ...SegmentFilter)) *MockMetaCache_GetSegmentByID_Call
- func (_c *MockMetaCache_GetSegmentByID_Call) RunAndReturn(run func(int64, ...SegmentFilter) (*SegmentInfo, bool)) *MockMetaCache_GetSegmentByID_Call
- type MockMetaCache_GetSegmentIDsBy_Call
- func (_c *MockMetaCache_GetSegmentIDsBy_Call) Return(_a0 []int64) *MockMetaCache_GetSegmentIDsBy_Call
- func (_c *MockMetaCache_GetSegmentIDsBy_Call) Run(run func(filters ...SegmentFilter)) *MockMetaCache_GetSegmentIDsBy_Call
- func (_c *MockMetaCache_GetSegmentIDsBy_Call) RunAndReturn(run func(...SegmentFilter) []int64) *MockMetaCache_GetSegmentIDsBy_Call
- type MockMetaCache_GetSegmentsBy_Call
- func (_c *MockMetaCache_GetSegmentsBy_Call) Return(_a0 []*SegmentInfo) *MockMetaCache_GetSegmentsBy_Call
- func (_c *MockMetaCache_GetSegmentsBy_Call) Run(run func(filters ...SegmentFilter)) *MockMetaCache_GetSegmentsBy_Call
- func (_c *MockMetaCache_GetSegmentsBy_Call) RunAndReturn(run func(...SegmentFilter) []*SegmentInfo) *MockMetaCache_GetSegmentsBy_Call
- type MockMetaCache_PredictSegments_Call
- func (_c *MockMetaCache_PredictSegments_Call) Return(_a0 []int64, _a1 bool) *MockMetaCache_PredictSegments_Call
- func (_c *MockMetaCache_PredictSegments_Call) Run(run func(pk storage.PrimaryKey, filters ...SegmentFilter)) *MockMetaCache_PredictSegments_Call
- func (_c *MockMetaCache_PredictSegments_Call) RunAndReturn(run func(storage.PrimaryKey, ...SegmentFilter) ([]int64, bool)) *MockMetaCache_PredictSegments_Call
- type MockMetaCache_RemoveSegments_Call
- func (_c *MockMetaCache_RemoveSegments_Call) Return(_a0 []int64) *MockMetaCache_RemoveSegments_Call
- func (_c *MockMetaCache_RemoveSegments_Call) Run(run func(filters ...SegmentFilter)) *MockMetaCache_RemoveSegments_Call
- func (_c *MockMetaCache_RemoveSegments_Call) RunAndReturn(run func(...SegmentFilter) []int64) *MockMetaCache_RemoveSegments_Call
- type MockMetaCache_Schema_Call
- type MockMetaCache_UpdateSegmentView_Call
- func (_c *MockMetaCache_UpdateSegmentView_Call) Return() *MockMetaCache_UpdateSegmentView_Call
- func (_c *MockMetaCache_UpdateSegmentView_Call) Run(run func(partitionID int64, newSegments []*datapb.SyncSegmentInfo, ...)) *MockMetaCache_UpdateSegmentView_Call
- func (_c *MockMetaCache_UpdateSegmentView_Call) RunAndReturn(run func(int64, []*datapb.SyncSegmentInfo, []*pkoracle.BloomFilterSet, ...)) *MockMetaCache_UpdateSegmentView_Call
- type MockMetaCache_UpdateSegments_Call
- func (_c *MockMetaCache_UpdateSegments_Call) Return() *MockMetaCache_UpdateSegments_Call
- func (_c *MockMetaCache_UpdateSegments_Call) Run(run func(action SegmentAction, filters ...SegmentFilter)) *MockMetaCache_UpdateSegments_Call
- func (_c *MockMetaCache_UpdateSegments_Call) RunAndReturn(run func(SegmentAction, ...SegmentFilter)) *MockMetaCache_UpdateSegments_Call
- type PkStatsFactory
- type SegmentAction
- func FinishSyncing(batchSize int64) SegmentAction
- func MergeBm25Stats(newStats map[int64]*storage.BM25Stats) SegmentAction
- func MergeSegmentAction(actions ...SegmentAction) SegmentAction
- func RollStats(newStats ...*storage.PrimaryKeyStats) SegmentAction
- func SegmentActions(actions ...SegmentAction) SegmentAction
- func SetStartPosRecorded(flag bool) SegmentAction
- func SetStartPositionIfNil(startPos *msgpb.MsgPosition) SegmentAction
- func StartSyncing(batchSize int64) SegmentAction
- func UpdateBufferedRows(bufferedRows int64) SegmentAction
- func UpdateCheckpoint(checkpoint *msgpb.MsgPosition) SegmentAction
- func UpdateNumOfRows(numOfRows int64) SegmentAction
- func UpdateState(state commonpb.SegmentState) SegmentAction
- type SegmentBM25Stats
- type SegmentFilter
- func WithLevel(level datapb.SegmentLevel) SegmentFilter
- func WithNoSyncingTask() SegmentFilter
- func WithPartitionID(partitionID int64) SegmentFilter
- func WithPartitionIDs(partitionIDs []int64) SegmentFilter
- func WithSegmentIDs(segmentIDs ...int64) SegmentFilter
- func WithSegmentState(states ...commonpb.SegmentState) SegmentFilter
- func WithStartPosNotRecorded() SegmentFilter
- type SegmentFilterFunc
- type SegmentIDFilter
- type SegmentInfo
- func (s *SegmentInfo) BufferRows() int64
- func (s *SegmentInfo) Checkpoint() *msgpb.MsgPosition
- func (s *SegmentInfo) Clone() *SegmentInfo
- func (s *SegmentInfo) FlushedRows() int64
- func (s *SegmentInfo) GetBM25Stats() *SegmentBM25Stats
- func (s *SegmentInfo) GetBloomFilterSet() pkoracle.PkStat
- func (s *SegmentInfo) GetHistory() []*storage.PkStatistics
- func (s *SegmentInfo) Level() datapb.SegmentLevel
- func (s *SegmentInfo) NumOfRows() int64
- func (s *SegmentInfo) PartitionID() int64
- func (s *SegmentInfo) SegmentID() int64
- func (s *SegmentInfo) StartPosition() *msgpb.MsgPosition
- func (s *SegmentInfo) State() commonpb.SegmentState
- func (s *SegmentInfo) SyncingRows() int64
- type SegmentStateFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BM25StatsFactory ¶
type BM25StatsFactory func(vchannel *datapb.SegmentInfo) *SegmentBM25Stats
type MetaCache ¶
type MetaCache interface { // Collection returns collection id of metacache. Collection() int64 // Schema returns collection schema. Schema() *schemapb.CollectionSchema // AddSegment adds a segment from segment info. AddSegment(segInfo *datapb.SegmentInfo, pkFactory PkStatsFactory, bmFactory BM25StatsFactory, actions ...SegmentAction) // UpdateSegments applies action to segment(s) satisfy the provided filters. UpdateSegments(action SegmentAction, filters ...SegmentFilter) // RemoveSegments removes segments matches the provided filter. RemoveSegments(filters ...SegmentFilter) []int64 // GetSegmentsBy returns segments statify the provided filters. GetSegmentsBy(filters ...SegmentFilter) []*SegmentInfo // GetSegmentByID returns segment with provided segment id if exists. GetSegmentByID(id int64, filters ...SegmentFilter) (*SegmentInfo, bool) // GetSegmentIDs returns ids of segments which satifiy the provided filters. GetSegmentIDsBy(filters ...SegmentFilter) []int64 // PredictSegments returns the segment ids which may contain the provided primary key. PredictSegments(pk storage.PrimaryKey, filters ...SegmentFilter) ([]int64, bool) // DetectMissingSegments returns the segment ids which is missing in datanode. DetectMissingSegments(segments map[int64]struct{}) []int64 // UpdateSegmentView updates the segments BF from datacoord view. UpdateSegmentView(partitionID int64, newSegments []*datapb.SyncSegmentInfo, newSegmentsBF []*pkoracle.BloomFilterSet, allSegments map[int64]struct{}) }
func NewMetaCache ¶
func NewMetaCache(info *datapb.ChannelWatchInfo, pkFactory PkStatsFactory, bmFactor BM25StatsFactory) MetaCache
type MockMetaCache ¶
MockMetaCache is an autogenerated mock type for the MetaCache type
func NewMockMetaCache ¶
func NewMockMetaCache(t interface { mock.TestingT Cleanup(func()) }) *MockMetaCache
NewMockMetaCache creates a new instance of MockMetaCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockMetaCache) AddSegment ¶
func (_m *MockMetaCache) AddSegment(segInfo *datapb.SegmentInfo, pkFactory PkStatsFactory, bmFactory BM25StatsFactory, actions ...SegmentAction)
AddSegment provides a mock function with given fields: segInfo, pkFactory, bmFactory, actions
func (*MockMetaCache) Collection ¶
func (_m *MockMetaCache) Collection() int64
Collection provides a mock function with given fields:
func (*MockMetaCache) DetectMissingSegments ¶
func (_m *MockMetaCache) DetectMissingSegments(segments map[int64]struct{}) []int64
DetectMissingSegments provides a mock function with given fields: segments
func (*MockMetaCache) EXPECT ¶
func (_m *MockMetaCache) EXPECT() *MockMetaCache_Expecter
func (*MockMetaCache) GetSegmentByID ¶
func (_m *MockMetaCache) GetSegmentByID(id int64, filters ...SegmentFilter) (*SegmentInfo, bool)
GetSegmentByID provides a mock function with given fields: id, filters
func (*MockMetaCache) GetSegmentIDsBy ¶
func (_m *MockMetaCache) GetSegmentIDsBy(filters ...SegmentFilter) []int64
GetSegmentIDsBy provides a mock function with given fields: filters
func (*MockMetaCache) GetSegmentsBy ¶
func (_m *MockMetaCache) GetSegmentsBy(filters ...SegmentFilter) []*SegmentInfo
GetSegmentsBy provides a mock function with given fields: filters
func (*MockMetaCache) PredictSegments ¶
func (_m *MockMetaCache) PredictSegments(pk storage.PrimaryKey, filters ...SegmentFilter) ([]int64, bool)
PredictSegments provides a mock function with given fields: pk, filters
func (*MockMetaCache) RemoveSegments ¶
func (_m *MockMetaCache) RemoveSegments(filters ...SegmentFilter) []int64
RemoveSegments provides a mock function with given fields: filters
func (*MockMetaCache) Schema ¶
func (_m *MockMetaCache) Schema() *schemapb.CollectionSchema
Schema provides a mock function with given fields:
func (*MockMetaCache) UpdateSegmentView ¶
func (_m *MockMetaCache) UpdateSegmentView(partitionID int64, newSegments []*datapb.SyncSegmentInfo, newSegmentsBF []*pkoracle.BloomFilterSet, allSegments map[int64]struct{})
UpdateSegmentView provides a mock function with given fields: partitionID, newSegments, newSegmentsBF, allSegments
func (*MockMetaCache) UpdateSegments ¶
func (_m *MockMetaCache) UpdateSegments(action SegmentAction, filters ...SegmentFilter)
UpdateSegments provides a mock function with given fields: action, filters
type MockMetaCache_AddSegment_Call ¶
MockMetaCache_AddSegment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddSegment'
func (*MockMetaCache_AddSegment_Call) Return ¶
func (_c *MockMetaCache_AddSegment_Call) Return() *MockMetaCache_AddSegment_Call
func (*MockMetaCache_AddSegment_Call) Run ¶
func (_c *MockMetaCache_AddSegment_Call) Run(run func(segInfo *datapb.SegmentInfo, pkFactory PkStatsFactory, bmFactory BM25StatsFactory, actions ...SegmentAction)) *MockMetaCache_AddSegment_Call
func (*MockMetaCache_AddSegment_Call) RunAndReturn ¶
func (_c *MockMetaCache_AddSegment_Call) RunAndReturn(run func(*datapb.SegmentInfo, PkStatsFactory, BM25StatsFactory, ...SegmentAction)) *MockMetaCache_AddSegment_Call
type MockMetaCache_Collection_Call ¶
MockMetaCache_Collection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Collection'
func (*MockMetaCache_Collection_Call) Return ¶
func (_c *MockMetaCache_Collection_Call) Return(_a0 int64) *MockMetaCache_Collection_Call
func (*MockMetaCache_Collection_Call) Run ¶
func (_c *MockMetaCache_Collection_Call) Run(run func()) *MockMetaCache_Collection_Call
func (*MockMetaCache_Collection_Call) RunAndReturn ¶
func (_c *MockMetaCache_Collection_Call) RunAndReturn(run func() int64) *MockMetaCache_Collection_Call
type MockMetaCache_DetectMissingSegments_Call ¶
MockMetaCache_DetectMissingSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DetectMissingSegments'
func (*MockMetaCache_DetectMissingSegments_Call) Return ¶
func (_c *MockMetaCache_DetectMissingSegments_Call) Return(_a0 []int64) *MockMetaCache_DetectMissingSegments_Call
func (*MockMetaCache_DetectMissingSegments_Call) Run ¶
func (_c *MockMetaCache_DetectMissingSegments_Call) Run(run func(segments map[int64]struct{})) *MockMetaCache_DetectMissingSegments_Call
func (*MockMetaCache_DetectMissingSegments_Call) RunAndReturn ¶
func (_c *MockMetaCache_DetectMissingSegments_Call) RunAndReturn(run func(map[int64]struct{}) []int64) *MockMetaCache_DetectMissingSegments_Call
type MockMetaCache_Expecter ¶
type MockMetaCache_Expecter struct {
// contains filtered or unexported fields
}
func (*MockMetaCache_Expecter) AddSegment ¶
func (_e *MockMetaCache_Expecter) AddSegment(segInfo interface{}, pkFactory interface{}, bmFactory interface{}, actions ...interface{}) *MockMetaCache_AddSegment_Call
AddSegment is a helper method to define mock.On call
- segInfo *datapb.SegmentInfo
- pkFactory PkStatsFactory
- bmFactory BM25StatsFactory
- actions ...SegmentAction
func (*MockMetaCache_Expecter) Collection ¶
func (_e *MockMetaCache_Expecter) Collection() *MockMetaCache_Collection_Call
Collection is a helper method to define mock.On call
func (*MockMetaCache_Expecter) DetectMissingSegments ¶
func (_e *MockMetaCache_Expecter) DetectMissingSegments(segments interface{}) *MockMetaCache_DetectMissingSegments_Call
DetectMissingSegments is a helper method to define mock.On call
- segments map[int64]struct{}
func (*MockMetaCache_Expecter) GetSegmentByID ¶
func (_e *MockMetaCache_Expecter) GetSegmentByID(id interface{}, filters ...interface{}) *MockMetaCache_GetSegmentByID_Call
GetSegmentByID is a helper method to define mock.On call
- id int64
- filters ...SegmentFilter
func (*MockMetaCache_Expecter) GetSegmentIDsBy ¶
func (_e *MockMetaCache_Expecter) GetSegmentIDsBy(filters ...interface{}) *MockMetaCache_GetSegmentIDsBy_Call
GetSegmentIDsBy is a helper method to define mock.On call
- filters ...SegmentFilter
func (*MockMetaCache_Expecter) GetSegmentsBy ¶
func (_e *MockMetaCache_Expecter) GetSegmentsBy(filters ...interface{}) *MockMetaCache_GetSegmentsBy_Call
GetSegmentsBy is a helper method to define mock.On call
- filters ...SegmentFilter
func (*MockMetaCache_Expecter) PredictSegments ¶
func (_e *MockMetaCache_Expecter) PredictSegments(pk interface{}, filters ...interface{}) *MockMetaCache_PredictSegments_Call
PredictSegments is a helper method to define mock.On call
- pk storage.PrimaryKey
- filters ...SegmentFilter
func (*MockMetaCache_Expecter) RemoveSegments ¶
func (_e *MockMetaCache_Expecter) RemoveSegments(filters ...interface{}) *MockMetaCache_RemoveSegments_Call
RemoveSegments is a helper method to define mock.On call
- filters ...SegmentFilter
func (*MockMetaCache_Expecter) Schema ¶
func (_e *MockMetaCache_Expecter) Schema() *MockMetaCache_Schema_Call
Schema is a helper method to define mock.On call
func (*MockMetaCache_Expecter) UpdateSegmentView ¶
func (_e *MockMetaCache_Expecter) UpdateSegmentView(partitionID interface{}, newSegments interface{}, newSegmentsBF interface{}, allSegments interface{}) *MockMetaCache_UpdateSegmentView_Call
UpdateSegmentView is a helper method to define mock.On call
- partitionID int64
- newSegments []*datapb.SyncSegmentInfo
- newSegmentsBF []*pkoracle.BloomFilterSet
- allSegments map[int64]struct{}
func (*MockMetaCache_Expecter) UpdateSegments ¶
func (_e *MockMetaCache_Expecter) UpdateSegments(action interface{}, filters ...interface{}) *MockMetaCache_UpdateSegments_Call
UpdateSegments is a helper method to define mock.On call
- action SegmentAction
- filters ...SegmentFilter
type MockMetaCache_GetSegmentByID_Call ¶
MockMetaCache_GetSegmentByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSegmentByID'
func (*MockMetaCache_GetSegmentByID_Call) Return ¶
func (_c *MockMetaCache_GetSegmentByID_Call) Return(_a0 *SegmentInfo, _a1 bool) *MockMetaCache_GetSegmentByID_Call
func (*MockMetaCache_GetSegmentByID_Call) Run ¶
func (_c *MockMetaCache_GetSegmentByID_Call) Run(run func(id int64, filters ...SegmentFilter)) *MockMetaCache_GetSegmentByID_Call
func (*MockMetaCache_GetSegmentByID_Call) RunAndReturn ¶
func (_c *MockMetaCache_GetSegmentByID_Call) RunAndReturn(run func(int64, ...SegmentFilter) (*SegmentInfo, bool)) *MockMetaCache_GetSegmentByID_Call
type MockMetaCache_GetSegmentIDsBy_Call ¶
MockMetaCache_GetSegmentIDsBy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSegmentIDsBy'
func (*MockMetaCache_GetSegmentIDsBy_Call) Return ¶
func (_c *MockMetaCache_GetSegmentIDsBy_Call) Return(_a0 []int64) *MockMetaCache_GetSegmentIDsBy_Call
func (*MockMetaCache_GetSegmentIDsBy_Call) Run ¶
func (_c *MockMetaCache_GetSegmentIDsBy_Call) Run(run func(filters ...SegmentFilter)) *MockMetaCache_GetSegmentIDsBy_Call
func (*MockMetaCache_GetSegmentIDsBy_Call) RunAndReturn ¶
func (_c *MockMetaCache_GetSegmentIDsBy_Call) RunAndReturn(run func(...SegmentFilter) []int64) *MockMetaCache_GetSegmentIDsBy_Call
type MockMetaCache_GetSegmentsBy_Call ¶
MockMetaCache_GetSegmentsBy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSegmentsBy'
func (*MockMetaCache_GetSegmentsBy_Call) Return ¶
func (_c *MockMetaCache_GetSegmentsBy_Call) Return(_a0 []*SegmentInfo) *MockMetaCache_GetSegmentsBy_Call
func (*MockMetaCache_GetSegmentsBy_Call) Run ¶
func (_c *MockMetaCache_GetSegmentsBy_Call) Run(run func(filters ...SegmentFilter)) *MockMetaCache_GetSegmentsBy_Call
func (*MockMetaCache_GetSegmentsBy_Call) RunAndReturn ¶
func (_c *MockMetaCache_GetSegmentsBy_Call) RunAndReturn(run func(...SegmentFilter) []*SegmentInfo) *MockMetaCache_GetSegmentsBy_Call
type MockMetaCache_PredictSegments_Call ¶
MockMetaCache_PredictSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PredictSegments'
func (*MockMetaCache_PredictSegments_Call) Return ¶
func (_c *MockMetaCache_PredictSegments_Call) Return(_a0 []int64, _a1 bool) *MockMetaCache_PredictSegments_Call
func (*MockMetaCache_PredictSegments_Call) Run ¶
func (_c *MockMetaCache_PredictSegments_Call) Run(run func(pk storage.PrimaryKey, filters ...SegmentFilter)) *MockMetaCache_PredictSegments_Call
func (*MockMetaCache_PredictSegments_Call) RunAndReturn ¶
func (_c *MockMetaCache_PredictSegments_Call) RunAndReturn(run func(storage.PrimaryKey, ...SegmentFilter) ([]int64, bool)) *MockMetaCache_PredictSegments_Call
type MockMetaCache_RemoveSegments_Call ¶
MockMetaCache_RemoveSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveSegments'
func (*MockMetaCache_RemoveSegments_Call) Return ¶
func (_c *MockMetaCache_RemoveSegments_Call) Return(_a0 []int64) *MockMetaCache_RemoveSegments_Call
func (*MockMetaCache_RemoveSegments_Call) Run ¶
func (_c *MockMetaCache_RemoveSegments_Call) Run(run func(filters ...SegmentFilter)) *MockMetaCache_RemoveSegments_Call
func (*MockMetaCache_RemoveSegments_Call) RunAndReturn ¶
func (_c *MockMetaCache_RemoveSegments_Call) RunAndReturn(run func(...SegmentFilter) []int64) *MockMetaCache_RemoveSegments_Call
type MockMetaCache_Schema_Call ¶
MockMetaCache_Schema_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Schema'
func (*MockMetaCache_Schema_Call) Return ¶
func (_c *MockMetaCache_Schema_Call) Return(_a0 *schemapb.CollectionSchema) *MockMetaCache_Schema_Call
func (*MockMetaCache_Schema_Call) Run ¶
func (_c *MockMetaCache_Schema_Call) Run(run func()) *MockMetaCache_Schema_Call
func (*MockMetaCache_Schema_Call) RunAndReturn ¶
func (_c *MockMetaCache_Schema_Call) RunAndReturn(run func() *schemapb.CollectionSchema) *MockMetaCache_Schema_Call
type MockMetaCache_UpdateSegmentView_Call ¶
MockMetaCache_UpdateSegmentView_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateSegmentView'
func (*MockMetaCache_UpdateSegmentView_Call) Return ¶
func (_c *MockMetaCache_UpdateSegmentView_Call) Return() *MockMetaCache_UpdateSegmentView_Call
func (*MockMetaCache_UpdateSegmentView_Call) Run ¶
func (_c *MockMetaCache_UpdateSegmentView_Call) Run(run func(partitionID int64, newSegments []*datapb.SyncSegmentInfo, newSegmentsBF []*pkoracle.BloomFilterSet, allSegments map[int64]struct{})) *MockMetaCache_UpdateSegmentView_Call
func (*MockMetaCache_UpdateSegmentView_Call) RunAndReturn ¶
func (_c *MockMetaCache_UpdateSegmentView_Call) RunAndReturn(run func(int64, []*datapb.SyncSegmentInfo, []*pkoracle.BloomFilterSet, map[int64]struct{})) *MockMetaCache_UpdateSegmentView_Call
type MockMetaCache_UpdateSegments_Call ¶
MockMetaCache_UpdateSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateSegments'
func (*MockMetaCache_UpdateSegments_Call) Return ¶
func (_c *MockMetaCache_UpdateSegments_Call) Return() *MockMetaCache_UpdateSegments_Call
func (*MockMetaCache_UpdateSegments_Call) Run ¶
func (_c *MockMetaCache_UpdateSegments_Call) Run(run func(action SegmentAction, filters ...SegmentFilter)) *MockMetaCache_UpdateSegments_Call
func (*MockMetaCache_UpdateSegments_Call) RunAndReturn ¶
func (_c *MockMetaCache_UpdateSegments_Call) RunAndReturn(run func(SegmentAction, ...SegmentFilter)) *MockMetaCache_UpdateSegments_Call
type PkStatsFactory ¶
type PkStatsFactory func(vchannel *datapb.SegmentInfo) pkoracle.PkStat
type SegmentAction ¶
type SegmentAction func(info *SegmentInfo)
func FinishSyncing ¶
func FinishSyncing(batchSize int64) SegmentAction
func MergeBm25Stats ¶
func MergeBm25Stats(newStats map[int64]*storage.BM25Stats) SegmentAction
func MergeSegmentAction ¶
func MergeSegmentAction(actions ...SegmentAction) SegmentAction
MergeSegmentAction is the util function to merge multiple SegmentActions into one.
func RollStats ¶
func RollStats(newStats ...*storage.PrimaryKeyStats) SegmentAction
func SegmentActions ¶
func SegmentActions(actions ...SegmentAction) SegmentAction
func SetStartPosRecorded ¶
func SetStartPosRecorded(flag bool) SegmentAction
func SetStartPositionIfNil ¶
func SetStartPositionIfNil(startPos *msgpb.MsgPosition) SegmentAction
func StartSyncing ¶
func StartSyncing(batchSize int64) SegmentAction
func UpdateBufferedRows ¶
func UpdateBufferedRows(bufferedRows int64) SegmentAction
func UpdateCheckpoint ¶
func UpdateCheckpoint(checkpoint *msgpb.MsgPosition) SegmentAction
func UpdateNumOfRows ¶
func UpdateNumOfRows(numOfRows int64) SegmentAction
func UpdateState ¶
func UpdateState(state commonpb.SegmentState) SegmentAction
type SegmentBM25Stats ¶
type SegmentBM25Stats struct {
// contains filtered or unexported fields
}
func NewBM25StatsFactory ¶
func NewBM25StatsFactory(vchannel *datapb.SegmentInfo) *SegmentBM25Stats
func NewEmptySegmentBM25Stats ¶
func NewEmptySegmentBM25Stats() *SegmentBM25Stats
func NewSegmentBM25Stats ¶
func NewSegmentBM25Stats(stats map[int64]*storage.BM25Stats) *SegmentBM25Stats
func NoneBm25StatsFactory ¶
func NoneBm25StatsFactory(vchannel *datapb.SegmentInfo) *SegmentBM25Stats
type SegmentFilter ¶
type SegmentFilter interface { Filter(info *SegmentInfo) bool AddFilter(*segmentCriterion) }
func WithLevel ¶
func WithLevel(level datapb.SegmentLevel) SegmentFilter
func WithNoSyncingTask ¶
func WithNoSyncingTask() SegmentFilter
func WithPartitionID ¶
func WithPartitionID(partitionID int64) SegmentFilter
func WithPartitionIDs ¶
func WithPartitionIDs(partitionIDs []int64) SegmentFilter
func WithSegmentIDs ¶
func WithSegmentIDs(segmentIDs ...int64) SegmentFilter
func WithSegmentState ¶
func WithSegmentState(states ...commonpb.SegmentState) SegmentFilter
func WithStartPosNotRecorded ¶
func WithStartPosNotRecorded() SegmentFilter
type SegmentFilterFunc ¶
type SegmentFilterFunc func(info *SegmentInfo) bool
SegmentFilterFunc implements segment filter with other filters logic.
func (SegmentFilterFunc) AddFilter ¶
func (f SegmentFilterFunc) AddFilter(criterion *segmentCriterion)
func (SegmentFilterFunc) Filter ¶
func (f SegmentFilterFunc) Filter(info *SegmentInfo) bool
type SegmentIDFilter ¶
type SegmentIDFilter struct {
// contains filtered or unexported fields
}
SegmentIDFilter segment filter with segment ids.
func (*SegmentIDFilter) AddFilter ¶
func (f *SegmentIDFilter) AddFilter(criterion *segmentCriterion)
func (*SegmentIDFilter) Filter ¶
func (f *SegmentIDFilter) Filter(info *SegmentInfo) bool
type SegmentInfo ¶
type SegmentInfo struct {
// contains filtered or unexported fields
}
func NewSegmentInfo ¶
func NewSegmentInfo(info *datapb.SegmentInfo, bfs pkoracle.PkStat, bm25Stats *SegmentBM25Stats) *SegmentInfo
func (*SegmentInfo) BufferRows ¶
func (s *SegmentInfo) BufferRows() int64
func (*SegmentInfo) Checkpoint ¶
func (s *SegmentInfo) Checkpoint() *msgpb.MsgPosition
func (*SegmentInfo) Clone ¶
func (s *SegmentInfo) Clone() *SegmentInfo
func (*SegmentInfo) FlushedRows ¶
func (s *SegmentInfo) FlushedRows() int64
FlushedRows return flushed rows number.
func (*SegmentInfo) GetBM25Stats ¶
func (s *SegmentInfo) GetBM25Stats() *SegmentBM25Stats
func (*SegmentInfo) GetBloomFilterSet ¶
func (s *SegmentInfo) GetBloomFilterSet() pkoracle.PkStat
func (*SegmentInfo) GetHistory ¶
func (s *SegmentInfo) GetHistory() []*storage.PkStatistics
func (*SegmentInfo) Level ¶
func (s *SegmentInfo) Level() datapb.SegmentLevel
func (*SegmentInfo) NumOfRows ¶
func (s *SegmentInfo) NumOfRows() int64
NumOfRows returns sum of number of rows, including flushed, syncing and buffered
func (*SegmentInfo) PartitionID ¶
func (s *SegmentInfo) PartitionID() int64
func (*SegmentInfo) SegmentID ¶
func (s *SegmentInfo) SegmentID() int64
func (*SegmentInfo) StartPosition ¶
func (s *SegmentInfo) StartPosition() *msgpb.MsgPosition
func (*SegmentInfo) State ¶
func (s *SegmentInfo) State() commonpb.SegmentState
func (*SegmentInfo) SyncingRows ¶
func (s *SegmentInfo) SyncingRows() int64
type SegmentStateFilter ¶
type SegmentStateFilter struct {
// contains filtered or unexported fields
}
SegmentStateFilter segment filter with segment states.
func (*SegmentStateFilter) AddFilter ¶
func (f *SegmentStateFilter) AddFilter(criterion *segmentCriterion)
func (*SegmentStateFilter) Filter ¶
func (f *SegmentStateFilter) Filter(info *SegmentInfo) bool