datacoord

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

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

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

Documentation

Index

Constants

View Source
const (
	MetaPrefix                         = "datacoord-meta"
	SegmentPrefix                      = MetaPrefix + "/s"
	SegmentBinlogPathPrefix            = MetaPrefix + "/binlog"
	SegmentDeltalogPathPrefix          = MetaPrefix + "/deltalog"
	SegmentStatslogPathPrefix          = MetaPrefix + "/statslog"
	SegmentBM25logPathPrefix           = MetaPrefix + "/bm25log"
	ChannelRemovePrefix                = MetaPrefix + "/channel-removal"
	ChannelCheckpointPrefix            = MetaPrefix + "/channel-cp"
	ImportJobPrefix                    = MetaPrefix + "/import-job"
	ImportTaskPrefix                   = MetaPrefix + "/import-task"
	PreImportTaskPrefix                = MetaPrefix + "/preimport-task"
	CompactionTaskPrefix               = MetaPrefix + "/compaction-task"
	AnalyzeTaskPrefix                  = MetaPrefix + "/analyze-task"
	PartitionStatsInfoPrefix           = MetaPrefix + "/partition-stats"
	PartitionStatsCurrentVersionPrefix = MetaPrefix + "/current-partition-stats-version"
	StatsTaskPrefix                    = MetaPrefix + "/stats-task"

	NonRemoveFlagTomestone = "non-removed"
	RemoveFlagTomestone    = "removed"
)

Variables

This section is empty.

Functions

func BuildIndexKey

func BuildIndexKey(collectionID, indexID int64) string

func BuildSegmentIndexKey

func BuildSegmentIndexKey(collectionID, partitionID, segmentID, buildID int64) string

func ValidateSegment

func ValidateSegment(segment *datapb.SegmentInfo) error

Types

type Catalog

type Catalog struct {
	MetaKv               kv.MetaKv
	ChunkManagerRootPath string
	// contains filtered or unexported fields
}

func NewCatalog

func NewCatalog(MetaKv kv.MetaKv, chunkManagerRootPath string, metaRootpath string) *Catalog

func (*Catalog) AddSegment

func (kc *Catalog) AddSegment(ctx context.Context, segment *datapb.SegmentInfo) error

func (*Catalog) AlterIndexes

func (kc *Catalog) AlterIndexes(ctx context.Context, indexes []*model.Index) error

func (*Catalog) AlterSegmentIndexes

func (kc *Catalog) AlterSegmentIndexes(ctx context.Context, segIdxes []*model.SegmentIndex) error

func (*Catalog) AlterSegments

func (kc *Catalog) AlterSegments(ctx context.Context, segments []*datapb.SegmentInfo, binlogs ...metastore.BinlogsIncrement) error

func (*Catalog) ChannelExists

func (kc *Catalog) ChannelExists(ctx context.Context, channel string) bool

func (*Catalog) CreateIndex

func (kc *Catalog) CreateIndex(ctx context.Context, index *model.Index) error

func (*Catalog) CreateSegmentIndex

func (kc *Catalog) CreateSegmentIndex(ctx context.Context, segIdx *model.SegmentIndex) error

func (*Catalog) DropAnalyzeTask

func (kc *Catalog) DropAnalyzeTask(ctx context.Context, taskID typeutil.UniqueID) error

func (*Catalog) DropChannel

func (kc *Catalog) DropChannel(ctx context.Context, channel string) error

DropChannel removes channel remove flag after whole procedure is finished

func (*Catalog) DropChannelCheckpoint

func (kc *Catalog) DropChannelCheckpoint(ctx context.Context, vChannel string) error

func (*Catalog) DropCompactionTask

func (kc *Catalog) DropCompactionTask(ctx context.Context, task *datapb.CompactionTask) error

func (*Catalog) DropCurrentPartitionStatsVersion

func (kc *Catalog) DropCurrentPartitionStatsVersion(ctx context.Context, collID, partID int64, vChannel string) error

func (*Catalog) DropImportJob

func (kc *Catalog) DropImportJob(ctx context.Context, jobID int64) error

func (*Catalog) DropImportTask

func (kc *Catalog) DropImportTask(ctx context.Context, taskID int64) error

func (*Catalog) DropIndex

func (kc *Catalog) DropIndex(ctx context.Context, collID typeutil.UniqueID, dropIdxID typeutil.UniqueID) error

func (*Catalog) DropPartitionStatsInfo

func (kc *Catalog) DropPartitionStatsInfo(ctx context.Context, info *datapb.PartitionStatsInfo) error

func (*Catalog) DropPreImportTask

func (kc *Catalog) DropPreImportTask(ctx context.Context, taskID int64) error

func (*Catalog) DropSegment

func (kc *Catalog) DropSegment(ctx context.Context, segment *datapb.SegmentInfo) error

func (*Catalog) DropSegmentIndex

func (kc *Catalog) DropSegmentIndex(ctx context.Context, collID, partID, segID, buildID typeutil.UniqueID) error

func (*Catalog) DropStatsTask

func (kc *Catalog) DropStatsTask(ctx context.Context, taskID typeutil.UniqueID) error

func (*Catalog) GcConfirm

func (kc *Catalog) GcConfirm(ctx context.Context, collectionID, partitionID typeutil.UniqueID) bool

GcConfirm returns true if related collection/partition is not found. DataCoord will remove all the meta eventually after GC is finished.

func (*Catalog) GetCurrentPartitionStatsVersion

func (kc *Catalog) GetCurrentPartitionStatsVersion(ctx context.Context, collID, partID int64, vChannel string) (int64, error)

func (*Catalog) ListAnalyzeTasks

func (kc *Catalog) ListAnalyzeTasks(ctx context.Context) ([]*indexpb.AnalyzeTask, error)

func (*Catalog) ListChannelCheckpoint

func (kc *Catalog) ListChannelCheckpoint(ctx context.Context) (map[string]*msgpb.MsgPosition, error)

func (*Catalog) ListCompactionTask

func (kc *Catalog) ListCompactionTask(ctx context.Context) ([]*datapb.CompactionTask, error)

func (*Catalog) ListImportJobs

func (kc *Catalog) ListImportJobs(ctx context.Context) ([]*datapb.ImportJob, error)

func (*Catalog) ListImportTasks

func (kc *Catalog) ListImportTasks(ctx context.Context) ([]*datapb.ImportTaskV2, error)

func (*Catalog) ListIndexes

func (kc *Catalog) ListIndexes(ctx context.Context) ([]*model.Index, error)

func (*Catalog) ListPartitionStatsInfos

func (kc *Catalog) ListPartitionStatsInfos(ctx context.Context) ([]*datapb.PartitionStatsInfo, error)

func (*Catalog) ListPreImportTasks

func (kc *Catalog) ListPreImportTasks(ctx context.Context) ([]*datapb.PreImportTask, error)

func (*Catalog) ListSegmentIndexes

func (kc *Catalog) ListSegmentIndexes(ctx context.Context) ([]*model.SegmentIndex, error)

func (*Catalog) ListSegments

func (kc *Catalog) ListSegments(ctx context.Context) ([]*datapb.SegmentInfo, error)

func (*Catalog) ListStatsTasks

func (kc *Catalog) ListStatsTasks(ctx context.Context) ([]*indexpb.StatsTask, error)

func (*Catalog) LoadFromSegmentPath

func (kc *Catalog) LoadFromSegmentPath(colID, partID, segID typeutil.UniqueID) (*datapb.SegmentInfo, error)

LoadFromSegmentPath loads segment info from persistent storage by given segment path. # TESTING ONLY #

func (*Catalog) MarkChannelAdded

func (kc *Catalog) MarkChannelAdded(ctx context.Context, channel string) error

func (*Catalog) MarkChannelDeleted

func (kc *Catalog) MarkChannelDeleted(ctx context.Context, channel string) error

func (*Catalog) SaveAnalyzeTask

func (kc *Catalog) SaveAnalyzeTask(ctx context.Context, task *indexpb.AnalyzeTask) error

func (*Catalog) SaveByBatch

func (kc *Catalog) SaveByBatch(kvs map[string]string) error

func (*Catalog) SaveChannelCheckpoint

func (kc *Catalog) SaveChannelCheckpoint(ctx context.Context, vChannel string, pos *msgpb.MsgPosition) error

func (*Catalog) SaveChannelCheckpoints

func (kc *Catalog) SaveChannelCheckpoints(ctx context.Context, positions []*msgpb.MsgPosition) error

func (*Catalog) SaveCompactionTask

func (kc *Catalog) SaveCompactionTask(ctx context.Context, coll *datapb.CompactionTask) error

func (*Catalog) SaveCurrentPartitionStatsVersion

func (kc *Catalog) SaveCurrentPartitionStatsVersion(ctx context.Context, collID, partID int64, vChannel string, currentVersion int64) error

func (*Catalog) SaveDroppedSegmentsInBatch

func (kc *Catalog) SaveDroppedSegmentsInBatch(ctx context.Context, segments []*datapb.SegmentInfo) error

func (*Catalog) SaveImportJob

func (kc *Catalog) SaveImportJob(ctx context.Context, job *datapb.ImportJob) error

func (*Catalog) SaveImportTask

func (kc *Catalog) SaveImportTask(ctx context.Context, task *datapb.ImportTaskV2) error

func (*Catalog) SavePartitionStatsInfo

func (kc *Catalog) SavePartitionStatsInfo(ctx context.Context, coll *datapb.PartitionStatsInfo) error

func (*Catalog) SavePreImportTask

func (kc *Catalog) SavePreImportTask(ctx context.Context, task *datapb.PreImportTask) error

func (*Catalog) SaveStatsTask

func (kc *Catalog) SaveStatsTask(ctx context.Context, task *indexpb.StatsTask) error

func (*Catalog) ShouldDropChannel

func (kc *Catalog) ShouldDropChannel(ctx context.Context, channel string) bool

Jump to

Keyboard shortcuts

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