datacoord

package
v0.0.0-...-34e0b2d Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	MetaPrefix                         = "datacoord-meta"
	SegmentPrefix                      = MetaPrefix + "/s"
	SegmentBinlogPathPrefix            = MetaPrefix + "/binlog"
	SegmentDeltalogPathPrefix          = MetaPrefix + "/deltalog"
	SegmentStatslogPathPrefix          = MetaPrefix + "/statslog"
	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"

	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 CloneSegmentWithExcludeBinlogs

func CloneSegmentWithExcludeBinlogs(segment *datapb.SegmentInfo) (*datapb.SegmentInfo, []*datapb.FieldBinlog, []*datapb.FieldBinlog, []*datapb.FieldBinlog)

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(jobID int64) error

func (*Catalog) DropImportTask

func (kc *Catalog) DropImportTask(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(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) 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() ([]*datapb.ImportJob, error)

func (*Catalog) ListImportTasks

func (kc *Catalog) ListImportTasks() ([]*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() ([]*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) 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(job *datapb.ImportJob) error

func (*Catalog) SaveImportTask

func (kc *Catalog) SaveImportTask(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(task *datapb.PreImportTask) 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