segments

package
v0.10.3-0...-f06509b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 72 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IndexFaissIDMap      = "FLAT"
	IndexFaissIVFFlat    = "IVF_FLAT"
	IndexFaissIVFPQ      = "IVF_PQ"
	IndexFaissIVFSQ8     = "IVF_SQ8"
	IndexScaNN           = "SCANN"
	IndexFaissBinIDMap   = "BIN_FLAT"
	IndexFaissBinIVFFlat = "BIN_IVF_FLAT"
	IndexHNSW            = "HNSW"
	IndexSparseWand      = "SPARSE_WAND"
)
View Source
const (
	SegmentTypeGrowing = commonpb.SegmentState_Growing
	SegmentTypeSealed  = commonpb.SegmentState_Sealed
)
View Source
const (
	UsedDiskMemoryRatio = 4
)

Variables

View Source
var ErrSegmentUnhealthy = errors.New("segment unhealthy")

Functions

func CopyCProtoBlob

func CopyCProtoBlob(cProto *C.CProto) []byte

CopyCProtoBlob returns the copy of C memory

func CreateInternalReducer

func CreateInternalReducer(req *querypb.QueryRequest, schema *schemapb.CollectionSchema) internalReducer

func CreateSegCoreReducer

func CreateSegCoreReducer(req *querypb.QueryRequest, schema *schemapb.CollectionSchema) segCoreReducer

func DecodeSearchResults

func DecodeSearchResults(searchResults []*internalpb.SearchResults) ([]*schemapb.SearchResultData, error)

func DeleteCollection

func DeleteCollection(collection *Collection)

deleteCollection delete collection and free the collection memory

func DeleteSearchResultDataBlobs

func DeleteSearchResultDataBlobs(cSearchResultDataBlobs searchResultDataBlobs)

func DeleteSearchResults

func DeleteSearchResults(results []*SearchResult)

func EncodeSearchResultData

func EncodeSearchResultData(searchResultData *schemapb.SearchResultData, nq int64, topk int64, metricType string) (searchResults *internalpb.SearchResults, err error)

func GenAndSaveIndex

func GenAndSaveIndex(collectionID, partitionID, segmentID, fieldID int64, msgLength int, indexType, metricType string, cm storage.ChunkManager) (*querypb.FieldIndexInfo, error)

func GenAndSaveIndexV2

func GenAndSaveIndexV2(collectionID, partitionID, segmentID, buildID int64,
	fieldSchema *schemapb.FieldSchema,
	indexInfo *indexpb.IndexInfo,
	cm storage.ChunkManager,
	msgLength int,
) (*querypb.FieldIndexInfo, error)

func GenTestCollectionSchema

func GenTestCollectionSchema(collectionName string, pkType schemapb.DataType, withSparse bool) *schemapb.CollectionSchema

some tests do not yet support sparse float vector, see comments of GenSparseFloatVecDataset in indexcgowrapper/dataset.go

func GenTestIndexInfoList

func GenTestIndexInfoList(collectionID int64, schema *schemapb.CollectionSchema) []*indexpb.IndexInfo

func GenTestIndexMeta

func GenTestIndexMeta(collectionID int64, schema *schemapb.CollectionSchema) *segcorepb.CollectionIndexMeta

func GenTestScalarFieldData

func GenTestScalarFieldData(dType schemapb.DataType, fieldName string, fieldID int64, numRows int) *schemapb.FieldData

func GenTestVectorFiledData

func GenTestVectorFiledData(dType schemapb.DataType, fieldName string, fieldID int64, numRows int, dim int) *schemapb.FieldData

dim is ignored for sparse

func GetCProtoBlob

func GetCProtoBlob(cProto *C.CProto) []byte

GetCProtoBlob returns the raw C memory, invoker should release it itself

func GetDynamicPool

func GetDynamicPool() *conc.Pool[any]

GetDynamicPool returns the singleton pool for dynamic cgo operations.

func GetLoadPool

func GetLoadPool() *conc.Pool[any]

func GetLocalUsedSize

func GetLocalUsedSize(ctx context.Context, path string) (int64, error)

func GetPkField

func GetPkField(schema *schemapb.CollectionSchema) *schemapb.FieldSchema

func GetPrimaryKeys

func GetPrimaryKeys(msg *msgstream.InsertMsg, schema *schemapb.CollectionSchema) ([]storage.PrimaryKey, error)

TODO: remove this function to proper file GetPrimaryKeys would get primary keys by insert messages

func GetSQPool

func GetSQPool() *conc.Pool[any]

GetSQPool returns the singleton pool instance for search/query operations.

func GetSearchResultDataBlob

func GetSearchResultDataBlob(ctx context.Context, cSearchResultDataBlobs searchResultDataBlobs, blobIndex int) ([]byte, error)

func HandleCProto

func HandleCProto(cRes *C.CProto, msg proto.Message) error

HandleCProto deal with the result proto returned from CGO

func HandleCStatus

func HandleCStatus(ctx context.Context, status *C.CStatus, extraInfo string, fields ...zap.Field) error

HandleCStatus deals with the error returned from CGO

func JoinIDPath

func JoinIDPath(ids ...int64) string

JoinIDPath joins ids to path format.

func MergeInternalRetrieveResult

func MergeInternalRetrieveResult(ctx context.Context, retrieveResults []*internalpb.RetrieveResults, param *mergeParam) (*internalpb.RetrieveResults, error)

func MergeSegcoreRetrieveResults

func MergeSegcoreRetrieveResults(ctx context.Context, retrieveResults []*segcorepb.RetrieveResults, param *mergeParam, segments []Segment, plan *RetrievePlan) (*segcorepb.RetrieveResults, error)

func MergeToAdvancedResults

func MergeToAdvancedResults(ctx context.Context, results []*internalpb.SearchResults) (*internalpb.SearchResults, error)

func NewCollectionManager

func NewCollectionManager() *collectionManager

func NewLoader

func NewLoader(
	manager *Manager,
	cm storage.ChunkManager,
) *segmentLoader

func NewLoaderV2

func NewLoaderV2(
	manager *Manager,
	cm storage.ChunkManager,
) *segmentLoaderV2

func NewMergeParam

func NewMergeParam(limit int64, outputFieldsId []int64, schema *schemapb.CollectionSchema, reduceStopForBest bool) *mergeParam

func NewSegmentManager

func NewSegmentManager() *segmentManager

func NewTestChunkManagerFactory

func NewTestChunkManagerFactory(params *paramtable.ComponentParam, rootPath string) *storage.ChunkManagerFactory

func ParseCTraceContext

func ParseCTraceContext(ctx context.Context) C.CTraceContext

ParseCTraceContext parses tracing span and convert it into `C.CTraceContext`.

func ReduceAdvancedSearchResults

func ReduceAdvancedSearchResults(ctx context.Context, results []*internalpb.SearchResults, nq int64) (*internalpb.SearchResults, error)

func ReduceSearchResultData

func ReduceSearchResultData(ctx context.Context, searchResultData []*schemapb.SearchResultData, nq int64, topk int64) (*schemapb.SearchResultData, error)

func ReduceSearchResults

func ReduceSearchResults(ctx context.Context, results []*internalpb.SearchResults, nq int64, topk int64, metricType string) (*internalpb.SearchResults, error)

func ReduceSearchResultsAndFillData

func ReduceSearchResultsAndFillData(ctx context.Context, plan *SearchPlan, searchResults []*SearchResult,
	numSegments int64, sliceNQs []int64, sliceTopKs []int64,
) (searchResultDataBlobs, error)

func ResizeLoadPool

func ResizeLoadPool(evt *config.Event)

func ResizeSQPool

func ResizeSQPool(evt *config.Event)

func SaveBinLog

func SaveBinLog(ctx context.Context,
	collectionID int64,
	partitionID int64,
	segmentID int64,
	msgLength int,
	schema *schemapb.CollectionSchema,
	chunkManager storage.ChunkManager,
) ([]*datapb.FieldBinlog, []*datapb.FieldBinlog, error)

func SaveDeltaLog

func SaveDeltaLog(collectionID int64,
	partitionID int64,
	segmentID int64,
	cm storage.ChunkManager,
) ([]*datapb.FieldBinlog, error)

func SearchHistorical

func SearchHistorical(ctx context.Context, manager *Manager, searchReq *SearchRequest, collID int64, partIDs []int64, segIDs []int64) ([]*SearchResult, []Segment, error)

search will search on the historical segments the target segments in historical. if segIDs is not specified, it will search on all the historical segments speficied by partIDs. if segIDs is specified, it will only search on the segments specified by the segIDs. if partIDs is empty, it means all the partitions of the loaded collection or all the partitions loaded.

func SearchStreaming

func SearchStreaming(ctx context.Context, manager *Manager, searchReq *SearchRequest, collID int64, partIDs []int64, segIDs []int64) ([]*SearchResult, []Segment, error)

searchStreaming will search all the target segments in streaming if partIDs is empty, it means all the partitions of the loaded collection or all the partitions loaded.

func SelectSearchResultData

func SelectSearchResultData(dataArray []*schemapb.SearchResultData, resultOffsets [][]int64, offsets []int64, qi int64) int

func StatisticStreaming

func StatisticStreaming(ctx context.Context, manager *Manager, collID int64, partIDs []int64, segIDs []int64) ([]SegmentStats, []Segment, error)

StatisticStreaming will do statistics all the target segments in streaming if partIDs is empty, it means all the partitions of the loaded collection or all the partitions loaded.

func StatisticsHistorical

func StatisticsHistorical(ctx context.Context, manager *Manager, collID int64, partIDs []int64, segIDs []int64) ([]SegmentStats, []Segment, error)

statistic will do statistics on the historical segments the target segments in historical. if segIDs is not specified, it will search on all the historical segments specified by partIDs. if segIDs is specified, it will only search on the segments specified by the segIDs. if partIDs is empty, it means all the partitions of the loaded collection or all the partitions loaded.

func WithLoadStatus

func WithLoadStatus(loadStatus LoadStatus) loadOption

func WithReleaseScope

func WithReleaseScope(scope ReleaseScope) releaseOption

Types

type Collection

type Collection struct {
	// contains filtered or unexported fields
}

Collection is a wrapper of the underlying C-structure C.CCollection In a query node, `Collection` is a replica info of a collection in these query node.

func NewCollection

func NewCollection(collectionID int64, schema *schemapb.CollectionSchema, indexMeta *segcorepb.CollectionIndexMeta, loadMetaInfo *querypb.LoadMetaInfo) *Collection

newCollection returns a new Collection

func NewCollectionWithoutSchema

func NewCollectionWithoutSchema(collectionID int64, loadType querypb.LoadType) *Collection

func (*Collection) AddPartition

func (c *Collection) AddPartition(partitions ...int64)

addPartitionID would add a partition id to partition id list of collection

func (*Collection) ExistPartition

func (c *Collection) ExistPartition(partitionIDs ...int64) bool

func (*Collection) GetDBName

func (c *Collection) GetDBName() string

GetDBName returns the database name of collection.

func (*Collection) GetLoadType

func (c *Collection) GetLoadType() querypb.LoadType

getLoadType get the loadType of collection, which is loadTypeCollection or loadTypePartition

func (*Collection) GetPartitions

func (c *Collection) GetPartitions() []int64

getPartitionIDs return partitionIDs of collection

func (*Collection) GetResourceGroup

func (c *Collection) GetResourceGroup() string

GetResourceGroup returns the resource group of collection.

func (*Collection) ID

func (c *Collection) ID() int64

ID returns collection id

func (*Collection) IsGpuIndex

func (c *Collection) IsGpuIndex() bool

IsGpuIndex returns a boolean value indicating whether the collection is using a GPU index.

func (*Collection) Ref

func (c *Collection) Ref(count uint32) uint32

func (*Collection) RemovePartition

func (c *Collection) RemovePartition(partitionID int64)

removePartitionID removes the partition id from partition id list of collection

func (*Collection) Schema

func (c *Collection) Schema() *schemapb.CollectionSchema

Schema returns the schema of collection

func (*Collection) Unref

func (c *Collection) Unref(count uint32) uint32

type CollectionManager

type CollectionManager interface {
	List() []int64
	Get(collectionID int64) *Collection
	PutOrRef(collectionID int64, schema *schemapb.CollectionSchema, meta *segcorepb.CollectionIndexMeta, loadMeta *querypb.LoadMetaInfo)
	Ref(collectionID int64, count uint32) bool
	// unref the collection,
	// returns true if the collection ref count goes 0, or the collection not exists,
	// return false otherwise
	Unref(collectionID int64, count uint32) bool
}

type FieldInfo

type FieldInfo struct {
	datapb.FieldBinlog
	RowCount int64
}

type IndexAttrCache

type IndexAttrCache struct {
	// contains filtered or unexported fields
}

IndexAttrCache index meta cache stores calculated attribute.

func NewIndexAttrCache

func NewIndexAttrCache() *IndexAttrCache

func (*IndexAttrCache) GetIndexResourceUsage

func (c *IndexAttrCache) GetIndexResourceUsage(indexInfo *querypb.FieldIndexInfo, memoryIndexLoadPredictMemoryUsageFactor float64, fieldBinlog *datapb.FieldBinlog) (memory uint64, disk uint64, err error)

type IndexedFieldInfo

type IndexedFieldInfo struct {
	FieldBinlog *datapb.FieldBinlog
	IndexInfo   *querypb.FieldIndexInfo
	LazyLoad    bool
}

IndexedFieldInfo contains binlog info of vector field

type L0Segment

type L0Segment struct {
	// contains filtered or unexported fields
}

func (*L0Segment) CASVersion

func (s *L0Segment) CASVersion(old, newVersion int64) bool

func (*L0Segment) Collection

func (s *L0Segment) Collection() int64

func (*L0Segment) DatabaseName

func (s *L0Segment) DatabaseName() string

func (*L0Segment) Delete

func (s *L0Segment) Delete(ctx context.Context, primaryKeys []storage.PrimaryKey, timestamps []typeutil.Timestamp) error

func (*L0Segment) DeleteRecords

func (s *L0Segment) DeleteRecords() ([]storage.PrimaryKey, []uint64)

func (*L0Segment) ExistIndex

func (s *L0Segment) ExistIndex(fieldID int64) bool

func (*L0Segment) GetIndex

func (s *L0Segment) GetIndex(fieldID int64) *IndexedFieldInfo

func (*L0Segment) HasRawData

func (s *L0Segment) HasRawData(fieldID int64) bool

func (*L0Segment) ID

func (s *L0Segment) ID() int64

ID returns the identity number.

func (*L0Segment) Indexes

func (s *L0Segment) Indexes() []*IndexedFieldInfo

func (*L0Segment) Insert

func (s *L0Segment) Insert(ctx context.Context, rowIDs []int64, timestamps []typeutil.Timestamp, record *segcorepb.InsertRecord) error

func (*L0Segment) InsertCount

func (s *L0Segment) InsertCount() int64

func (*L0Segment) IsLazyLoad

func (s *L0Segment) IsLazyLoad() bool

func (*L0Segment) LastDeltaTimestamp

func (s *L0Segment) LastDeltaTimestamp() uint64

func (*L0Segment) Level

func (s *L0Segment) Level() datapb.SegmentLevel

func (*L0Segment) LoadDeltaData

func (s *L0Segment) LoadDeltaData(ctx context.Context, deltaData *storage.DeleteData) error

func (*L0Segment) LoadInfo

func (s *L0Segment) LoadInfo() *querypb.SegmentLoadInfo

func (*L0Segment) LoadStatus

func (s *L0Segment) LoadStatus() LoadStatus

func (*L0Segment) MayPkExist

func (s *L0Segment) MayPkExist(pk storage.PrimaryKey) bool

MayPkExist returns true if the given PK exists in the PK range and being positive through the bloom filter, false otherwise, may returns true even the PK doesn't exist actually

func (*L0Segment) MemSize

func (s *L0Segment) MemSize() int64

func (*L0Segment) Partition

func (s *L0Segment) Partition() int64

func (*L0Segment) PinIfNotReleased

func (s *L0Segment) PinIfNotReleased() error

func (*L0Segment) Release

func (s *L0Segment) Release(opts ...releaseOption)

func (*L0Segment) ResetIndexesLazyLoad

func (s *L0Segment) ResetIndexesLazyLoad(lazyState bool)

func (*L0Segment) ResourceGroup

func (s *L0Segment) ResourceGroup() string

func (*L0Segment) ResourceUsageEstimate

func (s *L0Segment) ResourceUsageEstimate() ResourceUsage

ResourceUsageEstimate returns the estimated resource usage of the segment.

func (*L0Segment) Retrieve

func (s *L0Segment) Retrieve(ctx context.Context, plan *RetrievePlan) (*segcorepb.RetrieveResults, error)

func (*L0Segment) RetrieveByOffsets

func (s *L0Segment) RetrieveByOffsets(ctx context.Context, plan *RetrievePlan, offsets []int64) (*segcorepb.RetrieveResults, error)

func (*L0Segment) RowNum

func (s *L0Segment) RowNum() int64

func (*L0Segment) Search

func (s *L0Segment) Search(ctx context.Context, searchReq *SearchRequest) (*SearchResult, error)

func (*L0Segment) Shard

func (s *L0Segment) Shard() string

func (*L0Segment) StartPosition

func (s *L0Segment) StartPosition() *msgpb.MsgPosition

func (*L0Segment) Type

func (s *L0Segment) Type() SegmentType

func (*L0Segment) Unpin

func (s *L0Segment) Unpin()

func (*L0Segment) UpdateBloomFilter

func (s *L0Segment) UpdateBloomFilter(pks []storage.PrimaryKey)

func (*L0Segment) Version

func (s *L0Segment) Version() int64

type LoadFieldDataInfo

type LoadFieldDataInfo struct {
	// contains filtered or unexported fields
}

type LoadIndexInfo

type LoadIndexInfo struct {
	// contains filtered or unexported fields
}

LoadIndexInfo is a wrapper of the underlying C-structure C.CLoadIndexInfo

type LoadResource

type LoadResource struct {
	MemorySize uint64
	DiskSize   uint64
}

func (*LoadResource) Add

func (r *LoadResource) Add(resource LoadResource)

func (*LoadResource) Sub

func (r *LoadResource) Sub(resource LoadResource)

type LoadStatus

type LoadStatus string
const (
	LoadStatusMeta     LoadStatus = "meta"
	LoadStatusMapped   LoadStatus = "mapped"
	LoadStatusInMemory LoadStatus = "in_memory"
)

type Loader

type Loader interface {
	// Load loads binlogs, and spawn segments,
	// NOTE: make sure the ref count of the corresponding collection will never go down to 0 during this
	Load(ctx context.Context, collectionID int64, segmentType SegmentType, version int64, segments ...*querypb.SegmentLoadInfo) ([]Segment, error)

	LoadDeltaLogs(ctx context.Context, segment Segment, deltaLogs []*datapb.FieldBinlog) error

	// LoadBloomFilterSet loads needed statslog for RemoteSegment.
	LoadBloomFilterSet(ctx context.Context, collectionID int64, version int64, infos ...*querypb.SegmentLoadInfo) ([]*pkoracle.BloomFilterSet, error)

	// LoadIndex append index for segment and remove vector binlogs.
	LoadIndex(ctx context.Context, segment *LocalSegment, info *querypb.SegmentLoadInfo, version int64) error

	LoadSegment(ctx context.Context,
		segment *LocalSegment,
		loadInfo *querypb.SegmentLoadInfo,
		loadStatus LoadStatus,
	) error
}

type LocalSegment

type LocalSegment struct {
	// contains filtered or unexported fields
}

Segment is a wrapper of the underlying C-structure segment.

func (*LocalSegment) AddFieldDataInfo

func (s *LocalSegment) AddFieldDataInfo(ctx context.Context, rowCount int64, fields []*datapb.FieldBinlog) error

func (*LocalSegment) CASVersion

func (s *LocalSegment) CASVersion(old, newVersion int64) bool

func (*LocalSegment) Collection

func (s *LocalSegment) Collection() int64

func (*LocalSegment) DatabaseName

func (s *LocalSegment) DatabaseName() string

func (*LocalSegment) Delete

func (s *LocalSegment) Delete(ctx context.Context, primaryKeys []storage.PrimaryKey, timestamps []typeutil.Timestamp) error

func (*LocalSegment) ExistIndex

func (s *LocalSegment) ExistIndex(fieldID int64) bool

func (*LocalSegment) GetFieldDataPath

func (s *LocalSegment) GetFieldDataPath(index *IndexedFieldInfo, offset int64) (dataPath string, offsetInBinlog int64)

func (*LocalSegment) GetIndex

func (s *LocalSegment) GetIndex(fieldID int64) *IndexedFieldInfo

func (*LocalSegment) HasRawData

func (s *LocalSegment) HasRawData(fieldID int64) bool

func (*LocalSegment) ID

func (s *LocalSegment) ID() int64

ID returns the identity number.

func (*LocalSegment) Indexes

func (s *LocalSegment) Indexes() []*IndexedFieldInfo

func (*LocalSegment) Insert

func (s *LocalSegment) Insert(ctx context.Context, rowIDs []int64, timestamps []typeutil.Timestamp, record *segcorepb.InsertRecord) error

func (*LocalSegment) InsertCount

func (s *LocalSegment) InsertCount() int64

func (*LocalSegment) IsLazyLoad

func (s *LocalSegment) IsLazyLoad() bool

func (*LocalSegment) LastDeltaTimestamp

func (s *LocalSegment) LastDeltaTimestamp() uint64

func (*LocalSegment) Level

func (s *LocalSegment) Level() datapb.SegmentLevel

func (*LocalSegment) LoadDeltaData

func (s *LocalSegment) LoadDeltaData(ctx context.Context, deltaData *storage.DeleteData) error

func (*LocalSegment) LoadDeltaData2

func (s *LocalSegment) LoadDeltaData2(ctx context.Context, schema *schemapb.CollectionSchema) error

func (*LocalSegment) LoadFieldData

func (s *LocalSegment) LoadFieldData(ctx context.Context, fieldID int64, rowCount int64, field *datapb.FieldBinlog, opts ...loadOption) error

func (*LocalSegment) LoadIndex

func (s *LocalSegment) LoadIndex(ctx context.Context, indexInfo *querypb.FieldIndexInfo, fieldType schemapb.DataType, opts ...loadOption) error

func (*LocalSegment) LoadInfo

func (s *LocalSegment) LoadInfo() *querypb.SegmentLoadInfo

func (*LocalSegment) LoadMultiFieldData

func (s *LocalSegment) LoadMultiFieldData(ctx context.Context, rowCount int64, fields []*datapb.FieldBinlog) error

-------------------------------------------------------------------------------------- interfaces for sealed segment

func (*LocalSegment) LoadStatus

func (s *LocalSegment) LoadStatus() LoadStatus

func (*LocalSegment) MayPkExist

func (s *LocalSegment) MayPkExist(pk storage.PrimaryKey) bool

MayPkExist returns true if the given PK exists in the PK range and being positive through the bloom filter, false otherwise, may returns true even the PK doesn't exist actually

func (*LocalSegment) MemSize

func (s *LocalSegment) MemSize() int64

func (*LocalSegment) Partition

func (s *LocalSegment) Partition() int64

func (*LocalSegment) PinIfNotReleased

func (s *LocalSegment) PinIfNotReleased() error

PinIfNotReleased acquires the `ptrLock` and returns true if the pointer is valid Provide ONLY the read lock operations, don't make `ptrLock` public to avoid abusing of the mutex.

func (*LocalSegment) Release

func (s *LocalSegment) Release(opts ...releaseOption)

func (*LocalSegment) ResetIndexesLazyLoad

func (s *LocalSegment) ResetIndexesLazyLoad(lazyState bool)

func (*LocalSegment) ResourceGroup

func (s *LocalSegment) ResourceGroup() string

func (*LocalSegment) ResourceUsageEstimate

func (s *LocalSegment) ResourceUsageEstimate() ResourceUsage

ResourceUsageEstimate returns the estimated resource usage of the segment.

func (*LocalSegment) Retrieve

func (*LocalSegment) RetrieveByOffsets

func (s *LocalSegment) RetrieveByOffsets(ctx context.Context, plan *RetrievePlan, offsets []int64) (*segcorepb.RetrieveResults, error)

func (*LocalSegment) RowNum

func (s *LocalSegment) RowNum() int64

func (*LocalSegment) Search

func (s *LocalSegment) Search(ctx context.Context, searchReq *SearchRequest) (*SearchResult, error)

func (*LocalSegment) Shard

func (s *LocalSegment) Shard() string

func (*LocalSegment) StartLoadData

func (s *LocalSegment) StartLoadData() (state.LoadStateLockGuard, error)

StartLoadData starts the loading process of the segment.

func (*LocalSegment) StartPosition

func (s *LocalSegment) StartPosition() *msgpb.MsgPosition

func (*LocalSegment) Type

func (s *LocalSegment) Type() SegmentType

func (*LocalSegment) Unpin

func (s *LocalSegment) Unpin()

func (*LocalSegment) UpdateBloomFilter

func (s *LocalSegment) UpdateBloomFilter(pks []storage.PrimaryKey)

func (*LocalSegment) UpdateFieldRawDataSize

func (s *LocalSegment) UpdateFieldRawDataSize(ctx context.Context, numRows int64, fieldBinlog *datapb.FieldBinlog) error

func (*LocalSegment) UpdateIndexInfo

func (s *LocalSegment) UpdateIndexInfo(ctx context.Context, indexInfo *querypb.FieldIndexInfo, info *LoadIndexInfo) error

func (*LocalSegment) Version

func (s *LocalSegment) Version() int64

func (*LocalSegment) WarmupChunkCache

func (s *LocalSegment) WarmupChunkCache(ctx context.Context, fieldID int64)

type Manager

type Manager struct {
	Collection CollectionManager
	Segment    SegmentManager
	DiskCache  cache.Cache[int64, Segment]
	Loader     Loader
}

func NewManager

func NewManager() *Manager

func (*Manager) SetLoader

func (mgr *Manager) SetLoader(loader Loader)

type MockCollectionManager

type MockCollectionManager struct {
	mock.Mock
}

MockCollectionManager is an autogenerated mock type for the CollectionManager type

func NewMockCollectionManager

func NewMockCollectionManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockCollectionManager

NewMockCollectionManager creates a new instance of MockCollectionManager. 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 (*MockCollectionManager) EXPECT

func (*MockCollectionManager) Get

func (_m *MockCollectionManager) Get(collectionID int64) *Collection

Get provides a mock function with given fields: collectionID

func (*MockCollectionManager) List

func (_m *MockCollectionManager) List() []int64

List provides a mock function with given fields:

func (*MockCollectionManager) PutOrRef

func (_m *MockCollectionManager) PutOrRef(collectionID int64, schema *schemapb.CollectionSchema, meta *segcorepb.CollectionIndexMeta, loadMeta *querypb.LoadMetaInfo)

PutOrRef provides a mock function with given fields: collectionID, schema, meta, loadMeta

func (*MockCollectionManager) Ref

func (_m *MockCollectionManager) Ref(collectionID int64, count uint32) bool

Ref provides a mock function with given fields: collectionID, count

func (*MockCollectionManager) Unref

func (_m *MockCollectionManager) Unref(collectionID int64, count uint32) bool

Unref provides a mock function with given fields: collectionID, count

type MockCollectionManager_Expecter

type MockCollectionManager_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockCollectionManager_Expecter) Get

func (_e *MockCollectionManager_Expecter) Get(collectionID interface{}) *MockCollectionManager_Get_Call

Get is a helper method to define mock.On call

  • collectionID int64

func (*MockCollectionManager_Expecter) List

List is a helper method to define mock.On call

func (*MockCollectionManager_Expecter) PutOrRef

func (_e *MockCollectionManager_Expecter) PutOrRef(collectionID interface{}, schema interface{}, meta interface{}, loadMeta interface{}) *MockCollectionManager_PutOrRef_Call

PutOrRef is a helper method to define mock.On call

  • collectionID int64
  • schema *schemapb.CollectionSchema
  • meta *segcorepb.CollectionIndexMeta
  • loadMeta *querypb.LoadMetaInfo

func (*MockCollectionManager_Expecter) Ref

func (_e *MockCollectionManager_Expecter) Ref(collectionID interface{}, count interface{}) *MockCollectionManager_Ref_Call

Ref is a helper method to define mock.On call

  • collectionID int64
  • count uint32

func (*MockCollectionManager_Expecter) Unref

func (_e *MockCollectionManager_Expecter) Unref(collectionID interface{}, count interface{}) *MockCollectionManager_Unref_Call

Unref is a helper method to define mock.On call

  • collectionID int64
  • count uint32

type MockCollectionManager_Get_Call

type MockCollectionManager_Get_Call struct {
	*mock.Call
}

MockCollectionManager_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'

func (*MockCollectionManager_Get_Call) Return

func (*MockCollectionManager_Get_Call) Run

func (_c *MockCollectionManager_Get_Call) Run(run func(collectionID int64)) *MockCollectionManager_Get_Call

func (*MockCollectionManager_Get_Call) RunAndReturn

type MockCollectionManager_List_Call

type MockCollectionManager_List_Call struct {
	*mock.Call
}

MockCollectionManager_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'

func (*MockCollectionManager_List_Call) Return

func (*MockCollectionManager_List_Call) Run

func (*MockCollectionManager_List_Call) RunAndReturn

type MockCollectionManager_PutOrRef_Call

type MockCollectionManager_PutOrRef_Call struct {
	*mock.Call
}

MockCollectionManager_PutOrRef_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutOrRef'

func (*MockCollectionManager_PutOrRef_Call) Return

func (*MockCollectionManager_PutOrRef_Call) Run

type MockCollectionManager_Ref_Call

type MockCollectionManager_Ref_Call struct {
	*mock.Call
}

MockCollectionManager_Ref_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ref'

func (*MockCollectionManager_Ref_Call) Return

func (*MockCollectionManager_Ref_Call) Run

func (_c *MockCollectionManager_Ref_Call) Run(run func(collectionID int64, count uint32)) *MockCollectionManager_Ref_Call

func (*MockCollectionManager_Ref_Call) RunAndReturn

type MockCollectionManager_Unref_Call

type MockCollectionManager_Unref_Call struct {
	*mock.Call
}

MockCollectionManager_Unref_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unref'

func (*MockCollectionManager_Unref_Call) Return

func (*MockCollectionManager_Unref_Call) Run

func (_c *MockCollectionManager_Unref_Call) Run(run func(collectionID int64, count uint32)) *MockCollectionManager_Unref_Call

func (*MockCollectionManager_Unref_Call) RunAndReturn

type MockLoader

type MockLoader struct {
	mock.Mock
}

MockLoader is an autogenerated mock type for the Loader type

func NewMockLoader

func NewMockLoader(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockLoader

NewMockLoader creates a new instance of MockLoader. 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 (*MockLoader) EXPECT

func (_m *MockLoader) EXPECT() *MockLoader_Expecter

func (*MockLoader) Load

func (_m *MockLoader) Load(ctx context.Context, collectionID int64, segmentType commonpb.SegmentState, version int64, segments ...*querypb.SegmentLoadInfo) ([]Segment, error)

Load provides a mock function with given fields: ctx, collectionID, segmentType, version, segments

func (*MockLoader) LoadBloomFilterSet

func (_m *MockLoader) LoadBloomFilterSet(ctx context.Context, collectionID int64, version int64, infos ...*querypb.SegmentLoadInfo) ([]*pkoracle.BloomFilterSet, error)

LoadBloomFilterSet provides a mock function with given fields: ctx, collectionID, version, infos

func (*MockLoader) LoadDeltaLogs

func (_m *MockLoader) LoadDeltaLogs(ctx context.Context, segment Segment, deltaLogs []*datapb.FieldBinlog) error

LoadDeltaLogs provides a mock function with given fields: ctx, segment, deltaLogs

func (*MockLoader) LoadIndex

func (_m *MockLoader) LoadIndex(ctx context.Context, segment *LocalSegment, info *querypb.SegmentLoadInfo, version int64) error

LoadIndex provides a mock function with given fields: ctx, segment, info, version

func (*MockLoader) LoadSegment

func (_m *MockLoader) LoadSegment(ctx context.Context, segment *LocalSegment, loadInfo *querypb.SegmentLoadInfo, loadStatus LoadStatus) error

LoadSegment provides a mock function with given fields: ctx, segment, loadInfo, loadStatus

type MockLoader_Expecter

type MockLoader_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockLoader_Expecter) Load

func (_e *MockLoader_Expecter) Load(ctx interface{}, collectionID interface{}, segmentType interface{}, version interface{}, segments ...interface{}) *MockLoader_Load_Call

Load is a helper method to define mock.On call

  • ctx context.Context
  • collectionID int64
  • segmentType commonpb.SegmentState
  • version int64
  • segments ...*querypb.SegmentLoadInfo

func (*MockLoader_Expecter) LoadBloomFilterSet

func (_e *MockLoader_Expecter) LoadBloomFilterSet(ctx interface{}, collectionID interface{}, version interface{}, infos ...interface{}) *MockLoader_LoadBloomFilterSet_Call

LoadBloomFilterSet is a helper method to define mock.On call

  • ctx context.Context
  • collectionID int64
  • version int64
  • infos ...*querypb.SegmentLoadInfo

func (*MockLoader_Expecter) LoadDeltaLogs

func (_e *MockLoader_Expecter) LoadDeltaLogs(ctx interface{}, segment interface{}, deltaLogs interface{}) *MockLoader_LoadDeltaLogs_Call

LoadDeltaLogs is a helper method to define mock.On call

  • ctx context.Context
  • segment Segment
  • deltaLogs []*datapb.FieldBinlog

func (*MockLoader_Expecter) LoadIndex

func (_e *MockLoader_Expecter) LoadIndex(ctx interface{}, segment interface{}, info interface{}, version interface{}) *MockLoader_LoadIndex_Call

LoadIndex is a helper method to define mock.On call

  • ctx context.Context
  • segment *LocalSegment
  • info *querypb.SegmentLoadInfo
  • version int64

func (*MockLoader_Expecter) LoadSegment

func (_e *MockLoader_Expecter) LoadSegment(ctx interface{}, segment interface{}, loadInfo interface{}, loadStatus interface{}) *MockLoader_LoadSegment_Call

LoadSegment is a helper method to define mock.On call

  • ctx context.Context
  • segment *LocalSegment
  • loadInfo *querypb.SegmentLoadInfo
  • loadStatus LoadStatus

type MockLoader_LoadBloomFilterSet_Call

type MockLoader_LoadBloomFilterSet_Call struct {
	*mock.Call
}

MockLoader_LoadBloomFilterSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadBloomFilterSet'

func (*MockLoader_LoadBloomFilterSet_Call) Return

func (*MockLoader_LoadBloomFilterSet_Call) Run

func (*MockLoader_LoadBloomFilterSet_Call) RunAndReturn

type MockLoader_LoadDeltaLogs_Call

type MockLoader_LoadDeltaLogs_Call struct {
	*mock.Call
}

MockLoader_LoadDeltaLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadDeltaLogs'

func (*MockLoader_LoadDeltaLogs_Call) Return

func (*MockLoader_LoadDeltaLogs_Call) Run

func (*MockLoader_LoadDeltaLogs_Call) RunAndReturn

type MockLoader_LoadIndex_Call

type MockLoader_LoadIndex_Call struct {
	*mock.Call
}

MockLoader_LoadIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadIndex'

func (*MockLoader_LoadIndex_Call) Return

func (*MockLoader_LoadIndex_Call) Run

func (*MockLoader_LoadIndex_Call) RunAndReturn

type MockLoader_LoadSegment_Call

type MockLoader_LoadSegment_Call struct {
	*mock.Call
}

MockLoader_LoadSegment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadSegment'

func (*MockLoader_LoadSegment_Call) Return

func (*MockLoader_LoadSegment_Call) Run

func (*MockLoader_LoadSegment_Call) RunAndReturn

type MockLoader_Load_Call

type MockLoader_Load_Call struct {
	*mock.Call
}

MockLoader_Load_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Load'

func (*MockLoader_Load_Call) Return

func (_c *MockLoader_Load_Call) Return(_a0 []Segment, _a1 error) *MockLoader_Load_Call

func (*MockLoader_Load_Call) Run

func (_c *MockLoader_Load_Call) Run(run func(ctx context.Context, collectionID int64, segmentType commonpb.SegmentState, version int64, segments ...*querypb.SegmentLoadInfo)) *MockLoader_Load_Call

func (*MockLoader_Load_Call) RunAndReturn

type MockSegment

type MockSegment struct {
	mock.Mock
}

MockSegment is an autogenerated mock type for the Segment type

func NewMockSegment

func NewMockSegment(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockSegment

NewMockSegment creates a new instance of MockSegment. 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 (*MockSegment) CASVersion

func (_m *MockSegment) CASVersion(_a0 int64, _a1 int64) bool

CASVersion provides a mock function with given fields: _a0, _a1

func (*MockSegment) Collection

func (_m *MockSegment) Collection() int64

Collection provides a mock function with given fields:

func (*MockSegment) DatabaseName

func (_m *MockSegment) DatabaseName() string

DatabaseName provides a mock function with given fields:

func (*MockSegment) Delete

func (_m *MockSegment) Delete(ctx context.Context, primaryKeys []storage.PrimaryKey, timestamps []uint64) error

Delete provides a mock function with given fields: ctx, primaryKeys, timestamps

func (*MockSegment) EXPECT

func (_m *MockSegment) EXPECT() *MockSegment_Expecter

func (*MockSegment) ExistIndex

func (_m *MockSegment) ExistIndex(fieldID int64) bool

ExistIndex provides a mock function with given fields: fieldID

func (*MockSegment) GetIndex

func (_m *MockSegment) GetIndex(fieldID int64) *IndexedFieldInfo

GetIndex provides a mock function with given fields: fieldID

func (*MockSegment) HasRawData

func (_m *MockSegment) HasRawData(fieldID int64) bool

HasRawData provides a mock function with given fields: fieldID

func (*MockSegment) ID

func (_m *MockSegment) ID() int64

ID provides a mock function with given fields:

func (*MockSegment) Indexes

func (_m *MockSegment) Indexes() []*IndexedFieldInfo

Indexes provides a mock function with given fields:

func (*MockSegment) Insert

func (_m *MockSegment) Insert(ctx context.Context, rowIDs []int64, timestamps []uint64, record *segcorepb.InsertRecord) error

Insert provides a mock function with given fields: ctx, rowIDs, timestamps, record

func (*MockSegment) InsertCount

func (_m *MockSegment) InsertCount() int64

InsertCount provides a mock function with given fields:

func (*MockSegment) IsLazyLoad

func (_m *MockSegment) IsLazyLoad() bool

IsLazyLoad provides a mock function with given fields:

func (*MockSegment) LastDeltaTimestamp

func (_m *MockSegment) LastDeltaTimestamp() uint64

LastDeltaTimestamp provides a mock function with given fields:

func (*MockSegment) Level

func (_m *MockSegment) Level() datapb.SegmentLevel

Level provides a mock function with given fields:

func (*MockSegment) LoadDeltaData

func (_m *MockSegment) LoadDeltaData(ctx context.Context, deltaData *storage.DeleteData) error

LoadDeltaData provides a mock function with given fields: ctx, deltaData

func (*MockSegment) LoadInfo

func (_m *MockSegment) LoadInfo() *querypb.SegmentLoadInfo

LoadInfo provides a mock function with given fields:

func (*MockSegment) LoadStatus

func (_m *MockSegment) LoadStatus() LoadStatus

LoadStatus provides a mock function with given fields:

func (*MockSegment) MayPkExist

func (_m *MockSegment) MayPkExist(pk storage.PrimaryKey) bool

MayPkExist provides a mock function with given fields: pk

func (*MockSegment) MemSize

func (_m *MockSegment) MemSize() int64

MemSize provides a mock function with given fields:

func (*MockSegment) Partition

func (_m *MockSegment) Partition() int64

Partition provides a mock function with given fields:

func (*MockSegment) PinIfNotReleased

func (_m *MockSegment) PinIfNotReleased() error

PinIfNotReleased provides a mock function with given fields:

func (*MockSegment) Release

func (_m *MockSegment) Release(opts ...releaseOption)

Release provides a mock function with given fields: opts

func (*MockSegment) ResetIndexesLazyLoad

func (_m *MockSegment) ResetIndexesLazyLoad(lazyState bool)

ResetIndexesLazyLoad provides a mock function with given fields: lazyState

func (*MockSegment) ResourceGroup

func (_m *MockSegment) ResourceGroup() string

ResourceGroup provides a mock function with given fields:

func (*MockSegment) ResourceUsageEstimate

func (_m *MockSegment) ResourceUsageEstimate() ResourceUsage

ResourceUsageEstimate provides a mock function with given fields:

func (*MockSegment) Retrieve

func (_m *MockSegment) Retrieve(ctx context.Context, plan *RetrievePlan) (*segcorepb.RetrieveResults, error)

Retrieve provides a mock function with given fields: ctx, plan

func (*MockSegment) RetrieveByOffsets

func (_m *MockSegment) RetrieveByOffsets(ctx context.Context, plan *RetrievePlan, offsets []int64) (*segcorepb.RetrieveResults, error)

RetrieveByOffsets provides a mock function with given fields: ctx, plan, offsets

func (*MockSegment) RowNum

func (_m *MockSegment) RowNum() int64

RowNum provides a mock function with given fields:

func (*MockSegment) Search

func (_m *MockSegment) Search(ctx context.Context, searchReq *SearchRequest) (*SearchResult, error)

Search provides a mock function with given fields: ctx, searchReq

func (*MockSegment) Shard

func (_m *MockSegment) Shard() string

Shard provides a mock function with given fields:

func (*MockSegment) StartPosition

func (_m *MockSegment) StartPosition() *msgpb.MsgPosition

StartPosition provides a mock function with given fields:

func (*MockSegment) Type

func (_m *MockSegment) Type() commonpb.SegmentState

Type provides a mock function with given fields:

func (*MockSegment) Unpin

func (_m *MockSegment) Unpin()

Unpin provides a mock function with given fields:

func (*MockSegment) UpdateBloomFilter

func (_m *MockSegment) UpdateBloomFilter(pks []storage.PrimaryKey)

UpdateBloomFilter provides a mock function with given fields: pks

func (*MockSegment) Version

func (_m *MockSegment) Version() int64

Version provides a mock function with given fields:

type MockSegmentManager

type MockSegmentManager struct {
	mock.Mock
}

MockSegmentManager is an autogenerated mock type for the SegmentManager type

func NewMockSegmentManager

func NewMockSegmentManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockSegmentManager

NewMockSegmentManager creates a new instance of MockSegmentManager. 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 (*MockSegmentManager) Clear

func (_m *MockSegmentManager) Clear()

Clear provides a mock function with given fields:

func (*MockSegmentManager) EXPECT

func (*MockSegmentManager) Empty

func (_m *MockSegmentManager) Empty() bool

Empty provides a mock function with given fields:

func (*MockSegmentManager) Get

func (_m *MockSegmentManager) Get(segmentID int64) Segment

Get provides a mock function with given fields: segmentID

func (*MockSegmentManager) GetAndPin

func (_m *MockSegmentManager) GetAndPin(segments []int64, filters ...SegmentFilter) ([]Segment, error)

GetAndPin provides a mock function with given fields: segments, filters

func (*MockSegmentManager) GetAndPinBy

func (_m *MockSegmentManager) GetAndPinBy(filters ...SegmentFilter) ([]Segment, error)

GetAndPinBy provides a mock function with given fields: filters

func (*MockSegmentManager) GetBy

func (_m *MockSegmentManager) GetBy(filters ...SegmentFilter) []Segment

GetBy provides a mock function with given fields: filters

func (*MockSegmentManager) GetGrowing

func (_m *MockSegmentManager) GetGrowing(segmentID int64) Segment

GetGrowing provides a mock function with given fields: segmentID

func (*MockSegmentManager) GetSealed

func (_m *MockSegmentManager) GetSealed(segmentID int64) Segment

GetSealed provides a mock function with given fields: segmentID

func (*MockSegmentManager) GetWithType

func (_m *MockSegmentManager) GetWithType(segmentID int64, typ commonpb.SegmentState) Segment

GetWithType provides a mock function with given fields: segmentID, typ

func (*MockSegmentManager) Put

func (_m *MockSegmentManager) Put(segmentType commonpb.SegmentState, segments ...Segment)

Put provides a mock function with given fields: segmentType, segments

func (*MockSegmentManager) Remove

func (_m *MockSegmentManager) Remove(segmentID int64, scope querypb.DataScope) (int, int)

Remove provides a mock function with given fields: segmentID, scope

func (*MockSegmentManager) RemoveBy

func (_m *MockSegmentManager) RemoveBy(filters ...SegmentFilter) (int, int)

RemoveBy provides a mock function with given fields: filters

func (*MockSegmentManager) Unpin

func (_m *MockSegmentManager) Unpin(segments []Segment)

Unpin provides a mock function with given fields: segments

func (*MockSegmentManager) UpdateBy

func (_m *MockSegmentManager) UpdateBy(action SegmentAction, filters ...SegmentFilter) int

UpdateBy provides a mock function with given fields: action, filters

type MockSegmentManager_Clear_Call

type MockSegmentManager_Clear_Call struct {
	*mock.Call
}

MockSegmentManager_Clear_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Clear'

func (*MockSegmentManager_Clear_Call) Return

func (*MockSegmentManager_Clear_Call) Run

func (*MockSegmentManager_Clear_Call) RunAndReturn

func (_c *MockSegmentManager_Clear_Call) RunAndReturn(run func()) *MockSegmentManager_Clear_Call

type MockSegmentManager_Empty_Call

type MockSegmentManager_Empty_Call struct {
	*mock.Call
}

MockSegmentManager_Empty_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Empty'

func (*MockSegmentManager_Empty_Call) Return

func (*MockSegmentManager_Empty_Call) Run

func (*MockSegmentManager_Empty_Call) RunAndReturn

type MockSegmentManager_Expecter

type MockSegmentManager_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockSegmentManager_Expecter) Clear

Clear is a helper method to define mock.On call

func (*MockSegmentManager_Expecter) Empty

Empty is a helper method to define mock.On call

func (*MockSegmentManager_Expecter) Get

func (_e *MockSegmentManager_Expecter) Get(segmentID interface{}) *MockSegmentManager_Get_Call

Get is a helper method to define mock.On call

  • segmentID int64

func (*MockSegmentManager_Expecter) GetAndPin

func (_e *MockSegmentManager_Expecter) GetAndPin(segments interface{}, filters ...interface{}) *MockSegmentManager_GetAndPin_Call

GetAndPin is a helper method to define mock.On call

  • segments []int64
  • filters ...SegmentFilter

func (*MockSegmentManager_Expecter) GetAndPinBy

func (_e *MockSegmentManager_Expecter) GetAndPinBy(filters ...interface{}) *MockSegmentManager_GetAndPinBy_Call

GetAndPinBy is a helper method to define mock.On call

  • filters ...SegmentFilter

func (*MockSegmentManager_Expecter) GetBy

func (_e *MockSegmentManager_Expecter) GetBy(filters ...interface{}) *MockSegmentManager_GetBy_Call

GetBy is a helper method to define mock.On call

  • filters ...SegmentFilter

func (*MockSegmentManager_Expecter) GetGrowing

func (_e *MockSegmentManager_Expecter) GetGrowing(segmentID interface{}) *MockSegmentManager_GetGrowing_Call

GetGrowing is a helper method to define mock.On call

  • segmentID int64

func (*MockSegmentManager_Expecter) GetSealed

func (_e *MockSegmentManager_Expecter) GetSealed(segmentID interface{}) *MockSegmentManager_GetSealed_Call

GetSealed is a helper method to define mock.On call

  • segmentID int64

func (*MockSegmentManager_Expecter) GetWithType

func (_e *MockSegmentManager_Expecter) GetWithType(segmentID interface{}, typ interface{}) *MockSegmentManager_GetWithType_Call

GetWithType is a helper method to define mock.On call

  • segmentID int64
  • typ commonpb.SegmentState

func (*MockSegmentManager_Expecter) Put

func (_e *MockSegmentManager_Expecter) Put(segmentType interface{}, segments ...interface{}) *MockSegmentManager_Put_Call

Put is a helper method to define mock.On call

  • segmentType commonpb.SegmentState
  • segments ...Segment

func (*MockSegmentManager_Expecter) Remove

func (_e *MockSegmentManager_Expecter) Remove(segmentID interface{}, scope interface{}) *MockSegmentManager_Remove_Call

Remove is a helper method to define mock.On call

  • segmentID int64
  • scope querypb.DataScope

func (*MockSegmentManager_Expecter) RemoveBy

func (_e *MockSegmentManager_Expecter) RemoveBy(filters ...interface{}) *MockSegmentManager_RemoveBy_Call

RemoveBy is a helper method to define mock.On call

  • filters ...SegmentFilter

func (*MockSegmentManager_Expecter) Unpin

func (_e *MockSegmentManager_Expecter) Unpin(segments interface{}) *MockSegmentManager_Unpin_Call

Unpin is a helper method to define mock.On call

  • segments []Segment

func (*MockSegmentManager_Expecter) UpdateBy

func (_e *MockSegmentManager_Expecter) UpdateBy(action interface{}, filters ...interface{}) *MockSegmentManager_UpdateBy_Call

UpdateBy is a helper method to define mock.On call

  • action SegmentAction
  • filters ...SegmentFilter

type MockSegmentManager_GetAndPinBy_Call

type MockSegmentManager_GetAndPinBy_Call struct {
	*mock.Call
}

MockSegmentManager_GetAndPinBy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAndPinBy'

func (*MockSegmentManager_GetAndPinBy_Call) Return

func (*MockSegmentManager_GetAndPinBy_Call) Run

func (*MockSegmentManager_GetAndPinBy_Call) RunAndReturn

type MockSegmentManager_GetAndPin_Call

type MockSegmentManager_GetAndPin_Call struct {
	*mock.Call
}

MockSegmentManager_GetAndPin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAndPin'

func (*MockSegmentManager_GetAndPin_Call) Return

func (*MockSegmentManager_GetAndPin_Call) Run

func (*MockSegmentManager_GetAndPin_Call) RunAndReturn

type MockSegmentManager_GetBy_Call

type MockSegmentManager_GetBy_Call struct {
	*mock.Call
}

MockSegmentManager_GetBy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBy'

func (*MockSegmentManager_GetBy_Call) Return

func (*MockSegmentManager_GetBy_Call) Run

func (*MockSegmentManager_GetBy_Call) RunAndReturn

type MockSegmentManager_GetGrowing_Call

type MockSegmentManager_GetGrowing_Call struct {
	*mock.Call
}

MockSegmentManager_GetGrowing_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGrowing'

func (*MockSegmentManager_GetGrowing_Call) Return

func (*MockSegmentManager_GetGrowing_Call) Run

func (*MockSegmentManager_GetGrowing_Call) RunAndReturn

type MockSegmentManager_GetSealed_Call

type MockSegmentManager_GetSealed_Call struct {
	*mock.Call
}

MockSegmentManager_GetSealed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSealed'

func (*MockSegmentManager_GetSealed_Call) Return

func (*MockSegmentManager_GetSealed_Call) Run

func (*MockSegmentManager_GetSealed_Call) RunAndReturn

type MockSegmentManager_GetWithType_Call

type MockSegmentManager_GetWithType_Call struct {
	*mock.Call
}

MockSegmentManager_GetWithType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWithType'

func (*MockSegmentManager_GetWithType_Call) Return

func (*MockSegmentManager_GetWithType_Call) Run

func (*MockSegmentManager_GetWithType_Call) RunAndReturn

type MockSegmentManager_Get_Call

type MockSegmentManager_Get_Call struct {
	*mock.Call
}

MockSegmentManager_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'

func (*MockSegmentManager_Get_Call) Return

func (*MockSegmentManager_Get_Call) Run

func (_c *MockSegmentManager_Get_Call) Run(run func(segmentID int64)) *MockSegmentManager_Get_Call

func (*MockSegmentManager_Get_Call) RunAndReturn

type MockSegmentManager_Put_Call

type MockSegmentManager_Put_Call struct {
	*mock.Call
}

MockSegmentManager_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put'

func (*MockSegmentManager_Put_Call) Return

func (*MockSegmentManager_Put_Call) Run

func (_c *MockSegmentManager_Put_Call) Run(run func(segmentType commonpb.SegmentState, segments ...Segment)) *MockSegmentManager_Put_Call

func (*MockSegmentManager_Put_Call) RunAndReturn

type MockSegmentManager_RemoveBy_Call

type MockSegmentManager_RemoveBy_Call struct {
	*mock.Call
}

MockSegmentManager_RemoveBy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveBy'

func (*MockSegmentManager_RemoveBy_Call) Return

func (*MockSegmentManager_RemoveBy_Call) Run

func (*MockSegmentManager_RemoveBy_Call) RunAndReturn

type MockSegmentManager_Remove_Call

type MockSegmentManager_Remove_Call struct {
	*mock.Call
}

MockSegmentManager_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove'

func (*MockSegmentManager_Remove_Call) Return

func (*MockSegmentManager_Remove_Call) Run

func (*MockSegmentManager_Remove_Call) RunAndReturn

type MockSegmentManager_Unpin_Call

type MockSegmentManager_Unpin_Call struct {
	*mock.Call
}

MockSegmentManager_Unpin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unpin'

func (*MockSegmentManager_Unpin_Call) Return

func (*MockSegmentManager_Unpin_Call) Run

func (*MockSegmentManager_Unpin_Call) RunAndReturn

type MockSegmentManager_UpdateBy_Call

type MockSegmentManager_UpdateBy_Call struct {
	*mock.Call
}

MockSegmentManager_UpdateBy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateBy'

func (*MockSegmentManager_UpdateBy_Call) Return

func (*MockSegmentManager_UpdateBy_Call) Run

func (*MockSegmentManager_UpdateBy_Call) RunAndReturn

type MockSegment_CASVersion_Call

type MockSegment_CASVersion_Call struct {
	*mock.Call
}

MockSegment_CASVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CASVersion'

func (*MockSegment_CASVersion_Call) Return

func (*MockSegment_CASVersion_Call) Run

func (*MockSegment_CASVersion_Call) RunAndReturn

type MockSegment_Collection_Call

type MockSegment_Collection_Call struct {
	*mock.Call
}

MockSegment_Collection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Collection'

func (*MockSegment_Collection_Call) Return

func (*MockSegment_Collection_Call) Run

func (*MockSegment_Collection_Call) RunAndReturn

func (_c *MockSegment_Collection_Call) RunAndReturn(run func() int64) *MockSegment_Collection_Call

type MockSegment_DatabaseName_Call

type MockSegment_DatabaseName_Call struct {
	*mock.Call
}

MockSegment_DatabaseName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DatabaseName'

func (*MockSegment_DatabaseName_Call) Return

func (*MockSegment_DatabaseName_Call) Run

func (*MockSegment_DatabaseName_Call) RunAndReturn

type MockSegment_Delete_Call

type MockSegment_Delete_Call struct {
	*mock.Call
}

MockSegment_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'

func (*MockSegment_Delete_Call) Return

func (*MockSegment_Delete_Call) Run

func (_c *MockSegment_Delete_Call) Run(run func(ctx context.Context, primaryKeys []storage.PrimaryKey, timestamps []uint64)) *MockSegment_Delete_Call

func (*MockSegment_Delete_Call) RunAndReturn

type MockSegment_ExistIndex_Call

type MockSegment_ExistIndex_Call struct {
	*mock.Call
}

MockSegment_ExistIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExistIndex'

func (*MockSegment_ExistIndex_Call) Return

func (*MockSegment_ExistIndex_Call) Run

func (*MockSegment_ExistIndex_Call) RunAndReturn

type MockSegment_Expecter

type MockSegment_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockSegment_Expecter) CASVersion

func (_e *MockSegment_Expecter) CASVersion(_a0 interface{}, _a1 interface{}) *MockSegment_CASVersion_Call

CASVersion is a helper method to define mock.On call

  • _a0 int64
  • _a1 int64

func (*MockSegment_Expecter) Collection

Collection is a helper method to define mock.On call

func (*MockSegment_Expecter) DatabaseName

DatabaseName is a helper method to define mock.On call

func (*MockSegment_Expecter) Delete

func (_e *MockSegment_Expecter) Delete(ctx interface{}, primaryKeys interface{}, timestamps interface{}) *MockSegment_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • primaryKeys []storage.PrimaryKey
  • timestamps []uint64

func (*MockSegment_Expecter) ExistIndex

func (_e *MockSegment_Expecter) ExistIndex(fieldID interface{}) *MockSegment_ExistIndex_Call

ExistIndex is a helper method to define mock.On call

  • fieldID int64

func (*MockSegment_Expecter) GetIndex

func (_e *MockSegment_Expecter) GetIndex(fieldID interface{}) *MockSegment_GetIndex_Call

GetIndex is a helper method to define mock.On call

  • fieldID int64

func (*MockSegment_Expecter) HasRawData

func (_e *MockSegment_Expecter) HasRawData(fieldID interface{}) *MockSegment_HasRawData_Call

HasRawData is a helper method to define mock.On call

  • fieldID int64

func (*MockSegment_Expecter) ID

ID is a helper method to define mock.On call

func (*MockSegment_Expecter) Indexes

Indexes is a helper method to define mock.On call

func (*MockSegment_Expecter) Insert

func (_e *MockSegment_Expecter) Insert(ctx interface{}, rowIDs interface{}, timestamps interface{}, record interface{}) *MockSegment_Insert_Call

Insert is a helper method to define mock.On call

  • ctx context.Context
  • rowIDs []int64
  • timestamps []uint64
  • record *segcorepb.InsertRecord

func (*MockSegment_Expecter) InsertCount

InsertCount is a helper method to define mock.On call

func (*MockSegment_Expecter) IsLazyLoad

IsLazyLoad is a helper method to define mock.On call

func (*MockSegment_Expecter) LastDeltaTimestamp

LastDeltaTimestamp is a helper method to define mock.On call

func (*MockSegment_Expecter) Level

Level is a helper method to define mock.On call

func (*MockSegment_Expecter) LoadDeltaData

func (_e *MockSegment_Expecter) LoadDeltaData(ctx interface{}, deltaData interface{}) *MockSegment_LoadDeltaData_Call

LoadDeltaData is a helper method to define mock.On call

  • ctx context.Context
  • deltaData *storage.DeleteData

func (*MockSegment_Expecter) LoadInfo

LoadInfo is a helper method to define mock.On call

func (*MockSegment_Expecter) LoadStatus

LoadStatus is a helper method to define mock.On call

func (*MockSegment_Expecter) MayPkExist

func (_e *MockSegment_Expecter) MayPkExist(pk interface{}) *MockSegment_MayPkExist_Call

MayPkExist is a helper method to define mock.On call

  • pk storage.PrimaryKey

func (*MockSegment_Expecter) MemSize

MemSize is a helper method to define mock.On call

func (*MockSegment_Expecter) Partition

Partition is a helper method to define mock.On call

func (*MockSegment_Expecter) RLock

RLock is a helper method to define mock.On call

func (*MockSegment_Expecter) RUnlock

RUnlock is a helper method to define mock.On call

func (*MockSegment_Expecter) Release

func (_e *MockSegment_Expecter) Release(opts ...interface{}) *MockSegment_Release_Call

Release is a helper method to define mock.On call

  • opts ...releaseOption

func (*MockSegment_Expecter) ResetIndexesLazyLoad

func (_e *MockSegment_Expecter) ResetIndexesLazyLoad(lazyState interface{}) *MockSegment_ResetIndexesLazyLoad_Call

ResetIndexesLazyLoad is a helper method to define mock.On call

  • lazyState bool

func (*MockSegment_Expecter) ResourceGroup

ResourceGroup is a helper method to define mock.On call

func (*MockSegment_Expecter) ResourceUsageEstimate

func (_e *MockSegment_Expecter) ResourceUsageEstimate() *MockSegment_ResourceUsageEstimate_Call

ResourceUsageEstimate is a helper method to define mock.On call

func (*MockSegment_Expecter) Retrieve

func (_e *MockSegment_Expecter) Retrieve(ctx interface{}, plan interface{}) *MockSegment_Retrieve_Call

Retrieve is a helper method to define mock.On call

  • ctx context.Context
  • plan *RetrievePlan

func (*MockSegment_Expecter) RetrieveByOffsets

func (_e *MockSegment_Expecter) RetrieveByOffsets(ctx interface{}, plan interface{}, offsets interface{}) *MockSegment_RetrieveByOffsets_Call

RetrieveByOffsets is a helper method to define mock.On call

  • ctx context.Context
  • plan *RetrievePlan
  • offsets []int64

func (*MockSegment_Expecter) RowNum

RowNum is a helper method to define mock.On call

func (*MockSegment_Expecter) Search

func (_e *MockSegment_Expecter) Search(ctx interface{}, searchReq interface{}) *MockSegment_Search_Call

Search is a helper method to define mock.On call

  • ctx context.Context
  • searchReq *SearchRequest

func (*MockSegment_Expecter) Shard

Shard is a helper method to define mock.On call

func (*MockSegment_Expecter) StartPosition

StartPosition is a helper method to define mock.On call

func (*MockSegment_Expecter) Type

Type is a helper method to define mock.On call

func (*MockSegment_Expecter) UpdateBloomFilter

func (_e *MockSegment_Expecter) UpdateBloomFilter(pks interface{}) *MockSegment_UpdateBloomFilter_Call

UpdateBloomFilter is a helper method to define mock.On call

  • pks []storage.PrimaryKey

func (*MockSegment_Expecter) Version

Version is a helper method to define mock.On call

type MockSegment_GetIndex_Call

type MockSegment_GetIndex_Call struct {
	*mock.Call
}

MockSegment_GetIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIndex'

func (*MockSegment_GetIndex_Call) Return

func (*MockSegment_GetIndex_Call) Run

func (_c *MockSegment_GetIndex_Call) Run(run func(fieldID int64)) *MockSegment_GetIndex_Call

func (*MockSegment_GetIndex_Call) RunAndReturn

type MockSegment_HasRawData_Call

type MockSegment_HasRawData_Call struct {
	*mock.Call
}

MockSegment_HasRawData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasRawData'

func (*MockSegment_HasRawData_Call) Return

func (*MockSegment_HasRawData_Call) Run

func (*MockSegment_HasRawData_Call) RunAndReturn

type MockSegment_ID_Call

type MockSegment_ID_Call struct {
	*mock.Call
}

MockSegment_ID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ID'

func (*MockSegment_ID_Call) Return

func (*MockSegment_ID_Call) Run

func (_c *MockSegment_ID_Call) Run(run func()) *MockSegment_ID_Call

func (*MockSegment_ID_Call) RunAndReturn

func (_c *MockSegment_ID_Call) RunAndReturn(run func() int64) *MockSegment_ID_Call

type MockSegment_Indexes_Call

type MockSegment_Indexes_Call struct {
	*mock.Call
}

MockSegment_Indexes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Indexes'

func (*MockSegment_Indexes_Call) Return

func (*MockSegment_Indexes_Call) Run

func (*MockSegment_Indexes_Call) RunAndReturn

func (_c *MockSegment_Indexes_Call) RunAndReturn(run func() []*IndexedFieldInfo) *MockSegment_Indexes_Call

type MockSegment_InsertCount_Call

type MockSegment_InsertCount_Call struct {
	*mock.Call
}

MockSegment_InsertCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertCount'

func (*MockSegment_InsertCount_Call) Return

func (*MockSegment_InsertCount_Call) Run

func (*MockSegment_InsertCount_Call) RunAndReturn

func (_c *MockSegment_InsertCount_Call) RunAndReturn(run func() int64) *MockSegment_InsertCount_Call

type MockSegment_Insert_Call

type MockSegment_Insert_Call struct {
	*mock.Call
}

MockSegment_Insert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Insert'

func (*MockSegment_Insert_Call) Return

func (*MockSegment_Insert_Call) Run

func (_c *MockSegment_Insert_Call) Run(run func(ctx context.Context, rowIDs []int64, timestamps []uint64, record *segcorepb.InsertRecord)) *MockSegment_Insert_Call

func (*MockSegment_Insert_Call) RunAndReturn

type MockSegment_IsLazyLoad_Call

type MockSegment_IsLazyLoad_Call struct {
	*mock.Call
}

MockSegment_IsLazyLoad_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsLazyLoad'

func (*MockSegment_IsLazyLoad_Call) Return

func (*MockSegment_IsLazyLoad_Call) Run

func (*MockSegment_IsLazyLoad_Call) RunAndReturn

func (_c *MockSegment_IsLazyLoad_Call) RunAndReturn(run func() bool) *MockSegment_IsLazyLoad_Call

type MockSegment_LastDeltaTimestamp_Call

type MockSegment_LastDeltaTimestamp_Call struct {
	*mock.Call
}

MockSegment_LastDeltaTimestamp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LastDeltaTimestamp'

func (*MockSegment_LastDeltaTimestamp_Call) Return

func (*MockSegment_LastDeltaTimestamp_Call) Run

func (*MockSegment_LastDeltaTimestamp_Call) RunAndReturn

type MockSegment_Level_Call

type MockSegment_Level_Call struct {
	*mock.Call
}

MockSegment_Level_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Level'

func (*MockSegment_Level_Call) Return

func (*MockSegment_Level_Call) Run

func (_c *MockSegment_Level_Call) Run(run func()) *MockSegment_Level_Call

func (*MockSegment_Level_Call) RunAndReturn

func (_c *MockSegment_Level_Call) RunAndReturn(run func() datapb.SegmentLevel) *MockSegment_Level_Call

type MockSegment_LoadDeltaData_Call

type MockSegment_LoadDeltaData_Call struct {
	*mock.Call
}

MockSegment_LoadDeltaData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadDeltaData'

func (*MockSegment_LoadDeltaData_Call) Return

func (*MockSegment_LoadDeltaData_Call) Run

func (*MockSegment_LoadDeltaData_Call) RunAndReturn

type MockSegment_LoadInfo_Call

type MockSegment_LoadInfo_Call struct {
	*mock.Call
}

MockSegment_LoadInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadInfo'

func (*MockSegment_LoadInfo_Call) Return

func (*MockSegment_LoadInfo_Call) Run

func (*MockSegment_LoadInfo_Call) RunAndReturn

type MockSegment_LoadStatus_Call

type MockSegment_LoadStatus_Call struct {
	*mock.Call
}

MockSegment_LoadStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadStatus'

func (*MockSegment_LoadStatus_Call) Return

func (*MockSegment_LoadStatus_Call) Run

func (*MockSegment_LoadStatus_Call) RunAndReturn

type MockSegment_MayPkExist_Call

type MockSegment_MayPkExist_Call struct {
	*mock.Call
}

MockSegment_MayPkExist_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MayPkExist'

func (*MockSegment_MayPkExist_Call) Return

func (*MockSegment_MayPkExist_Call) Run

func (*MockSegment_MayPkExist_Call) RunAndReturn

type MockSegment_MemSize_Call

type MockSegment_MemSize_Call struct {
	*mock.Call
}

MockSegment_MemSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MemSize'

func (*MockSegment_MemSize_Call) Return

func (*MockSegment_MemSize_Call) Run

func (*MockSegment_MemSize_Call) RunAndReturn

func (_c *MockSegment_MemSize_Call) RunAndReturn(run func() int64) *MockSegment_MemSize_Call

type MockSegment_Partition_Call

type MockSegment_Partition_Call struct {
	*mock.Call
}

MockSegment_Partition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Partition'

func (*MockSegment_Partition_Call) Return

func (*MockSegment_Partition_Call) Run

func (*MockSegment_Partition_Call) RunAndReturn

func (_c *MockSegment_Partition_Call) RunAndReturn(run func() int64) *MockSegment_Partition_Call

type MockSegment_RLock_Call

type MockSegment_RLock_Call struct {
	*mock.Call
}

MockSegment_RLock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RLock'

func (*MockSegment_RLock_Call) Return

func (*MockSegment_RLock_Call) Run

func (_c *MockSegment_RLock_Call) Run(run func()) *MockSegment_RLock_Call

func (*MockSegment_RLock_Call) RunAndReturn

func (_c *MockSegment_RLock_Call) RunAndReturn(run func() error) *MockSegment_RLock_Call

type MockSegment_RUnlock_Call

type MockSegment_RUnlock_Call struct {
	*mock.Call
}

MockSegment_RUnlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RUnlock'

func (*MockSegment_RUnlock_Call) Return

func (*MockSegment_RUnlock_Call) Run

func (*MockSegment_RUnlock_Call) RunAndReturn

func (_c *MockSegment_RUnlock_Call) RunAndReturn(run func()) *MockSegment_RUnlock_Call

type MockSegment_Release_Call

type MockSegment_Release_Call struct {
	*mock.Call
}

MockSegment_Release_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Release'

func (*MockSegment_Release_Call) Return

func (*MockSegment_Release_Call) Run

func (_c *MockSegment_Release_Call) Run(run func(opts ...releaseOption)) *MockSegment_Release_Call

func (*MockSegment_Release_Call) RunAndReturn

func (_c *MockSegment_Release_Call) RunAndReturn(run func(...releaseOption)) *MockSegment_Release_Call

type MockSegment_ResetIndexesLazyLoad_Call

type MockSegment_ResetIndexesLazyLoad_Call struct {
	*mock.Call
}

MockSegment_ResetIndexesLazyLoad_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResetIndexesLazyLoad'

func (*MockSegment_ResetIndexesLazyLoad_Call) Return

func (*MockSegment_ResetIndexesLazyLoad_Call) Run

func (*MockSegment_ResetIndexesLazyLoad_Call) RunAndReturn

type MockSegment_ResourceGroup_Call

type MockSegment_ResourceGroup_Call struct {
	*mock.Call
}

MockSegment_ResourceGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceGroup'

func (*MockSegment_ResourceGroup_Call) Return

func (*MockSegment_ResourceGroup_Call) Run

func (*MockSegment_ResourceGroup_Call) RunAndReturn

type MockSegment_ResourceUsageEstimate_Call

type MockSegment_ResourceUsageEstimate_Call struct {
	*mock.Call
}

MockSegment_ResourceUsageEstimate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceUsageEstimate'

func (*MockSegment_ResourceUsageEstimate_Call) Return

func (*MockSegment_ResourceUsageEstimate_Call) Run

func (*MockSegment_ResourceUsageEstimate_Call) RunAndReturn

type MockSegment_RetrieveByOffsets_Call

type MockSegment_RetrieveByOffsets_Call struct {
	*mock.Call
}

MockSegment_RetrieveByOffsets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RetrieveByOffsets'

func (*MockSegment_RetrieveByOffsets_Call) Return

func (*MockSegment_RetrieveByOffsets_Call) Run

func (*MockSegment_RetrieveByOffsets_Call) RunAndReturn

type MockSegment_Retrieve_Call

type MockSegment_Retrieve_Call struct {
	*mock.Call
}

MockSegment_Retrieve_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Retrieve'

func (*MockSegment_Retrieve_Call) Return

func (*MockSegment_Retrieve_Call) Run

func (*MockSegment_Retrieve_Call) RunAndReturn

type MockSegment_RowNum_Call

type MockSegment_RowNum_Call struct {
	*mock.Call
}

MockSegment_RowNum_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RowNum'

func (*MockSegment_RowNum_Call) Return

func (*MockSegment_RowNum_Call) Run

func (_c *MockSegment_RowNum_Call) Run(run func()) *MockSegment_RowNum_Call

func (*MockSegment_RowNum_Call) RunAndReturn

func (_c *MockSegment_RowNum_Call) RunAndReturn(run func() int64) *MockSegment_RowNum_Call

type MockSegment_Search_Call

type MockSegment_Search_Call struct {
	*mock.Call
}

MockSegment_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search'

func (*MockSegment_Search_Call) Return

func (*MockSegment_Search_Call) Run

func (_c *MockSegment_Search_Call) Run(run func(ctx context.Context, searchReq *SearchRequest)) *MockSegment_Search_Call

func (*MockSegment_Search_Call) RunAndReturn

type MockSegment_Shard_Call

type MockSegment_Shard_Call struct {
	*mock.Call
}

MockSegment_Shard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Shard'

func (*MockSegment_Shard_Call) Return

func (*MockSegment_Shard_Call) Run

func (_c *MockSegment_Shard_Call) Run(run func()) *MockSegment_Shard_Call

func (*MockSegment_Shard_Call) RunAndReturn

func (_c *MockSegment_Shard_Call) RunAndReturn(run func() string) *MockSegment_Shard_Call

type MockSegment_StartPosition_Call

type MockSegment_StartPosition_Call struct {
	*mock.Call
}

MockSegment_StartPosition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartPosition'

func (*MockSegment_StartPosition_Call) Return

func (*MockSegment_StartPosition_Call) Run

func (*MockSegment_StartPosition_Call) RunAndReturn

type MockSegment_Type_Call

type MockSegment_Type_Call struct {
	*mock.Call
}

MockSegment_Type_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Type'

func (*MockSegment_Type_Call) Return

func (*MockSegment_Type_Call) Run

func (_c *MockSegment_Type_Call) Run(run func()) *MockSegment_Type_Call

func (*MockSegment_Type_Call) RunAndReturn

func (_c *MockSegment_Type_Call) RunAndReturn(run func() commonpb.SegmentState) *MockSegment_Type_Call

type MockSegment_UpdateBloomFilter_Call

type MockSegment_UpdateBloomFilter_Call struct {
	*mock.Call
}

MockSegment_UpdateBloomFilter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateBloomFilter'

func (*MockSegment_UpdateBloomFilter_Call) Return

func (*MockSegment_UpdateBloomFilter_Call) Run

func (*MockSegment_UpdateBloomFilter_Call) RunAndReturn

type MockSegment_Version_Call

type MockSegment_Version_Call struct {
	*mock.Call
}

MockSegment_Version_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Version'

func (*MockSegment_Version_Call) Return

func (*MockSegment_Version_Call) Run

func (*MockSegment_Version_Call) RunAndReturn

func (_c *MockSegment_Version_Call) RunAndReturn(run func() int64) *MockSegment_Version_Call

type ReleaseScope

type ReleaseScope int
const (
	ReleaseScopeAll ReleaseScope = iota
	ReleaseScopeData
)

type ResourceUsage

type ResourceUsage struct {
	MemorySize     uint64
	DiskSize       uint64
	MmapFieldCount int
}

ResourceUsage is used to estimate the resource usage of a sealed segment.

type RetrievePlan

type RetrievePlan struct {
	Timestamp Timestamp
	// contains filtered or unexported fields
}

RetrievePlan is a wrapper of the underlying C-structure C.CRetrievePlan

func NewRetrievePlan

func NewRetrievePlan(ctx context.Context, col *Collection, expr []byte, timestamp Timestamp, msgID UniqueID) (*RetrievePlan, error)

func (*RetrievePlan) Delete

func (plan *RetrievePlan) Delete()

func (*RetrievePlan) ShouldIgnoreNonPk

func (plan *RetrievePlan) ShouldIgnoreNonPk() bool

type RetrieveResult

type RetrieveResult struct {
	// contains filtered or unexported fields
}

RetrieveResult contains a pointer to the retrieve result in C++ memory

type SearchPlan

type SearchPlan struct {
	// contains filtered or unexported fields
}

SearchPlan is a wrapper of the underlying C-structure C.CSearchPlan

func (*SearchPlan) GetMetricType

func (plan *SearchPlan) GetMetricType() string

type SearchRequest

type SearchRequest struct {
	// contains filtered or unexported fields
}

func NewSearchRequest

func NewSearchRequest(ctx context.Context, collection *Collection, req *querypb.SearchRequest, placeholderGrp []byte) (*SearchRequest, error)

func (*SearchRequest) Delete

func (req *SearchRequest) Delete()

func (*SearchRequest) Plan

func (req *SearchRequest) Plan() *SearchPlan

type SearchResult

type SearchResult struct {
	// contains filtered or unexported fields
}

SearchResult contains a pointer to the search result in C++ memory

type Segment

type Segment interface {

	// Properties
	ID() int64
	DatabaseName() string
	ResourceGroup() string
	Collection() int64
	Partition() int64
	Shard() string
	Version() int64
	CASVersion(int64, int64) bool
	StartPosition() *msgpb.MsgPosition
	Type() SegmentType
	Level() datapb.SegmentLevel
	LoadStatus() LoadStatus
	LoadInfo() *querypb.SegmentLoadInfo
	// PinIfNotReleased the segment to prevent it from being released
	PinIfNotReleased() error
	// Unpin the segment to allow it to be released
	Unpin()

	// Stats related
	// InsertCount returns the number of inserted rows, not effected by deletion
	InsertCount() int64
	// RowNum returns the number of rows, it's slow, so DO NOT call it in a loop
	RowNum() int64
	MemSize() int64
	// ResourceUsageEstimate returns the estimated resource usage of the segment
	ResourceUsageEstimate() ResourceUsage

	// Index related
	GetIndex(fieldID int64) *IndexedFieldInfo
	ExistIndex(fieldID int64) bool
	Indexes() []*IndexedFieldInfo
	HasRawData(fieldID int64) bool

	// Modification related
	Insert(ctx context.Context, rowIDs []int64, timestamps []typeutil.Timestamp, record *segcorepb.InsertRecord) error
	Delete(ctx context.Context, primaryKeys []storage.PrimaryKey, timestamps []typeutil.Timestamp) error
	LoadDeltaData(ctx context.Context, deltaData *storage.DeleteData) error
	LastDeltaTimestamp() uint64
	Release(opts ...releaseOption)

	// Bloom filter related
	UpdateBloomFilter(pks []storage.PrimaryKey)
	MayPkExist(pk storage.PrimaryKey) bool

	// Read operations
	Search(ctx context.Context, searchReq *SearchRequest) (*SearchResult, error)
	Retrieve(ctx context.Context, plan *RetrievePlan) (*segcorepb.RetrieveResults, error)
	RetrieveByOffsets(ctx context.Context, plan *RetrievePlan, offsets []int64) (*segcorepb.RetrieveResults, error)
	IsLazyLoad() bool
	ResetIndexesLazyLoad(lazyState bool)
}

Segment is the interface of a segment implementation. Some methods can not apply to all segment types,such as LoadInfo, ResourceUsageEstimate. Add more interface to represent different segment types is a better implementation.

func NewL0Segment

func NewL0Segment(collection *Collection,
	segmentType SegmentType,
	version int64,
	loadInfo *querypb.SegmentLoadInfo,
) (Segment, error)

func NewSegment

func NewSegment(ctx context.Context,
	collection *Collection,
	segmentType SegmentType,
	version int64,
	loadInfo *querypb.SegmentLoadInfo,
) (Segment, error)

func NewSegmentV2

func NewSegmentV2(
	ctx context.Context,
	collection *Collection,
	segmentType SegmentType,
	version int64,
	loadInfo *querypb.SegmentLoadInfo,
) (Segment, error)

func Retrieve

func Retrieve(ctx context.Context, manager *Manager, plan *RetrievePlan, req *querypb.QueryRequest) ([]*segcorepb.RetrieveResults, []Segment, error)

retrieve will retrieve all the validate target segments

func RetrieveStream

func RetrieveStream(ctx context.Context, manager *Manager, plan *RetrievePlan, req *querypb.QueryRequest, srv streamrpc.QueryStreamServer) ([]Segment, error)

retrieveStreaming will retrieve all the validate target segments and return by stream

type SegmentAction

type SegmentAction func(segment Segment) bool

func IncreaseVersion

func IncreaseVersion(version int64) SegmentAction

type SegmentFilter

type SegmentFilter interface {
	Filter(segment Segment) bool
	SegmentType() (SegmentType, bool)
	SegmentIDs() ([]int64, bool)
}

SegmentFilter is the interface for segment selection criteria.

func WithChannel

func WithChannel(channel string) SegmentFilter

func WithID

func WithID(id int64) SegmentFilter

func WithLevel

func WithLevel(level datapb.SegmentLevel) SegmentFilter

func WithPartition

func WithPartition(partitionID typeutil.UniqueID) SegmentFilter

func WithSkipEmpty

func WithSkipEmpty() SegmentFilter

func WithType

func WithType(typ SegmentType) SegmentFilter

type SegmentFilterFunc

type SegmentFilterFunc func(segment Segment) bool

SegmentFilterFunc is a type wrapper for `func(Segment) bool` to SegmentFilter.

func (SegmentFilterFunc) Filter

func (f SegmentFilterFunc) Filter(segment Segment) bool

func (SegmentFilterFunc) SegmentIDs

func (s SegmentFilterFunc) SegmentIDs() ([]int64, bool)

func (SegmentFilterFunc) SegmentType

func (f SegmentFilterFunc) SegmentType() (SegmentType, bool)

type SegmentIDFilter

type SegmentIDFilter int64

SegmentIDFilter is the specific segment filter for SegmentID only.

func (SegmentIDFilter) Filter

func (f SegmentIDFilter) Filter(segment Segment) bool

func (SegmentIDFilter) SegmentIDs

func (f SegmentIDFilter) SegmentIDs() ([]int64, bool)

func (SegmentIDFilter) SegmentType

func (f SegmentIDFilter) SegmentType() (SegmentType, bool)

type SegmentManager

type SegmentManager interface {
	// Put puts the given segments in,
	// and increases the ref count of the corresponding collection,
	// dup segments will not increase the ref count
	Put(segmentType SegmentType, segments ...Segment)
	UpdateBy(action SegmentAction, filters ...SegmentFilter) int
	Get(segmentID typeutil.UniqueID) Segment
	GetWithType(segmentID typeutil.UniqueID, typ SegmentType) Segment
	GetBy(filters ...SegmentFilter) []Segment
	// Get segments and acquire the read locks
	GetAndPinBy(filters ...SegmentFilter) ([]Segment, error)
	GetAndPin(segments []int64, filters ...SegmentFilter) ([]Segment, error)
	Unpin(segments []Segment)

	GetSealed(segmentID typeutil.UniqueID) Segment
	GetGrowing(segmentID typeutil.UniqueID) Segment
	Empty() bool

	// Remove removes the given segment,
	// and decreases the ref count of the corresponding collection,
	// will not decrease the ref count if the given segment not exists
	Remove(segmentID typeutil.UniqueID, scope querypb.DataScope) (int, int)
	RemoveBy(filters ...SegmentFilter) (int, int)
	Clear()
}

type SegmentStats

type SegmentStats struct {
	SegmentID int64
	RowCount  int64
}

SegmentStats struct for segment statistics.

type SegmentType

type SegmentType = commonpb.SegmentState

type SegmentTypeFilter

type SegmentTypeFilter SegmentType

func (SegmentTypeFilter) Filter

func (f SegmentTypeFilter) Filter(segment Segment) bool

func (SegmentTypeFilter) SegmentIDs

func (f SegmentTypeFilter) SegmentIDs() ([]int64, bool)

func (SegmentTypeFilter) SegmentType

func (f SegmentTypeFilter) SegmentType() (SegmentType, bool)

type SliceInfo

type SliceInfo struct {
	SliceNQs   []int64
	SliceTopKs []int64
}

func ParseSliceInfo

func ParseSliceInfo(originNQs []int64, originTopKs []int64, nqPerSlice int64) *SliceInfo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL