Documentation ¶
Overview ¶
delegator package contains the logic of shard delegator.
Index ¶
- Variables
- func FilterSegmentsByVector(partitionStats *storage.PartitionStatsSnapshot, ...)
- func FilterSegmentsOnScalarField(partitionStats *storage.PartitionStatsSnapshot, ...)
- func NewDistribution() *distribution
- func NewSnapshot(sealed []SnapshotItem, growing []SegmentEntry, last *snapshot, version int64, ...) *snapshot
- func PruneByScalarField(expr Expr, segmentStats []storage.SegmentStats, segmentIDs []UniqueID, ...)
- func PruneSegments(ctx context.Context, ...)
- func WrapErrTsLagTooLarge(duration time.Duration, maxLag time.Duration) error
- type BatchApplyRet
- type BinaryRangeExpr
- type ConsumeSubName
- type DSL
- type DeleteData
- type EvalCtx
- type ExcludedSegments
- type Expr
- func ParseBinaryRangeExpr(exprPb *planpb.BinaryRangeExpr, parseCtx *ParseContext) (Expr, error)
- func ParseExpr(exprPb *planpb.Expr, parseCtx *ParseContext) (Expr, error)
- func ParseLogicalBinaryExpr(exprPb *planpb.BinaryExpr, parseCtx *ParseContext) (Expr, error)
- func ParseLogicalUnaryExpr(exprPb *planpb.UnaryExpr, parseCtx *ParseContext) (Expr, error)
- func ParseTermExpr(exprPb *planpb.TermExpr, parseCtx *ParseContext) (Expr, error)
- func ParseUnaryRangeExpr(exprPb *planpb.UnaryRangeExpr, parseCtx *ParseContext) (Expr, error)
- type FieldID
- type InsertData
- type IntPrimaryKey
- type LogicalBinaryExpr
- type MockShardDelegator
- func (_m *MockShardDelegator) AddExcludedSegments(excludeInfo map[int64]uint64)
- func (_m *MockShardDelegator) Close()
- func (_m *MockShardDelegator) Collection() int64
- func (_m *MockShardDelegator) EXPECT() *MockShardDelegator_Expecter
- func (_m *MockShardDelegator) GetPartitionStatsVersions(ctx context.Context) map[int64]int64
- func (_m *MockShardDelegator) GetSegmentInfo(readable bool) ([]SnapshotItem, []SegmentEntry)
- func (_m *MockShardDelegator) GetStatistics(ctx context.Context, req *querypb.GetStatisticsRequest) ([]*internalpb.GetStatisticsResponse, error)
- func (_m *MockShardDelegator) GetTargetVersion() int64
- func (_m *MockShardDelegator) LoadGrowing(ctx context.Context, infos []*querypb.SegmentLoadInfo, version int64) error
- func (_m *MockShardDelegator) LoadSegments(ctx context.Context, req *querypb.LoadSegmentsRequest) error
- func (_m *MockShardDelegator) ProcessDelete(deleteData []*DeleteData, ts uint64)
- func (_m *MockShardDelegator) ProcessInsert(insertRecords map[int64]*InsertData)
- func (_m *MockShardDelegator) Query(ctx context.Context, req *querypb.QueryRequest) ([]*internalpb.RetrieveResults, error)
- func (_m *MockShardDelegator) QueryStream(ctx context.Context, req *querypb.QueryRequest, ...) error
- func (_m *MockShardDelegator) ReleaseSegments(ctx context.Context, req *querypb.ReleaseSegmentsRequest, force bool) error
- func (_m *MockShardDelegator) Search(ctx context.Context, req *querypb.SearchRequest) ([]*internalpb.SearchResults, error)
- func (_m *MockShardDelegator) Serviceable() bool
- func (_m *MockShardDelegator) Start()
- func (_m *MockShardDelegator) SyncDistribution(ctx context.Context, entries ...SegmentEntry)
- func (_m *MockShardDelegator) SyncPartitionStats(ctx context.Context, partVersions map[int64]int64)
- func (_m *MockShardDelegator) SyncTargetVersion(newVersion int64, growingInTarget []int64, sealedInTarget []int64, ...)
- func (_m *MockShardDelegator) TryCleanExcludedSegments(ts uint64)
- func (_m *MockShardDelegator) VerifyExcludedSegments(segmentID int64, ts uint64) bool
- func (_m *MockShardDelegator) Version() int64
- type MockShardDelegator_AddExcludedSegments_Call
- func (_c *MockShardDelegator_AddExcludedSegments_Call) Return() *MockShardDelegator_AddExcludedSegments_Call
- func (_c *MockShardDelegator_AddExcludedSegments_Call) Run(run func(excludeInfo map[int64]uint64)) *MockShardDelegator_AddExcludedSegments_Call
- func (_c *MockShardDelegator_AddExcludedSegments_Call) RunAndReturn(run func(map[int64]uint64)) *MockShardDelegator_AddExcludedSegments_Call
- type MockShardDelegator_Close_Call
- type MockShardDelegator_Collection_Call
- func (_c *MockShardDelegator_Collection_Call) Return(_a0 int64) *MockShardDelegator_Collection_Call
- func (_c *MockShardDelegator_Collection_Call) Run(run func()) *MockShardDelegator_Collection_Call
- func (_c *MockShardDelegator_Collection_Call) RunAndReturn(run func() int64) *MockShardDelegator_Collection_Call
- type MockShardDelegator_Expecter
- func (_e *MockShardDelegator_Expecter) AddExcludedSegments(excludeInfo interface{}) *MockShardDelegator_AddExcludedSegments_Call
- func (_e *MockShardDelegator_Expecter) Close() *MockShardDelegator_Close_Call
- func (_e *MockShardDelegator_Expecter) Collection() *MockShardDelegator_Collection_Call
- func (_e *MockShardDelegator_Expecter) GetPartitionStatsVersions(ctx interface{}) *MockShardDelegator_GetPartitionStatsVersions_Call
- func (_e *MockShardDelegator_Expecter) GetSegmentInfo(readable interface{}) *MockShardDelegator_GetSegmentInfo_Call
- func (_e *MockShardDelegator_Expecter) GetStatistics(ctx interface{}, req interface{}) *MockShardDelegator_GetStatistics_Call
- func (_e *MockShardDelegator_Expecter) GetTargetVersion() *MockShardDelegator_GetTargetVersion_Call
- func (_e *MockShardDelegator_Expecter) LoadGrowing(ctx interface{}, infos interface{}, version interface{}) *MockShardDelegator_LoadGrowing_Call
- func (_e *MockShardDelegator_Expecter) LoadSegments(ctx interface{}, req interface{}) *MockShardDelegator_LoadSegments_Call
- func (_e *MockShardDelegator_Expecter) ProcessDelete(deleteData interface{}, ts interface{}) *MockShardDelegator_ProcessDelete_Call
- func (_e *MockShardDelegator_Expecter) ProcessInsert(insertRecords interface{}) *MockShardDelegator_ProcessInsert_Call
- func (_e *MockShardDelegator_Expecter) Query(ctx interface{}, req interface{}) *MockShardDelegator_Query_Call
- func (_e *MockShardDelegator_Expecter) QueryStream(ctx interface{}, req interface{}, srv interface{}) *MockShardDelegator_QueryStream_Call
- func (_e *MockShardDelegator_Expecter) ReleaseSegments(ctx interface{}, req interface{}, force interface{}) *MockShardDelegator_ReleaseSegments_Call
- func (_e *MockShardDelegator_Expecter) Search(ctx interface{}, req interface{}) *MockShardDelegator_Search_Call
- func (_e *MockShardDelegator_Expecter) Serviceable() *MockShardDelegator_Serviceable_Call
- func (_e *MockShardDelegator_Expecter) Start() *MockShardDelegator_Start_Call
- func (_e *MockShardDelegator_Expecter) SyncDistribution(ctx interface{}, entries ...interface{}) *MockShardDelegator_SyncDistribution_Call
- func (_e *MockShardDelegator_Expecter) SyncPartitionStats(ctx interface{}, partVersions interface{}) *MockShardDelegator_SyncPartitionStats_Call
- func (_e *MockShardDelegator_Expecter) SyncTargetVersion(newVersion interface{}, growingInTarget interface{}, ...) *MockShardDelegator_SyncTargetVersion_Call
- func (_e *MockShardDelegator_Expecter) TryCleanExcludedSegments(ts interface{}) *MockShardDelegator_TryCleanExcludedSegments_Call
- func (_e *MockShardDelegator_Expecter) VerifyExcludedSegments(segmentID interface{}, ts interface{}) *MockShardDelegator_VerifyExcludedSegments_Call
- func (_e *MockShardDelegator_Expecter) Version() *MockShardDelegator_Version_Call
- type MockShardDelegator_GetPartitionStatsVersions_Call
- func (_c *MockShardDelegator_GetPartitionStatsVersions_Call) Return(_a0 map[int64]int64) *MockShardDelegator_GetPartitionStatsVersions_Call
- func (_c *MockShardDelegator_GetPartitionStatsVersions_Call) Run(run func(ctx context.Context)) *MockShardDelegator_GetPartitionStatsVersions_Call
- func (_c *MockShardDelegator_GetPartitionStatsVersions_Call) RunAndReturn(run func(context.Context) map[int64]int64) *MockShardDelegator_GetPartitionStatsVersions_Call
- type MockShardDelegator_GetSegmentInfo_Call
- func (_c *MockShardDelegator_GetSegmentInfo_Call) Return(sealed []SnapshotItem, growing []SegmentEntry) *MockShardDelegator_GetSegmentInfo_Call
- func (_c *MockShardDelegator_GetSegmentInfo_Call) Run(run func(readable bool)) *MockShardDelegator_GetSegmentInfo_Call
- func (_c *MockShardDelegator_GetSegmentInfo_Call) RunAndReturn(run func(bool) ([]SnapshotItem, []SegmentEntry)) *MockShardDelegator_GetSegmentInfo_Call
- type MockShardDelegator_GetStatistics_Call
- func (_c *MockShardDelegator_GetStatistics_Call) Return(_a0 []*internalpb.GetStatisticsResponse, _a1 error) *MockShardDelegator_GetStatistics_Call
- func (_c *MockShardDelegator_GetStatistics_Call) Run(run func(ctx context.Context, req *querypb.GetStatisticsRequest)) *MockShardDelegator_GetStatistics_Call
- func (_c *MockShardDelegator_GetStatistics_Call) RunAndReturn(...) *MockShardDelegator_GetStatistics_Call
- type MockShardDelegator_GetTargetVersion_Call
- func (_c *MockShardDelegator_GetTargetVersion_Call) Return(_a0 int64) *MockShardDelegator_GetTargetVersion_Call
- func (_c *MockShardDelegator_GetTargetVersion_Call) Run(run func()) *MockShardDelegator_GetTargetVersion_Call
- func (_c *MockShardDelegator_GetTargetVersion_Call) RunAndReturn(run func() int64) *MockShardDelegator_GetTargetVersion_Call
- type MockShardDelegator_LoadGrowing_Call
- func (_c *MockShardDelegator_LoadGrowing_Call) Return(_a0 error) *MockShardDelegator_LoadGrowing_Call
- func (_c *MockShardDelegator_LoadGrowing_Call) Run(run func(ctx context.Context, infos []*querypb.SegmentLoadInfo, version int64)) *MockShardDelegator_LoadGrowing_Call
- func (_c *MockShardDelegator_LoadGrowing_Call) RunAndReturn(run func(context.Context, []*querypb.SegmentLoadInfo, int64) error) *MockShardDelegator_LoadGrowing_Call
- type MockShardDelegator_LoadSegments_Call
- func (_c *MockShardDelegator_LoadSegments_Call) Return(_a0 error) *MockShardDelegator_LoadSegments_Call
- func (_c *MockShardDelegator_LoadSegments_Call) Run(run func(ctx context.Context, req *querypb.LoadSegmentsRequest)) *MockShardDelegator_LoadSegments_Call
- func (_c *MockShardDelegator_LoadSegments_Call) RunAndReturn(run func(context.Context, *querypb.LoadSegmentsRequest) error) *MockShardDelegator_LoadSegments_Call
- type MockShardDelegator_ProcessDelete_Call
- func (_c *MockShardDelegator_ProcessDelete_Call) Return() *MockShardDelegator_ProcessDelete_Call
- func (_c *MockShardDelegator_ProcessDelete_Call) Run(run func(deleteData []*DeleteData, ts uint64)) *MockShardDelegator_ProcessDelete_Call
- func (_c *MockShardDelegator_ProcessDelete_Call) RunAndReturn(run func([]*DeleteData, uint64)) *MockShardDelegator_ProcessDelete_Call
- type MockShardDelegator_ProcessInsert_Call
- func (_c *MockShardDelegator_ProcessInsert_Call) Return() *MockShardDelegator_ProcessInsert_Call
- func (_c *MockShardDelegator_ProcessInsert_Call) Run(run func(insertRecords map[int64]*InsertData)) *MockShardDelegator_ProcessInsert_Call
- func (_c *MockShardDelegator_ProcessInsert_Call) RunAndReturn(run func(map[int64]*InsertData)) *MockShardDelegator_ProcessInsert_Call
- type MockShardDelegator_QueryStream_Call
- func (_c *MockShardDelegator_QueryStream_Call) Return(_a0 error) *MockShardDelegator_QueryStream_Call
- func (_c *MockShardDelegator_QueryStream_Call) Run(run func(ctx context.Context, req *querypb.QueryRequest, ...)) *MockShardDelegator_QueryStream_Call
- func (_c *MockShardDelegator_QueryStream_Call) RunAndReturn(...) *MockShardDelegator_QueryStream_Call
- type MockShardDelegator_Query_Call
- func (_c *MockShardDelegator_Query_Call) Return(_a0 []*internalpb.RetrieveResults, _a1 error) *MockShardDelegator_Query_Call
- func (_c *MockShardDelegator_Query_Call) Run(run func(ctx context.Context, req *querypb.QueryRequest)) *MockShardDelegator_Query_Call
- func (_c *MockShardDelegator_Query_Call) RunAndReturn(...) *MockShardDelegator_Query_Call
- type MockShardDelegator_ReleaseSegments_Call
- func (_c *MockShardDelegator_ReleaseSegments_Call) Return(_a0 error) *MockShardDelegator_ReleaseSegments_Call
- func (_c *MockShardDelegator_ReleaseSegments_Call) Run(run func(ctx context.Context, req *querypb.ReleaseSegmentsRequest, force bool)) *MockShardDelegator_ReleaseSegments_Call
- func (_c *MockShardDelegator_ReleaseSegments_Call) RunAndReturn(run func(context.Context, *querypb.ReleaseSegmentsRequest, bool) error) *MockShardDelegator_ReleaseSegments_Call
- type MockShardDelegator_Search_Call
- func (_c *MockShardDelegator_Search_Call) Return(_a0 []*internalpb.SearchResults, _a1 error) *MockShardDelegator_Search_Call
- func (_c *MockShardDelegator_Search_Call) Run(run func(ctx context.Context, req *querypb.SearchRequest)) *MockShardDelegator_Search_Call
- func (_c *MockShardDelegator_Search_Call) RunAndReturn(...) *MockShardDelegator_Search_Call
- type MockShardDelegator_Serviceable_Call
- func (_c *MockShardDelegator_Serviceable_Call) Return(_a0 bool) *MockShardDelegator_Serviceable_Call
- func (_c *MockShardDelegator_Serviceable_Call) Run(run func()) *MockShardDelegator_Serviceable_Call
- func (_c *MockShardDelegator_Serviceable_Call) RunAndReturn(run func() bool) *MockShardDelegator_Serviceable_Call
- type MockShardDelegator_Start_Call
- type MockShardDelegator_SyncDistribution_Call
- func (_c *MockShardDelegator_SyncDistribution_Call) Return() *MockShardDelegator_SyncDistribution_Call
- func (_c *MockShardDelegator_SyncDistribution_Call) Run(run func(ctx context.Context, entries ...SegmentEntry)) *MockShardDelegator_SyncDistribution_Call
- func (_c *MockShardDelegator_SyncDistribution_Call) RunAndReturn(run func(context.Context, ...SegmentEntry)) *MockShardDelegator_SyncDistribution_Call
- type MockShardDelegator_SyncPartitionStats_Call
- func (_c *MockShardDelegator_SyncPartitionStats_Call) Return() *MockShardDelegator_SyncPartitionStats_Call
- func (_c *MockShardDelegator_SyncPartitionStats_Call) Run(run func(ctx context.Context, partVersions map[int64]int64)) *MockShardDelegator_SyncPartitionStats_Call
- func (_c *MockShardDelegator_SyncPartitionStats_Call) RunAndReturn(run func(context.Context, map[int64]int64)) *MockShardDelegator_SyncPartitionStats_Call
- type MockShardDelegator_SyncTargetVersion_Call
- func (_c *MockShardDelegator_SyncTargetVersion_Call) Return() *MockShardDelegator_SyncTargetVersion_Call
- func (_c *MockShardDelegator_SyncTargetVersion_Call) Run(...) *MockShardDelegator_SyncTargetVersion_Call
- func (_c *MockShardDelegator_SyncTargetVersion_Call) RunAndReturn(run func(int64, []int64, []int64, []int64, *msgpb.MsgPosition)) *MockShardDelegator_SyncTargetVersion_Call
- type MockShardDelegator_TryCleanExcludedSegments_Call
- func (_c *MockShardDelegator_TryCleanExcludedSegments_Call) Return() *MockShardDelegator_TryCleanExcludedSegments_Call
- func (_c *MockShardDelegator_TryCleanExcludedSegments_Call) Run(run func(ts uint64)) *MockShardDelegator_TryCleanExcludedSegments_Call
- func (_c *MockShardDelegator_TryCleanExcludedSegments_Call) RunAndReturn(run func(uint64)) *MockShardDelegator_TryCleanExcludedSegments_Call
- type MockShardDelegator_VerifyExcludedSegments_Call
- func (_c *MockShardDelegator_VerifyExcludedSegments_Call) Return(_a0 bool) *MockShardDelegator_VerifyExcludedSegments_Call
- func (_c *MockShardDelegator_VerifyExcludedSegments_Call) Run(run func(segmentID int64, ts uint64)) *MockShardDelegator_VerifyExcludedSegments_Call
- func (_c *MockShardDelegator_VerifyExcludedSegments_Call) RunAndReturn(run func(int64, uint64) bool) *MockShardDelegator_VerifyExcludedSegments_Call
- type MockShardDelegator_Version_Call
- type ParseContext
- type PhysicalExpr
- type PruneInfo
- type SegmentEntry
- type ShardDelegator
- type SnapshotItem
- type TSafeUpdater
- type TermExpr
- type TimeRange
- type Timestamp
- type UnaryRangeExpr
- type UniqueID
Constants ¶
This section is empty.
Variables ¶
var ErrTsLagTooLarge = errors.New("Timestamp lag too large")
ErrTsLagTooLarge serviceable and guarantee lag too large.
Functions ¶
func FilterSegmentsByVector ¶
func FilterSegmentsByVector(partitionStats *storage.PartitionStatsSnapshot, searchReq *internalpb.SearchRequest, vectorBytes [][]byte, dim int64, keyField *schemapb.FieldSchema, filteredSegments map[UniqueID]struct{}, filterRatio float64, )
func FilterSegmentsOnScalarField ¶
func FilterSegmentsOnScalarField(partitionStats *storage.PartitionStatsSnapshot, targetRanges []*exprutil.PlanRange, keyField *schemapb.FieldSchema, filteredSegments map[UniqueID]struct{}, )
func NewDistribution ¶
func NewDistribution() *distribution
NewDistribution creates a new distribution instance with all field initialized.
func NewSnapshot ¶
func NewSnapshot(sealed []SnapshotItem, growing []SegmentEntry, last *snapshot, version int64, targetVersion int64) *snapshot
NewSnapshot returns a prepared snapshot with channel initialized.
func PruneByScalarField ¶
func PruneByScalarField(expr Expr, segmentStats []storage.SegmentStats, segmentIDs []UniqueID, filteredSegments map[UniqueID]struct{})
func PruneSegments ¶
func PruneSegments(ctx context.Context, partitionStats map[UniqueID]*storage.PartitionStatsSnapshot, searchReq *internalpb.SearchRequest, queryReq *internalpb.RetrieveRequest, schema *schemapb.CollectionSchema, sealedSegments []SnapshotItem, info PruneInfo, )
Types ¶
type BatchApplyRet ¶
type BinaryRangeExpr ¶
type BinaryRangeExpr struct { PhysicalExpr // contains filtered or unexported fields }
func NewBinaryRangeExpr ¶
func NewBinaryRangeExpr(lower storage.ScalarFieldValue, upper storage.ScalarFieldValue, inLower bool, inUpper bool, ) *BinaryRangeExpr
type ConsumeSubName ¶
type ConsumeSubName = string
ConsumeSubName is consumer's subscription name of the message stream
type DeleteData ¶
type DeleteData struct { PartitionID int64 PrimaryKeys []storage.PrimaryKey Timestamps []uint64 RowCount int64 }
func (*DeleteData) Append ¶
func (d *DeleteData) Append(ad DeleteData)
Append appends another delete data into this one.
type ExcludedSegments ¶
type ExcludedSegments struct {
// contains filtered or unexported fields
}
func NewExcludedSegments ¶
func NewExcludedSegments(cleanInterval time.Duration) *ExcludedSegments
func (*ExcludedSegments) CleanInvalid ¶
func (s *ExcludedSegments) CleanInvalid(ts uint64)
func (*ExcludedSegments) Insert ¶
func (s *ExcludedSegments) Insert(excludeInfo map[int64]uint64)
func (*ExcludedSegments) ShouldClean ¶
func (s *ExcludedSegments) ShouldClean() bool
type Expr ¶
func ParseBinaryRangeExpr ¶
func ParseBinaryRangeExpr(exprPb *planpb.BinaryRangeExpr, parseCtx *ParseContext) (Expr, error)
func ParseLogicalBinaryExpr ¶
func ParseLogicalBinaryExpr(exprPb *planpb.BinaryExpr, parseCtx *ParseContext) (Expr, error)
func ParseLogicalUnaryExpr ¶
func ParseLogicalUnaryExpr(exprPb *planpb.UnaryExpr, parseCtx *ParseContext) (Expr, error)
func ParseTermExpr ¶
func ParseTermExpr(exprPb *planpb.TermExpr, parseCtx *ParseContext) (Expr, error)
func ParseUnaryRangeExpr ¶
func ParseUnaryRangeExpr(exprPb *planpb.UnaryRangeExpr, parseCtx *ParseContext) (Expr, error)
type InsertData ¶
type InsertData struct { RowIDs []int64 PrimaryKeys []storage.PrimaryKey Timestamps []uint64 InsertRecord *segcorepb.InsertRecord StartPosition *msgpb.MsgPosition PartitionID int64 }
InsertData
type IntPrimaryKey ¶
type IntPrimaryKey = typeutil.IntPrimaryKey
IntPrimaryKey is the primary key of int type
type LogicalBinaryExpr ¶
type LogicalBinaryExpr struct {
// contains filtered or unexported fields
}
func NewLogicalBinaryExpr ¶
func NewLogicalBinaryExpr(l Expr, r Expr, op planpb.BinaryExpr_BinaryOp) *LogicalBinaryExpr
func (*LogicalBinaryExpr) Eval ¶
func (lbe *LogicalBinaryExpr) Eval(evalCtx *EvalCtx) *bitset.BitSet
func (*LogicalBinaryExpr) Inputs ¶
func (lbe *LogicalBinaryExpr) Inputs() []Expr
type MockShardDelegator ¶
MockShardDelegator is an autogenerated mock type for the ShardDelegator type
func NewMockShardDelegator ¶
func NewMockShardDelegator(t interface { mock.TestingT Cleanup(func()) }) *MockShardDelegator
NewMockShardDelegator creates a new instance of MockShardDelegator. 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 (*MockShardDelegator) AddExcludedSegments ¶
func (_m *MockShardDelegator) AddExcludedSegments(excludeInfo map[int64]uint64)
AddExcludedSegments provides a mock function with given fields: excludeInfo
func (*MockShardDelegator) Close ¶
func (_m *MockShardDelegator) Close()
Close provides a mock function with given fields:
func (*MockShardDelegator) Collection ¶
func (_m *MockShardDelegator) Collection() int64
Collection provides a mock function with given fields:
func (*MockShardDelegator) EXPECT ¶
func (_m *MockShardDelegator) EXPECT() *MockShardDelegator_Expecter
func (*MockShardDelegator) GetPartitionStatsVersions ¶
func (_m *MockShardDelegator) GetPartitionStatsVersions(ctx context.Context) map[int64]int64
GetPartitionStatsVersions provides a mock function with given fields: ctx
func (*MockShardDelegator) GetSegmentInfo ¶
func (_m *MockShardDelegator) GetSegmentInfo(readable bool) ([]SnapshotItem, []SegmentEntry)
GetSegmentInfo provides a mock function with given fields: readable
func (*MockShardDelegator) GetStatistics ¶
func (_m *MockShardDelegator) GetStatistics(ctx context.Context, req *querypb.GetStatisticsRequest) ([]*internalpb.GetStatisticsResponse, error)
GetStatistics provides a mock function with given fields: ctx, req
func (*MockShardDelegator) GetTargetVersion ¶
func (_m *MockShardDelegator) GetTargetVersion() int64
GetTargetVersion provides a mock function with given fields:
func (*MockShardDelegator) LoadGrowing ¶
func (_m *MockShardDelegator) LoadGrowing(ctx context.Context, infos []*querypb.SegmentLoadInfo, version int64) error
LoadGrowing provides a mock function with given fields: ctx, infos, version
func (*MockShardDelegator) LoadSegments ¶
func (_m *MockShardDelegator) LoadSegments(ctx context.Context, req *querypb.LoadSegmentsRequest) error
LoadSegments provides a mock function with given fields: ctx, req
func (*MockShardDelegator) ProcessDelete ¶
func (_m *MockShardDelegator) ProcessDelete(deleteData []*DeleteData, ts uint64)
ProcessDelete provides a mock function with given fields: deleteData, ts
func (*MockShardDelegator) ProcessInsert ¶
func (_m *MockShardDelegator) ProcessInsert(insertRecords map[int64]*InsertData)
ProcessInsert provides a mock function with given fields: insertRecords
func (*MockShardDelegator) Query ¶
func (_m *MockShardDelegator) Query(ctx context.Context, req *querypb.QueryRequest) ([]*internalpb.RetrieveResults, error)
Query provides a mock function with given fields: ctx, req
func (*MockShardDelegator) QueryStream ¶
func (_m *MockShardDelegator) QueryStream(ctx context.Context, req *querypb.QueryRequest, srv streamrpc.QueryStreamServer) error
QueryStream provides a mock function with given fields: ctx, req, srv
func (*MockShardDelegator) ReleaseSegments ¶
func (_m *MockShardDelegator) ReleaseSegments(ctx context.Context, req *querypb.ReleaseSegmentsRequest, force bool) error
ReleaseSegments provides a mock function with given fields: ctx, req, force
func (*MockShardDelegator) Search ¶
func (_m *MockShardDelegator) Search(ctx context.Context, req *querypb.SearchRequest) ([]*internalpb.SearchResults, error)
Search provides a mock function with given fields: ctx, req
func (*MockShardDelegator) Serviceable ¶
func (_m *MockShardDelegator) Serviceable() bool
Serviceable provides a mock function with given fields:
func (*MockShardDelegator) Start ¶
func (_m *MockShardDelegator) Start()
Start provides a mock function with given fields:
func (*MockShardDelegator) SyncDistribution ¶
func (_m *MockShardDelegator) SyncDistribution(ctx context.Context, entries ...SegmentEntry)
SyncDistribution provides a mock function with given fields: ctx, entries
func (*MockShardDelegator) SyncPartitionStats ¶
func (_m *MockShardDelegator) SyncPartitionStats(ctx context.Context, partVersions map[int64]int64)
SyncPartitionStats provides a mock function with given fields: ctx, partVersions
func (*MockShardDelegator) SyncTargetVersion ¶
func (_m *MockShardDelegator) SyncTargetVersion(newVersion int64, growingInTarget []int64, sealedInTarget []int64, droppedInTarget []int64, checkpoint *msgpb.MsgPosition)
SyncTargetVersion provides a mock function with given fields: newVersion, growingInTarget, sealedInTarget, droppedInTarget, checkpoint
func (*MockShardDelegator) TryCleanExcludedSegments ¶
func (_m *MockShardDelegator) TryCleanExcludedSegments(ts uint64)
TryCleanExcludedSegments provides a mock function with given fields: ts
func (*MockShardDelegator) VerifyExcludedSegments ¶
func (_m *MockShardDelegator) VerifyExcludedSegments(segmentID int64, ts uint64) bool
VerifyExcludedSegments provides a mock function with given fields: segmentID, ts
func (*MockShardDelegator) Version ¶
func (_m *MockShardDelegator) Version() int64
Version provides a mock function with given fields:
type MockShardDelegator_AddExcludedSegments_Call ¶
MockShardDelegator_AddExcludedSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddExcludedSegments'
func (*MockShardDelegator_AddExcludedSegments_Call) Return ¶
func (_c *MockShardDelegator_AddExcludedSegments_Call) Return() *MockShardDelegator_AddExcludedSegments_Call
func (*MockShardDelegator_AddExcludedSegments_Call) Run ¶
func (_c *MockShardDelegator_AddExcludedSegments_Call) Run(run func(excludeInfo map[int64]uint64)) *MockShardDelegator_AddExcludedSegments_Call
func (*MockShardDelegator_AddExcludedSegments_Call) RunAndReturn ¶
func (_c *MockShardDelegator_AddExcludedSegments_Call) RunAndReturn(run func(map[int64]uint64)) *MockShardDelegator_AddExcludedSegments_Call
type MockShardDelegator_Close_Call ¶
MockShardDelegator_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
func (*MockShardDelegator_Close_Call) Return ¶
func (_c *MockShardDelegator_Close_Call) Return() *MockShardDelegator_Close_Call
func (*MockShardDelegator_Close_Call) Run ¶
func (_c *MockShardDelegator_Close_Call) Run(run func()) *MockShardDelegator_Close_Call
func (*MockShardDelegator_Close_Call) RunAndReturn ¶
func (_c *MockShardDelegator_Close_Call) RunAndReturn(run func()) *MockShardDelegator_Close_Call
type MockShardDelegator_Collection_Call ¶
MockShardDelegator_Collection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Collection'
func (*MockShardDelegator_Collection_Call) Return ¶
func (_c *MockShardDelegator_Collection_Call) Return(_a0 int64) *MockShardDelegator_Collection_Call
func (*MockShardDelegator_Collection_Call) Run ¶
func (_c *MockShardDelegator_Collection_Call) Run(run func()) *MockShardDelegator_Collection_Call
func (*MockShardDelegator_Collection_Call) RunAndReturn ¶
func (_c *MockShardDelegator_Collection_Call) RunAndReturn(run func() int64) *MockShardDelegator_Collection_Call
type MockShardDelegator_Expecter ¶
type MockShardDelegator_Expecter struct {
// contains filtered or unexported fields
}
func (*MockShardDelegator_Expecter) AddExcludedSegments ¶
func (_e *MockShardDelegator_Expecter) AddExcludedSegments(excludeInfo interface{}) *MockShardDelegator_AddExcludedSegments_Call
AddExcludedSegments is a helper method to define mock.On call
- excludeInfo map[int64]uint64
func (*MockShardDelegator_Expecter) Close ¶
func (_e *MockShardDelegator_Expecter) Close() *MockShardDelegator_Close_Call
Close is a helper method to define mock.On call
func (*MockShardDelegator_Expecter) Collection ¶
func (_e *MockShardDelegator_Expecter) Collection() *MockShardDelegator_Collection_Call
Collection is a helper method to define mock.On call
func (*MockShardDelegator_Expecter) GetPartitionStatsVersions ¶
func (_e *MockShardDelegator_Expecter) GetPartitionStatsVersions(ctx interface{}) *MockShardDelegator_GetPartitionStatsVersions_Call
GetPartitionStatsVersions is a helper method to define mock.On call
- ctx context.Context
func (*MockShardDelegator_Expecter) GetSegmentInfo ¶
func (_e *MockShardDelegator_Expecter) GetSegmentInfo(readable interface{}) *MockShardDelegator_GetSegmentInfo_Call
GetSegmentInfo is a helper method to define mock.On call
- readable bool
func (*MockShardDelegator_Expecter) GetStatistics ¶
func (_e *MockShardDelegator_Expecter) GetStatistics(ctx interface{}, req interface{}) *MockShardDelegator_GetStatistics_Call
GetStatistics is a helper method to define mock.On call
- ctx context.Context
- req *querypb.GetStatisticsRequest
func (*MockShardDelegator_Expecter) GetTargetVersion ¶
func (_e *MockShardDelegator_Expecter) GetTargetVersion() *MockShardDelegator_GetTargetVersion_Call
GetTargetVersion is a helper method to define mock.On call
func (*MockShardDelegator_Expecter) LoadGrowing ¶
func (_e *MockShardDelegator_Expecter) LoadGrowing(ctx interface{}, infos interface{}, version interface{}) *MockShardDelegator_LoadGrowing_Call
LoadGrowing is a helper method to define mock.On call
- ctx context.Context
- infos []*querypb.SegmentLoadInfo
- version int64
func (*MockShardDelegator_Expecter) LoadSegments ¶
func (_e *MockShardDelegator_Expecter) LoadSegments(ctx interface{}, req interface{}) *MockShardDelegator_LoadSegments_Call
LoadSegments is a helper method to define mock.On call
- ctx context.Context
- req *querypb.LoadSegmentsRequest
func (*MockShardDelegator_Expecter) ProcessDelete ¶
func (_e *MockShardDelegator_Expecter) ProcessDelete(deleteData interface{}, ts interface{}) *MockShardDelegator_ProcessDelete_Call
ProcessDelete is a helper method to define mock.On call
- deleteData []*DeleteData
- ts uint64
func (*MockShardDelegator_Expecter) ProcessInsert ¶
func (_e *MockShardDelegator_Expecter) ProcessInsert(insertRecords interface{}) *MockShardDelegator_ProcessInsert_Call
ProcessInsert is a helper method to define mock.On call
- insertRecords map[int64]*InsertData
func (*MockShardDelegator_Expecter) Query ¶
func (_e *MockShardDelegator_Expecter) Query(ctx interface{}, req interface{}) *MockShardDelegator_Query_Call
Query is a helper method to define mock.On call
- ctx context.Context
- req *querypb.QueryRequest
func (*MockShardDelegator_Expecter) QueryStream ¶
func (_e *MockShardDelegator_Expecter) QueryStream(ctx interface{}, req interface{}, srv interface{}) *MockShardDelegator_QueryStream_Call
QueryStream is a helper method to define mock.On call
- ctx context.Context
- req *querypb.QueryRequest
- srv streamrpc.QueryStreamServer
func (*MockShardDelegator_Expecter) ReleaseSegments ¶
func (_e *MockShardDelegator_Expecter) ReleaseSegments(ctx interface{}, req interface{}, force interface{}) *MockShardDelegator_ReleaseSegments_Call
ReleaseSegments is a helper method to define mock.On call
- ctx context.Context
- req *querypb.ReleaseSegmentsRequest
- force bool
func (*MockShardDelegator_Expecter) Search ¶
func (_e *MockShardDelegator_Expecter) Search(ctx interface{}, req interface{}) *MockShardDelegator_Search_Call
Search is a helper method to define mock.On call
- ctx context.Context
- req *querypb.SearchRequest
func (*MockShardDelegator_Expecter) Serviceable ¶
func (_e *MockShardDelegator_Expecter) Serviceable() *MockShardDelegator_Serviceable_Call
Serviceable is a helper method to define mock.On call
func (*MockShardDelegator_Expecter) Start ¶
func (_e *MockShardDelegator_Expecter) Start() *MockShardDelegator_Start_Call
Start is a helper method to define mock.On call
func (*MockShardDelegator_Expecter) SyncDistribution ¶
func (_e *MockShardDelegator_Expecter) SyncDistribution(ctx interface{}, entries ...interface{}) *MockShardDelegator_SyncDistribution_Call
SyncDistribution is a helper method to define mock.On call
- ctx context.Context
- entries ...SegmentEntry
func (*MockShardDelegator_Expecter) SyncPartitionStats ¶
func (_e *MockShardDelegator_Expecter) SyncPartitionStats(ctx interface{}, partVersions interface{}) *MockShardDelegator_SyncPartitionStats_Call
SyncPartitionStats is a helper method to define mock.On call
- ctx context.Context
- partVersions map[int64]int64
func (*MockShardDelegator_Expecter) SyncTargetVersion ¶
func (_e *MockShardDelegator_Expecter) SyncTargetVersion(newVersion interface{}, growingInTarget interface{}, sealedInTarget interface{}, droppedInTarget interface{}, checkpoint interface{}) *MockShardDelegator_SyncTargetVersion_Call
SyncTargetVersion is a helper method to define mock.On call
- newVersion int64
- growingInTarget []int64
- sealedInTarget []int64
- droppedInTarget []int64
- checkpoint *msgpb.MsgPosition
func (*MockShardDelegator_Expecter) TryCleanExcludedSegments ¶
func (_e *MockShardDelegator_Expecter) TryCleanExcludedSegments(ts interface{}) *MockShardDelegator_TryCleanExcludedSegments_Call
TryCleanExcludedSegments is a helper method to define mock.On call
- ts uint64
func (*MockShardDelegator_Expecter) VerifyExcludedSegments ¶
func (_e *MockShardDelegator_Expecter) VerifyExcludedSegments(segmentID interface{}, ts interface{}) *MockShardDelegator_VerifyExcludedSegments_Call
VerifyExcludedSegments is a helper method to define mock.On call
- segmentID int64
- ts uint64
func (*MockShardDelegator_Expecter) Version ¶
func (_e *MockShardDelegator_Expecter) Version() *MockShardDelegator_Version_Call
Version is a helper method to define mock.On call
type MockShardDelegator_GetPartitionStatsVersions_Call ¶
MockShardDelegator_GetPartitionStatsVersions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPartitionStatsVersions'
func (*MockShardDelegator_GetPartitionStatsVersions_Call) Return ¶
func (_c *MockShardDelegator_GetPartitionStatsVersions_Call) Return(_a0 map[int64]int64) *MockShardDelegator_GetPartitionStatsVersions_Call
func (*MockShardDelegator_GetPartitionStatsVersions_Call) Run ¶
func (_c *MockShardDelegator_GetPartitionStatsVersions_Call) Run(run func(ctx context.Context)) *MockShardDelegator_GetPartitionStatsVersions_Call
func (*MockShardDelegator_GetPartitionStatsVersions_Call) RunAndReturn ¶
func (_c *MockShardDelegator_GetPartitionStatsVersions_Call) RunAndReturn(run func(context.Context) map[int64]int64) *MockShardDelegator_GetPartitionStatsVersions_Call
type MockShardDelegator_GetSegmentInfo_Call ¶
MockShardDelegator_GetSegmentInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSegmentInfo'
func (*MockShardDelegator_GetSegmentInfo_Call) Return ¶
func (_c *MockShardDelegator_GetSegmentInfo_Call) Return(sealed []SnapshotItem, growing []SegmentEntry) *MockShardDelegator_GetSegmentInfo_Call
func (*MockShardDelegator_GetSegmentInfo_Call) Run ¶
func (_c *MockShardDelegator_GetSegmentInfo_Call) Run(run func(readable bool)) *MockShardDelegator_GetSegmentInfo_Call
func (*MockShardDelegator_GetSegmentInfo_Call) RunAndReturn ¶
func (_c *MockShardDelegator_GetSegmentInfo_Call) RunAndReturn(run func(bool) ([]SnapshotItem, []SegmentEntry)) *MockShardDelegator_GetSegmentInfo_Call
type MockShardDelegator_GetStatistics_Call ¶
MockShardDelegator_GetStatistics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatistics'
func (*MockShardDelegator_GetStatistics_Call) Return ¶
func (_c *MockShardDelegator_GetStatistics_Call) Return(_a0 []*internalpb.GetStatisticsResponse, _a1 error) *MockShardDelegator_GetStatistics_Call
func (*MockShardDelegator_GetStatistics_Call) Run ¶
func (_c *MockShardDelegator_GetStatistics_Call) Run(run func(ctx context.Context, req *querypb.GetStatisticsRequest)) *MockShardDelegator_GetStatistics_Call
func (*MockShardDelegator_GetStatistics_Call) RunAndReturn ¶
func (_c *MockShardDelegator_GetStatistics_Call) RunAndReturn(run func(context.Context, *querypb.GetStatisticsRequest) ([]*internalpb.GetStatisticsResponse, error)) *MockShardDelegator_GetStatistics_Call
type MockShardDelegator_GetTargetVersion_Call ¶
MockShardDelegator_GetTargetVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTargetVersion'
func (*MockShardDelegator_GetTargetVersion_Call) Return ¶
func (_c *MockShardDelegator_GetTargetVersion_Call) Return(_a0 int64) *MockShardDelegator_GetTargetVersion_Call
func (*MockShardDelegator_GetTargetVersion_Call) Run ¶
func (_c *MockShardDelegator_GetTargetVersion_Call) Run(run func()) *MockShardDelegator_GetTargetVersion_Call
func (*MockShardDelegator_GetTargetVersion_Call) RunAndReturn ¶
func (_c *MockShardDelegator_GetTargetVersion_Call) RunAndReturn(run func() int64) *MockShardDelegator_GetTargetVersion_Call
type MockShardDelegator_LoadGrowing_Call ¶
MockShardDelegator_LoadGrowing_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadGrowing'
func (*MockShardDelegator_LoadGrowing_Call) Return ¶
func (_c *MockShardDelegator_LoadGrowing_Call) Return(_a0 error) *MockShardDelegator_LoadGrowing_Call
func (*MockShardDelegator_LoadGrowing_Call) Run ¶
func (_c *MockShardDelegator_LoadGrowing_Call) Run(run func(ctx context.Context, infos []*querypb.SegmentLoadInfo, version int64)) *MockShardDelegator_LoadGrowing_Call
func (*MockShardDelegator_LoadGrowing_Call) RunAndReturn ¶
func (_c *MockShardDelegator_LoadGrowing_Call) RunAndReturn(run func(context.Context, []*querypb.SegmentLoadInfo, int64) error) *MockShardDelegator_LoadGrowing_Call
type MockShardDelegator_LoadSegments_Call ¶
MockShardDelegator_LoadSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadSegments'
func (*MockShardDelegator_LoadSegments_Call) Return ¶
func (_c *MockShardDelegator_LoadSegments_Call) Return(_a0 error) *MockShardDelegator_LoadSegments_Call
func (*MockShardDelegator_LoadSegments_Call) Run ¶
func (_c *MockShardDelegator_LoadSegments_Call) Run(run func(ctx context.Context, req *querypb.LoadSegmentsRequest)) *MockShardDelegator_LoadSegments_Call
func (*MockShardDelegator_LoadSegments_Call) RunAndReturn ¶
func (_c *MockShardDelegator_LoadSegments_Call) RunAndReturn(run func(context.Context, *querypb.LoadSegmentsRequest) error) *MockShardDelegator_LoadSegments_Call
type MockShardDelegator_ProcessDelete_Call ¶
MockShardDelegator_ProcessDelete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessDelete'
func (*MockShardDelegator_ProcessDelete_Call) Return ¶
func (_c *MockShardDelegator_ProcessDelete_Call) Return() *MockShardDelegator_ProcessDelete_Call
func (*MockShardDelegator_ProcessDelete_Call) Run ¶
func (_c *MockShardDelegator_ProcessDelete_Call) Run(run func(deleteData []*DeleteData, ts uint64)) *MockShardDelegator_ProcessDelete_Call
func (*MockShardDelegator_ProcessDelete_Call) RunAndReturn ¶
func (_c *MockShardDelegator_ProcessDelete_Call) RunAndReturn(run func([]*DeleteData, uint64)) *MockShardDelegator_ProcessDelete_Call
type MockShardDelegator_ProcessInsert_Call ¶
MockShardDelegator_ProcessInsert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessInsert'
func (*MockShardDelegator_ProcessInsert_Call) Return ¶
func (_c *MockShardDelegator_ProcessInsert_Call) Return() *MockShardDelegator_ProcessInsert_Call
func (*MockShardDelegator_ProcessInsert_Call) Run ¶
func (_c *MockShardDelegator_ProcessInsert_Call) Run(run func(insertRecords map[int64]*InsertData)) *MockShardDelegator_ProcessInsert_Call
func (*MockShardDelegator_ProcessInsert_Call) RunAndReturn ¶
func (_c *MockShardDelegator_ProcessInsert_Call) RunAndReturn(run func(map[int64]*InsertData)) *MockShardDelegator_ProcessInsert_Call
type MockShardDelegator_QueryStream_Call ¶
MockShardDelegator_QueryStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryStream'
func (*MockShardDelegator_QueryStream_Call) Return ¶
func (_c *MockShardDelegator_QueryStream_Call) Return(_a0 error) *MockShardDelegator_QueryStream_Call
func (*MockShardDelegator_QueryStream_Call) Run ¶
func (_c *MockShardDelegator_QueryStream_Call) Run(run func(ctx context.Context, req *querypb.QueryRequest, srv streamrpc.QueryStreamServer)) *MockShardDelegator_QueryStream_Call
func (*MockShardDelegator_QueryStream_Call) RunAndReturn ¶
func (_c *MockShardDelegator_QueryStream_Call) RunAndReturn(run func(context.Context, *querypb.QueryRequest, streamrpc.QueryStreamServer) error) *MockShardDelegator_QueryStream_Call
type MockShardDelegator_Query_Call ¶
MockShardDelegator_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query'
func (*MockShardDelegator_Query_Call) Return ¶
func (_c *MockShardDelegator_Query_Call) Return(_a0 []*internalpb.RetrieveResults, _a1 error) *MockShardDelegator_Query_Call
func (*MockShardDelegator_Query_Call) Run ¶
func (_c *MockShardDelegator_Query_Call) Run(run func(ctx context.Context, req *querypb.QueryRequest)) *MockShardDelegator_Query_Call
func (*MockShardDelegator_Query_Call) RunAndReturn ¶
func (_c *MockShardDelegator_Query_Call) RunAndReturn(run func(context.Context, *querypb.QueryRequest) ([]*internalpb.RetrieveResults, error)) *MockShardDelegator_Query_Call
type MockShardDelegator_ReleaseSegments_Call ¶
MockShardDelegator_ReleaseSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReleaseSegments'
func (*MockShardDelegator_ReleaseSegments_Call) Return ¶
func (_c *MockShardDelegator_ReleaseSegments_Call) Return(_a0 error) *MockShardDelegator_ReleaseSegments_Call
func (*MockShardDelegator_ReleaseSegments_Call) Run ¶
func (_c *MockShardDelegator_ReleaseSegments_Call) Run(run func(ctx context.Context, req *querypb.ReleaseSegmentsRequest, force bool)) *MockShardDelegator_ReleaseSegments_Call
func (*MockShardDelegator_ReleaseSegments_Call) RunAndReturn ¶
func (_c *MockShardDelegator_ReleaseSegments_Call) RunAndReturn(run func(context.Context, *querypb.ReleaseSegmentsRequest, bool) error) *MockShardDelegator_ReleaseSegments_Call
type MockShardDelegator_Search_Call ¶
MockShardDelegator_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search'
func (*MockShardDelegator_Search_Call) Return ¶
func (_c *MockShardDelegator_Search_Call) Return(_a0 []*internalpb.SearchResults, _a1 error) *MockShardDelegator_Search_Call
func (*MockShardDelegator_Search_Call) Run ¶
func (_c *MockShardDelegator_Search_Call) Run(run func(ctx context.Context, req *querypb.SearchRequest)) *MockShardDelegator_Search_Call
func (*MockShardDelegator_Search_Call) RunAndReturn ¶
func (_c *MockShardDelegator_Search_Call) RunAndReturn(run func(context.Context, *querypb.SearchRequest) ([]*internalpb.SearchResults, error)) *MockShardDelegator_Search_Call
type MockShardDelegator_Serviceable_Call ¶
MockShardDelegator_Serviceable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Serviceable'
func (*MockShardDelegator_Serviceable_Call) Return ¶
func (_c *MockShardDelegator_Serviceable_Call) Return(_a0 bool) *MockShardDelegator_Serviceable_Call
func (*MockShardDelegator_Serviceable_Call) Run ¶
func (_c *MockShardDelegator_Serviceable_Call) Run(run func()) *MockShardDelegator_Serviceable_Call
func (*MockShardDelegator_Serviceable_Call) RunAndReturn ¶
func (_c *MockShardDelegator_Serviceable_Call) RunAndReturn(run func() bool) *MockShardDelegator_Serviceable_Call
type MockShardDelegator_Start_Call ¶
MockShardDelegator_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'
func (*MockShardDelegator_Start_Call) Return ¶
func (_c *MockShardDelegator_Start_Call) Return() *MockShardDelegator_Start_Call
func (*MockShardDelegator_Start_Call) Run ¶
func (_c *MockShardDelegator_Start_Call) Run(run func()) *MockShardDelegator_Start_Call
func (*MockShardDelegator_Start_Call) RunAndReturn ¶
func (_c *MockShardDelegator_Start_Call) RunAndReturn(run func()) *MockShardDelegator_Start_Call
type MockShardDelegator_SyncDistribution_Call ¶
MockShardDelegator_SyncDistribution_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncDistribution'
func (*MockShardDelegator_SyncDistribution_Call) Return ¶
func (_c *MockShardDelegator_SyncDistribution_Call) Return() *MockShardDelegator_SyncDistribution_Call
func (*MockShardDelegator_SyncDistribution_Call) Run ¶
func (_c *MockShardDelegator_SyncDistribution_Call) Run(run func(ctx context.Context, entries ...SegmentEntry)) *MockShardDelegator_SyncDistribution_Call
func (*MockShardDelegator_SyncDistribution_Call) RunAndReturn ¶
func (_c *MockShardDelegator_SyncDistribution_Call) RunAndReturn(run func(context.Context, ...SegmentEntry)) *MockShardDelegator_SyncDistribution_Call
type MockShardDelegator_SyncPartitionStats_Call ¶
MockShardDelegator_SyncPartitionStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncPartitionStats'
func (*MockShardDelegator_SyncPartitionStats_Call) Return ¶
func (_c *MockShardDelegator_SyncPartitionStats_Call) Return() *MockShardDelegator_SyncPartitionStats_Call
func (*MockShardDelegator_SyncPartitionStats_Call) Run ¶
func (_c *MockShardDelegator_SyncPartitionStats_Call) Run(run func(ctx context.Context, partVersions map[int64]int64)) *MockShardDelegator_SyncPartitionStats_Call
func (*MockShardDelegator_SyncPartitionStats_Call) RunAndReturn ¶
func (_c *MockShardDelegator_SyncPartitionStats_Call) RunAndReturn(run func(context.Context, map[int64]int64)) *MockShardDelegator_SyncPartitionStats_Call
type MockShardDelegator_SyncTargetVersion_Call ¶
MockShardDelegator_SyncTargetVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncTargetVersion'
func (*MockShardDelegator_SyncTargetVersion_Call) Return ¶
func (_c *MockShardDelegator_SyncTargetVersion_Call) Return() *MockShardDelegator_SyncTargetVersion_Call
func (*MockShardDelegator_SyncTargetVersion_Call) Run ¶
func (_c *MockShardDelegator_SyncTargetVersion_Call) Run(run func(newVersion int64, growingInTarget []int64, sealedInTarget []int64, droppedInTarget []int64, checkpoint *msgpb.MsgPosition)) *MockShardDelegator_SyncTargetVersion_Call
func (*MockShardDelegator_SyncTargetVersion_Call) RunAndReturn ¶
func (_c *MockShardDelegator_SyncTargetVersion_Call) RunAndReturn(run func(int64, []int64, []int64, []int64, *msgpb.MsgPosition)) *MockShardDelegator_SyncTargetVersion_Call
type MockShardDelegator_TryCleanExcludedSegments_Call ¶
MockShardDelegator_TryCleanExcludedSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TryCleanExcludedSegments'
func (*MockShardDelegator_TryCleanExcludedSegments_Call) Run ¶
func (_c *MockShardDelegator_TryCleanExcludedSegments_Call) Run(run func(ts uint64)) *MockShardDelegator_TryCleanExcludedSegments_Call
func (*MockShardDelegator_TryCleanExcludedSegments_Call) RunAndReturn ¶
func (_c *MockShardDelegator_TryCleanExcludedSegments_Call) RunAndReturn(run func(uint64)) *MockShardDelegator_TryCleanExcludedSegments_Call
type MockShardDelegator_VerifyExcludedSegments_Call ¶
MockShardDelegator_VerifyExcludedSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifyExcludedSegments'
func (*MockShardDelegator_VerifyExcludedSegments_Call) Return ¶
func (_c *MockShardDelegator_VerifyExcludedSegments_Call) Return(_a0 bool) *MockShardDelegator_VerifyExcludedSegments_Call
func (*MockShardDelegator_VerifyExcludedSegments_Call) Run ¶
func (_c *MockShardDelegator_VerifyExcludedSegments_Call) Run(run func(segmentID int64, ts uint64)) *MockShardDelegator_VerifyExcludedSegments_Call
func (*MockShardDelegator_VerifyExcludedSegments_Call) RunAndReturn ¶
func (_c *MockShardDelegator_VerifyExcludedSegments_Call) RunAndReturn(run func(int64, uint64) bool) *MockShardDelegator_VerifyExcludedSegments_Call
type MockShardDelegator_Version_Call ¶
MockShardDelegator_Version_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Version'
func (*MockShardDelegator_Version_Call) Return ¶
func (_c *MockShardDelegator_Version_Call) Return(_a0 int64) *MockShardDelegator_Version_Call
func (*MockShardDelegator_Version_Call) Run ¶
func (_c *MockShardDelegator_Version_Call) Run(run func()) *MockShardDelegator_Version_Call
func (*MockShardDelegator_Version_Call) RunAndReturn ¶
func (_c *MockShardDelegator_Version_Call) RunAndReturn(run func() int64) *MockShardDelegator_Version_Call
type ParseContext ¶
type ParseContext struct {
// contains filtered or unexported fields
}
func NewParseContext ¶
func NewParseContext(keyField FieldID, dType schemapb.DataType) *ParseContext
type PhysicalExpr ¶
type PhysicalExpr struct {
Expr
}
func (*PhysicalExpr) Inputs ¶
func (lbe *PhysicalExpr) Inputs() []Expr
type SegmentEntry ¶
type SegmentEntry struct { NodeID int64 SegmentID UniqueID PartitionID UniqueID Version int64 TargetVersion int64 }
SegmentEntry stores the segment meta information.
type ShardDelegator ¶
type ShardDelegator interface { Collection() int64 Version() int64 GetSegmentInfo(readable bool) (sealed []SnapshotItem, growing []SegmentEntry) SyncDistribution(ctx context.Context, entries ...SegmentEntry) SyncPartitionStats(ctx context.Context, partVersions map[int64]int64) GetPartitionStatsVersions(ctx context.Context) map[int64]int64 Search(ctx context.Context, req *querypb.SearchRequest) ([]*internalpb.SearchResults, error) Query(ctx context.Context, req *querypb.QueryRequest) ([]*internalpb.RetrieveResults, error) QueryStream(ctx context.Context, req *querypb.QueryRequest, srv streamrpc.QueryStreamServer) error GetStatistics(ctx context.Context, req *querypb.GetStatisticsRequest) ([]*internalpb.GetStatisticsResponse, error) // data ProcessInsert(insertRecords map[int64]*InsertData) ProcessDelete(deleteData []*DeleteData, ts uint64) LoadGrowing(ctx context.Context, infos []*querypb.SegmentLoadInfo, version int64) error LoadSegments(ctx context.Context, req *querypb.LoadSegmentsRequest) error ReleaseSegments(ctx context.Context, req *querypb.ReleaseSegmentsRequest, force bool) error SyncTargetVersion(newVersion int64, growingInTarget []int64, sealedInTarget []int64, droppedInTarget []int64, checkpoint *msgpb.MsgPosition) GetTargetVersion() int64 // manage exclude segments AddExcludedSegments(excludeInfo map[int64]uint64) VerifyExcludedSegments(segmentID int64, ts uint64) bool TryCleanExcludedSegments(ts uint64) // control Serviceable() bool Start() Close() }
ShardDelegator is the interface definition.
func NewShardDelegator ¶
func NewShardDelegator(ctx context.Context, collectionID UniqueID, replicaID UniqueID, channel string, version int64, workerManager cluster.Manager, manager *segments.Manager, tsafeManager tsafe.Manager, loader segments.Loader, factory msgstream.Factory, startTs uint64, queryHook optimizers.QueryHook, chunkManager storage.ChunkManager, ) (ShardDelegator, error)
NewShardDelegator creates a new ShardDelegator instance with all fields initialized.
type SnapshotItem ¶
type SnapshotItem struct { NodeID int64 Segments []SegmentEntry }
SnapshotItem group segmentEntry slice
type TSafeUpdater ¶
type TSafeUpdater interface { RegisterChannel(string) chan Timestamp UnregisterChannel(string) error }
TSafeUpdater is the interface for type provides tsafe update event
type TermExpr ¶
type TermExpr struct { PhysicalExpr // contains filtered or unexported fields }
func NewTermExpr ¶
func NewTermExpr(values []storage.ScalarFieldValue) *TermExpr
type TimeRange ¶
type TimeRange struct {
// contains filtered or unexported fields
}
TimeRange is a range of time periods
type UnaryRangeExpr ¶
type UnaryRangeExpr struct { PhysicalExpr // contains filtered or unexported fields }
func NewUnaryRangeExpr ¶
func NewUnaryRangeExpr(value storage.ScalarFieldValue, op planpb.OpType) *UnaryRangeExpr