manager

package
v0.10.3-0...-74752f2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSegmentNotGrowing = errors.New("segment is not growing")
	ErrTimeTickTooOld    = errors.New("time tick is too old")
	ErrNotEnoughSpace    = stats.ErrNotEnoughSpace
	ErrTooLargeInsert    = stats.ErrTooLargeInsert
)
View Source
var ErrFencedAssign = errors.New("fenced assign")

Functions

This section is empty.

Types

type AssignSegmentRequest

type AssignSegmentRequest struct {
	CollectionID  int64
	PartitionID   int64
	InsertMetrics stats.InsertMetrics
	TimeTick      uint64
	TxnSession    *txn.TxnSession
}

AssignSegmentRequest is a request to allocate segment.

type AssignSegmentResult

type AssignSegmentResult struct {
	SegmentID   int64
	Acknowledge *atomic.Int32 // used to ack the segment assign result has been consumed
}

AssignSegmentResult is a result of segment allocation. The sum of Results.Row is equal to InserMetrics.NumRows.

func (*AssignSegmentResult) Ack

func (r *AssignSegmentResult) Ack()

Ack acks the segment assign result has been consumed. Must be only call once after the segment assign result has been consumed.

type PChannelSegmentAllocManager

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

PChannelSegmentAllocManager is a segment assign manager of determined pchannel.

func RecoverPChannelSegmentAllocManager

func RecoverPChannelSegmentAllocManager(
	ctx context.Context,
	pchannel types.PChannelInfo,
	wal *syncutil.Future[wal.WAL],
) (*PChannelSegmentAllocManager, error)

RecoverPChannelSegmentAllocManager recovers the segment assignment manager at the specified pchannel.

func (*PChannelSegmentAllocManager) AssignSegment

AssignSegment assigns a segment for a assign segment request.

func (*PChannelSegmentAllocManager) Channel

Channel returns the pchannel info.

func (*PChannelSegmentAllocManager) Close

Close try to persist all stats and invalid the manager.

func (*PChannelSegmentAllocManager) IsNoWaitSeal

func (m *PChannelSegmentAllocManager) IsNoWaitSeal() bool

IsNoWaitSeal returns whether the segment manager is no segment wait for seal.

func (*PChannelSegmentAllocManager) MustSealSegments

func (m *PChannelSegmentAllocManager) MustSealSegments(ctx context.Context, infos ...stats.SegmentBelongs)

func (*PChannelSegmentAllocManager) NewCollection

func (m *PChannelSegmentAllocManager) NewCollection(collectionID int64, vchannel string, partitionIDs []int64) error

NewPartitions creates a new partition with the specified partitionIDs.

func (*PChannelSegmentAllocManager) NewPartition

func (m *PChannelSegmentAllocManager) NewPartition(collectionID int64, partitionID int64) error

NewPartition creates a new partition with the specified partitionID.

func (*PChannelSegmentAllocManager) RemoveCollection

func (m *PChannelSegmentAllocManager) RemoveCollection(ctx context.Context, collectionID int64) error

RemoveCollection removes the specified collection.

func (*PChannelSegmentAllocManager) RemovePartition

func (m *PChannelSegmentAllocManager) RemovePartition(ctx context.Context, collectionID int64, partitionID int64) error

RemovePartition removes the specified partitions.

func (*PChannelSegmentAllocManager) SealAndFenceSegmentUntil

func (m *PChannelSegmentAllocManager) SealAndFenceSegmentUntil(ctx context.Context, collectionID int64, timetick uint64) ([]int64, error)

SealAndFenceSegmentUntil seal all segment that contains the message less than the incoming timetick.

func (*PChannelSegmentAllocManager) TryToSealSegments

func (m *PChannelSegmentAllocManager) TryToSealSegments(ctx context.Context, infos ...stats.SegmentBelongs)

TryToSealSegments tries to seal the specified segments.

func (*PChannelSegmentAllocManager) TryToSealWaitedSegment

func (m *PChannelSegmentAllocManager) TryToSealWaitedSegment(ctx context.Context)

TryToSealWaitedSegment tries to seal the wait for sealing segment.

func (*PChannelSegmentAllocManager) WaitUntilNoWaitSeal

func (m *PChannelSegmentAllocManager) WaitUntilNoWaitSeal(ctx context.Context) error

WaitUntilNoWaitSeal waits until no segment wait for seal.

Jump to

Keyboard shortcuts

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