states

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: Apache-2.0 Imports: 88 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UnbalanceTolerationFactorLabel        = "unbalance_toleration"
	ReverseUnbalanceTolerationFactorLabel = "reverse_toleration"
)

Variables

Endian is type alias of binary.LittleEndian. Milvus uses little endian by default.

View Source
var ErrNotMilvsuRootPath = errors.New("is not a Milvus RootPath")

ErrNotMilvsuRootPath sample error for non-valid root path.

View Source
var ErrPathIsDir = errors.New("path is directory")

ErrPathIsDir error indicating path shall be file but a directory.

Functions

func ComposeTS

func ComposeTS(physical, logical int64) uint64

ComposeTS returns a timestamp composed of physical part and logical part

func ExplainBalanceCommand

func ExplainBalanceCommand(cli kv.MetaKV, basePath string) *cobra.Command

func GetLogLevel

func GetLogLevel(httpClient *http.Client, session *models.Session) error

func GetProbeCmd

func GetProbeCmd(cli kv.MetaKV, basePath string) *cobra.Command

func GetSizeOfIDs

func GetSizeOfIDs(data *schemapb.IDs) int

func GetTiKVClient

func GetTiKVClient(cp *ConnectParams) (*txnkv.Client, error)

func Hash32Bytes

func Hash32Bytes(b []byte) (uint32, error)

Hash32Bytes hashing a byte array to uint32

func Hash32Int64

func Hash32Int64(v int64) (uint32, error)

Hash32Int64 hashing an int64 number to uint32

func Hash32String

func Hash32String(s string) (int64, error)

Hash32String hashing a string to int64

func Hash32Uint64

func Hash32Uint64(v uint64) (uint32, error)

Hash32Uint64 hashing an uint64 nubmer to uint32

func HashString2Uint32

func HashString2Uint32(v string) uint32

HashString2Uint32 hashing a string to uint32

func ListServers

func ListServers(ctx context.Context, cli kv.MetaKV, basePath string, serverName string) ([]*models.Session, error)

func ParseMsg

func ParseMsg(msgType commonpb.MsgType, payload []byte) (interface {
	proto.Message
	GetShardName() string
}, error,
)

func ParseSegmentIDByBinlog

func ParseSegmentIDByBinlog(rootPath, path string) (int64, error)

ParseSegmentIDByBinlog parse segment id from binlog paths if path format is not expected, returns error

func ParseTS

func ParseTS(ts uint64) (time.Time, uint64)

func Start

func Start(config *configs.Config, multiStage bool) framework.State

Start returns the first state - offline.

func ValidateMsg

func ValidateMsg(msgType commonpb.MsgType, payload []byte) error

Types

type ApplicationState

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

ApplicationState application background state. used for state switch/merging.

func (*ApplicationState) AssembleIndexFilesCommand

func (app *ApplicationState) AssembleIndexFilesCommand(ctx context.Context, p *AssembleIndexFilesParam) error

func (*ApplicationState) Close

func (app *ApplicationState) Close()

func (*ApplicationState) ConnectCommand

func (app *ApplicationState) ConnectCommand(ctx context.Context, cp *ConnectParams) error

func (*ApplicationState) ConnectMinioCommand

func (app *ApplicationState) ConnectMinioCommand(ctx context.Context, p *storage.ConnectMinioParam) error

func (*ApplicationState) Ctx

func (*ApplicationState) DebugCommand

func (app *ApplicationState) DebugCommand(ctx context.Context, p *debugParam)

func (*ApplicationState) DisconnectCommand

func (app *ApplicationState) DisconnectCommand(ctx context.Context, p *DisconnectParam) error

DisconnectCommand implements disconnect sub state logic.

func (*ApplicationState) ExitCommand

func (app *ApplicationState) ExitCommand(ctx context.Context, _ *exitParam)

func (*ApplicationState) IsEnding

func (app *ApplicationState) IsEnding() bool

func (*ApplicationState) Label

func (app *ApplicationState) Label() string

func (*ApplicationState) ListStatesCommand

func (app *ApplicationState) ListStatesCommand(ctx context.Context, p *ListStatesParam) error

func (*ApplicationState) LoadBackupCommand

func (app *ApplicationState) LoadBackupCommand(ctx context.Context, p *LoadBackupParam) error

func (*ApplicationState) NextState

func (app *ApplicationState) NextState() (string, framework.State)

func (*ApplicationState) OpenCommand

func (app *ApplicationState) OpenCommand(ctx context.Context, p *OpenParam) error

OpenCommand implements open workspace command

func (*ApplicationState) ParseIndexParamCommand

func (app *ApplicationState) ParseIndexParamCommand(ctx context.Context, p *ParseIndexParam) error

ParseIndexParamCommand parses index params from file.

func (*ApplicationState) ParseTSCommand

func (app *ApplicationState) ParseTSCommand(ctx context.Context, p *ParseTSParam)

func (*ApplicationState) PrintVersionCommand

func (app *ApplicationState) PrintVersionCommand(ctx context.Context, _ *PrintVerParam)

func (*ApplicationState) Process

func (app *ApplicationState) Process(cmd string) (framework.State, error)

func (*ApplicationState) PulsarctlCommand

func (app *ApplicationState) PulsarctlCommand(ctx context.Context, p *PulsarctlParam) error

func (*ApplicationState) SetCurrentVersionCommand

func (app *ApplicationState) SetCurrentVersionCommand(ctx context.Context, param *SetCurrentVersionParam) error

func (*ApplicationState) SetEnvCommand

func (app *ApplicationState) SetEnvCommand(ctx context.Context, p *SetConfigParam) error

func (*ApplicationState) SetNext

func (app *ApplicationState) SetNext(tag string, state framework.State)

func (*ApplicationState) SetTagNext

func (app *ApplicationState) SetTagNext(tag string, state framework.State)

func (*ApplicationState) SetupCommands

func (app *ApplicationState) SetupCommands()

SetupCommands implments framework.State. initialize or reset command after execution.

func (*ApplicationState) ShowCurrentVersionCommand

func (app *ApplicationState) ShowCurrentVersionCommand(ctx context.Context, p *ShowCurrentVersionParam)

ShowCurrentVersionCommand returns command for show current-version.

func (*ApplicationState) StorageAnalysisCommand

func (app *ApplicationState) StorageAnalysisCommand(ctx context.Context, p *StorageAnalysisParam) error

func (*ApplicationState) Suggestions

func (app *ApplicationState) Suggestions(input string) map[string]string

func (*ApplicationState) ValidateIndexFilesCommand

func (app *ApplicationState) ValidateIndexFilesCommand(ctx context.Context, p *ValidateIndexParam) error

func (*ApplicationState) WalMessageIDCommand

func (c *ApplicationState) WalMessageIDCommand(ctx context.Context, p *WALMessageIDParam) error

type AssembleIndexFilesParam

type AssembleIndexFilesParam struct {
	framework.ParamBase `use:"assemble-indexfiles [directory]" desc:""`
	// contains filtered or unexported fields
}

func (*AssembleIndexFilesParam) ParseArgs

func (p *AssembleIndexFilesParam) ParseArgs(args []string) error

type BackupParam

type BackupParam struct {
	framework.ParamBase `use:"backup" desc:"backup etcd key-values"`

	IgnoreRevision bool  `name:"ignoreRevision" default:"false" desc:"backup ignore revision change, ONLY shall works with no nodes online"`
	BatchSize      int64 `name:"batchSize" default:"100" desc:"batch fetch size for etcd backup operation"`
	// contains filtered or unexported fields
}

func (*BackupParam) ParseArgs

func (p *BackupParam) ParseArgs(args []string) error

type BinlogIterator

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

func NewBinlogIterator

func NewBinlogIterator(collection *models.Collection, readers map[int64]*binlogv1.BinlogReader) (*BinlogIterator, error)

func (*BinlogIterator) Range

func (iter *BinlogIterator) Range(fn func(rowID int64, ts int64, pk storagecommon.PrimaryKey, data map[int64]any) error) error

type CheckPartitionKeyParam

type CheckPartitionKeyParam struct {
	framework.ParamBase `use:"check-partiton-key" desc:"check partition key field file"`
	Storage             string `name:"storage" default:"auto" desc:"storage service configuration mode"`
	StopIfErr           bool   `name:"stopIfErr" default:"true"`
	OutputPrimaryKey    bool   `name:"outputPK" default:"true" desc:"print error record primary key info in stdout mode"`
	MinioAddress        string `name:"minioAddr" default:"" desc:"the minio address to override, leave empty to use milvus.yaml value"`
	OutputFormat        string `name:"outputFmt" default:"stdout"`

	CollectionID int64 `name:"collection" default:"0" desc:"target collection to scan, default scan all partition key collections"`
}

type ConnectParams

type ConnectParams struct {
	framework.ParamBase `use:"connect" desc:"Connect to metastore"`
	EtcdAddr            string `name:"etcd" default:"127.0.0.1:2379" desc:"the etcd endpoint to connect"`
	RootPath            string `name:"rootPath" default:"by-dev" desc:"meta root paht milvus is using"`
	MetaPath            string `name:"metaPath" default:"meta" desc:"meta path prefix"`
	Force               bool   `name:"force" default:"false" desc:"force connect ignoring ping Etcd & rootPath check"`
	Dry                 bool   `name:"dry" default:"false" desc:"dry connect without specifying milvus instance"`
	UseSSL              bool   `name:"use_ssl" default:"false" desc:"enable to use SSL"`
	EnableTLS           bool   `name:"enableTLS" default:"false" desc:"use TLS"`
	RootCA              string `name:"rootCAPem" default:"" desc:"root CA pem file path"`
	ETCDPem             string `name:"etcdCert" default:"" desc:"etcd tls cert file path"`
	ETCDKey             string `name:"etcdKey" default:"" desc:"etcd tls key file path"`
	ETCDUserName        string `name:"etcdUserName" default:"" desc:"etcd credential username"`
	ETCDPassword        string `name:"etcdPassword" default:"" desc:"etcd creidentail password"`
	TLSMinVersion       string `name:"min_version" default:"1.2" desc:"TLS min version"`
	// TiKV Params
	UseTiKV       bool   `name:"use_tikv" default:"false" desc:"enable to use tikv for metastore"`
	TiKVTLSCACert string `name:"tikvCACert" default:"" desc:"tikv root CA pem file path"`
	TiKVTLSCert   string `name:"tikvCert" default:"" desc:"tikv tls cert file path"`
	TiKVTLSKey    string `name:"tikvKey" default:"" desc:"tikv tls key file path"`
	TiKVUseSSL    bool   `name:"tikv_use_ssl" default:"false" desc:"enable to use SSL for tikv"`
	TiKVAddr      string `name:"tikv" default:"127.0.0.1:2389" desc:"the tikv endpoint to connect"`

	Auto bool `name:"auto" default:"false" desc:"auto detect rootPath if possible"`
}

type ConsumeParam

type ConsumeParam struct {
	framework.ParamBase `use:"consume" desc:"consume msgs from provided topic"`
	StartPosition       string `name:"start_pos" default:"cp" desc:"position to start with"`
	MqType              string `name:"mq_type" default:"pulsar" desc:"message queue type to consume"`
	MqAddress           string `name:"mq_addr" default:"pulsar://127.0.0.1:6650" desc:"message queue service address"`
	Topic               string `name:"topic" default:"" desc:"topic to consume"`
	ShardName           string `name:"shard_name" default:"" desc:"shard name(vchannel name) to filter with"`
	Detail              bool   `name:"detail" default:"false" desc:"print msg detail"`
	ManualID            int64  `name:"manual_id" default:"0" desc:"manual id"`
}

type DisconnectParam

type DisconnectParam struct {
	framework.ParamBase `use:"disconnect" desc:"disconnect online states"`
	// contains filtered or unexported fields
}

func (*DisconnectParam) ParseArgs

func (p *DisconnectParam) ParseArgs(args []string) error

type DownloadPKParam

type DownloadPKParam struct {
	framework.ParamBase `use:"download-pk" desc:"download segment pk with provided collection/segment id"`
	MinioAddress        string `name:"minioAddr" default:"" desc:"the minio address to override, leave empty to use milvus.yaml value"`
	CollectionID        int64  `name:"collection" default:"0" desc:"collection id to download"`
	SegmentID           int64  `name:"segment" default:"0" desc:"segment id to download"`
}

type DownloadSegmentParam

type DownloadSegmentParam struct {
	framework.ParamBase `use:"download-segment" desc:"download segment file with provided segment id"`
	MinioAddress        string `name:"minioAddr" default:"" desc:"the minio address to override, leave empty to use milvus.yaml value"`
	SegmentID           int64  `name:"segment" default:"0" desc:"segment id to download"`
}

type DryModeParam

type DryModeParam struct {
	framework.ParamBase `use:"dry-mode" desc:"enter dry mode to select instance"`
}

type FindMilvusParam

type FindMilvusParam struct {
	framework.ParamBase `use:"find-milvus" desc:"search kvs to find milvus instance"`
}

type FloatVector

type FloatVector []float32

func (FloatVector) DataType

func (fv FloatVector) DataType() commonpb.PlaceholderType

func (FloatVector) Serialize

func (fv FloatVector) Serialize() []byte

type ForceReleaseParam

type ForceReleaseParam struct {
	framework.ParamBase `use:"force-release"`
	CollectionID        int64 `name:"collection" default:"0" desc:"collection id to force release"`
	All                 bool  `name:"all" default:"false" desc:"force release all collections loaded"`
}

type FrameScreen

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

func NewFrameScreen

func NewFrameScreen(lines int, display *uilive.Writer) *FrameScreen

type GetConfigurationParam

type GetConfigurationParam struct {
	framework.ParamBase `use:"show configurations" desc:"iterate all online components and inspect configuration"`
	Format              string `name:"format" default:"line" desc:"output format"`
	DialTimeout         int64  `name:"dialTimeout" default:"2" desc:"grpc dial timeout in seconds"`
	Filter              string `name:"filter" default:"" desc:"configuration key filter sub string"`
}

type GetDistributionParam

type GetDistributionParam struct {
	framework.ParamBase `use:"show segment-loaded-grpc" desc:"list segments loaded information"`
	CollectionID        int64 `name:"collection" default:"0" desc:"collection id to filter with"`
	NodeID              int64 `name:"node" default:"0" desc:"node id to check"`
}

type HealthzCheckParam

type HealthzCheckParam struct {
	framework.ParamBase `use:"healthz-check" desc:"perform healthz check for connect instance"`
	Items               []string `name:"items" default:"" desc:"healthz check items"`
}

type InstanceState

type InstanceState struct {
	*framework.CmdState
	*show.ComponentShow
	*remove.ComponentRemove
	*repair.ComponentRepair
	*set.ComponentSet
	// contains filtered or unexported fields
}

InstanceState provides command for single milvus instance.

func (*InstanceState) BackupCommand

func (s *InstanceState) BackupCommand(ctx context.Context, p *BackupParam) error

getBackupEtcdCmd returns command for backup etcd usage: backup [component] [options...]

func (*InstanceState) CheckPartitionKeyCommand

func (s *InstanceState) CheckPartitionKeyCommand(ctx context.Context, p *CheckPartitionKeyParam) error

func (*InstanceState) Close

func (s *InstanceState) Close()

func (*InstanceState) ConsumeCommand

func (s *InstanceState) ConsumeCommand(ctx context.Context, p *ConsumeParam) error

func (*InstanceState) DownloadDeltalogs

func (s *InstanceState) DownloadDeltalogs(ctx context.Context, client *minio.Client, bucket, rootPath string, collection *models.Collection, segment *models.Segment) (*storage.DeltaData, error)

func (*InstanceState) DownloadPKCommand

func (s *InstanceState) DownloadPKCommand(ctx context.Context, p *DownloadPKParam) error

func (*InstanceState) DownloadSegmentCommand

func (s *InstanceState) DownloadSegmentCommand(ctx context.Context, p *DownloadSegmentParam) error

func (*InstanceState) DryModeCommand

func (s *InstanceState) DryModeCommand(ctx context.Context, p *DryModeParam)

DryModeCommand implement `dry-mode` command to enter etcd "dry mode".

func (*InstanceState) ForceReleaseCommand

func (s *InstanceState) ForceReleaseCommand(ctx context.Context, p *ForceReleaseParam) error

getForceReleaseCmd returns command for force-release usage: force-release --collection [collection id] or force-release --all

func (*InstanceState) GetConfigurationCommand

func (s *InstanceState) GetConfigurationCommand(ctx context.Context, p *GetConfigurationParam) error

func (*InstanceState) GetDistributionCommand

func (s *InstanceState) GetDistributionCommand(ctx context.Context, p *GetDistributionParam) error

GetDistributionCommand iterates all querynodes to list distribution.

func (*InstanceState) GetMinioClientFromCfg

func (s *InstanceState) GetMinioClientFromCfg(ctx context.Context, params ...oss.MinioConnectParam) (client *minio.Client, bucketName, rootPath string, err error)

func (*InstanceState) GetMinioClientFromPrompt

func (s *InstanceState) GetMinioClientFromPrompt(ctx context.Context) (client *minio.Client, bucketName, rootPath string, err error)

func (*InstanceState) GetPprofCommand

func (s *InstanceState) GetPprofCommand(ctx context.Context, p *PprofParam) error

func (*InstanceState) HealthzCheckCommand

func (c *InstanceState) HealthzCheckCommand(ctx context.Context, p *HealthzCheckParam) (*framework.PresetResultSet, error)

func (*InstanceState) ListHealthzCheckCommand

func (c *InstanceState) ListHealthzCheckCommand(ctx context.Context, p *ListHealthzCheckParam) error

func (*InstanceState) ListMetricsPortCommand

func (s *InstanceState) ListMetricsPortCommand(ctx context.Context, p *ListMetricsPortParam) error

ListMetricsPortCommand returns command logic listing metrics port for all online components.

func (*InstanceState) ListenEventsCommand

func (s *InstanceState) ListenEventsCommand(ctx context.Context, p *ListenEventParam) error

ListenEventsCommand returns command logic listen events from grpc event logger.

func (*InstanceState) ProbePKCommand

func (s *InstanceState) ProbePKCommand(ctx context.Context, p *ProbePKParam) error

func (*InstanceState) ScanBinlogCommand

func (s *InstanceState) ScanBinlogCommand(ctx context.Context, p *ScanBinlogParams) error

func (*InstanceState) ScanBinlogs

func (s *InstanceState) ScanBinlogs(ctx context.Context, minioClient *minio.Client, bucketName string, rootPath string, collection *models.Collection, segment *models.Segment,
	selectField func(fieldID int64) bool, fn func(map[int64]*binlogv1.BinlogReader),
)

ScanBinlogs scans provided segment with delete record excluded.

func (*InstanceState) ScanDeltalogCommand

func (s *InstanceState) ScanDeltalogCommand(ctx context.Context, p *ScanDeltalogParams) error

func (*InstanceState) SetupCommands

func (s *InstanceState) SetupCommands()

SetupCommands setups the command. also called after each command run to reset flag values.

func (*InstanceState) TestMinioCfgCommand

func (s *InstanceState) TestMinioCfgCommand(ctx context.Context, p *TestMinioCfgParam) error

type ListHealthzCheckParam

type ListHealthzCheckParam struct {
	framework.ParamBase `use:"show healthz-checks" desc:"list available healthz check items"`
}

type ListMetricsPortParam

type ListMetricsPortParam struct {
	framework.ParamBase `use:"list metrics-port" desc:"list metrics port for online components"`
	DialTimeout         int64 `name:"dialTimeout" default:"2" desc:"grpc dial timeout in seconds"`
}

type ListStatesParam

type ListStatesParam struct {
	framework.ParamBase `use:"list states" desc:"list current connected states"`
}

type ListSubscriptionParam

type ListSubscriptionParam struct {
	framework.ParamBase `use:"list subscription" desc:"list subscriptions for provided topic"`
	Tenant              string `name:"tenant" default:"public" desc:"tenant name to list"`
	Namespace           string `name:"namespace" default:"default" desc:"namespace name to list"`
	Topic               string `name:"topic" default:"" desc:"topic to check subscription"`
}

type ListTopicParam

type ListTopicParam struct {
	framework.ParamBase `use:"list topic" desc:"list topics in instance"`
	Tenant              string `name:"tenant" default:"public" desc:"tenant name to list"`
	Namespace           string `name:"namespace" default:"default" desc:"namespace name to list"`
}

type ListenEventParam

type ListenEventParam struct {
	framework.ParamBase `use:"listen-events"`
	Localhost           bool `name:"localhost" default:"false" desc:"localhost components"`
}

type LoadBackupParam

type LoadBackupParam struct {
	framework.ParamBase `use:"load-backup [file]" desc:"load etcd backup file"`

	UseWorkspace  bool   `name:"use-workspace" default:"false"`
	WorkspaceName string `name:"workspace-name" default:""`
	// contains filtered or unexported fields
}

func (*LoadBackupParam) ParseArgs

func (p *LoadBackupParam) ParseArgs(args []string) error

type MinioConnectParam

type MinioConnectParam struct {
	MinioAddress  string `name:"minioAddress"`
	MinioPasswd   string `name:"minioPassword"`
	MinioUserName string `name:"minioUsername"`
}

type NodeItem

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

type OpenParam

type OpenParam struct {
	framework.ParamBase `use:"open-workspace [workspace-name]" desc:"Open workspace"`
	// contains filtered or unexported fields
}

func (*OpenParam) ParseArgs

func (p *OpenParam) ParseArgs(args []string) error

ParseArgs parse args

type ParseIndexParam

type ParseIndexParam struct {
	framework.ParamBase `use:"parse-indexparam [file]" desc:"parse index params"`
	// contains filtered or unexported fields
}

func (*ParseIndexParam) ParseArgs

func (p *ParseIndexParam) ParseArgs(args []string) error

type ParseTSParam

type ParseTSParam struct {
	framework.ParamBase `use:"parse-ts" desc:"parse hybrid timestamp"`
	// contains filtered or unexported fields
}

func (*ParseTSParam) ParseArgs

func (p *ParseTSParam) ParseArgs(args []string) error

type PprofParam

type PprofParam struct {
	framework.ParamBase `use:"pprof" desc:"get pprof from online components"`
	Type                string `name:"type" default:"goroutine" desc:"pprof metric type to fetch"`
	Port                int64  `name:"port" default:"9091" desc:"metrics port milvus component is using"`
}

type PrintVerParam

type PrintVerParam struct {
	framework.ParamBase `use:"version" desc:"print version"`
}

type ProbePKParam

type ProbePKParam struct {
	framework.ParamBase `use:"probe pk" desc:"probe pk in segment"`
	CollectionID        int64    `name:"collection" default:"0" desc:"collection id to probe"`
	PK                  string   `name:"pk" default:"" desc:"pk value to probe"`
	OutputFields        []string `name:"outputField" default:"" desc:"output fields list"`
	MvccTimestamp       int64    `name:"mvccTimestamp" default:"0" desc:"mvcc timestamp to probe"`
}

type PulsarctlParam

type PulsarctlParam struct {
	framework.ParamBase `use:"pulsarctl" desc:"connect to pulsar admin with pulsarctl"`
	Address             string `name:"addr" default:"http://localhost:18080" desc:"pulsar admin address"`
	AuthPlugin          string `name:"authPlugin" default:"" desc:"pulsar admin auth plugin"`
	AuthParam           string `name:"authParam" default:"" desc:"pulsar admin auth parameters"`
}

type ScanBinlogParams

type ScanBinlogParams struct {
	framework.ParamBase `use:"scan-binlog" desc:"scan binlog to check data"`
	CollectionID        int64    `name:"collection" default:"0"`
	PartitionID         int64    `name:"partition" default:"0"`
	SegmentID           int64    `name:"segment" default:"0"`
	Fields              []string `name:"fields"`
	Expr                string   `name:"expr"`
	MinioAddress        string   `name:"minioAddr"`
	SkipBucketCheck     bool     `name:"skipBucketCheck" default:"false" desc:"skip bucket exist check due to permission issue"`
	Action              string   `name:"action" default:"count"`
	IgnoreDelete        bool     `name:"ignoreDelete" default:"false" desc:"ignore delete logic"`
	IncludeUnhealthy    bool     `name:"includeUnhealthy" default:"false" desc:"also check dropped segments"`
	WorkerNum           int64    `name:"workerNum" default:"4" desc:"worker num"`
	OutputLimit         int64    `name:"outputLimit" default:"10" desc:"output limit"`
}

type ScanDeltalogParams

type ScanDeltalogParams struct {
	framework.ParamBase `use:"scan-deltalog" desc:"scan deltalog to check delta data"`
	CollectionID        int64    `name:"collection" default:"0"`
	SegmentID           int64    `name:"segment" default:"0"`
	Fields              []string `name:"fields"`
	Expr                string   `name:"expr"`
	MinioAddress        string   `name:"minioAddr"`
	SkipBucketCheck     bool     `name:"skipBucketCheck" default:"false" desc:"skip bucket exist check due to permission issue"`
	Action              string   `name:"action" default:"count"`
	Limit               int64    `name:"limit" default:"0" desc:"limit the scan line number if action is locate"`
	IncludeUnhealthy    bool     `name:"includeUnhealthy" default:"false" desc:"also check dropped segments"`
}

type ScoreBalanceParam

type ScoreBalanceParam struct {
	UnbalanceTolerationFactor        float64
	ReverseUnbalanceTolerationFactor float64
	// contains filtered or unexported fields
}

type SegmentItem

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

type SetConfigParam

type SetConfigParam struct {
	framework.ParamBase `use:"set bw-config" desc:"set birdwatcher config"`
	Key                 string `name:"key" default:""`
	Value               string `name:"value" default:""`
	Source              string `name:"source" default:"env" desc:"config source, default is env"`
}

type SetCurrentVersionParam

type SetCurrentVersionParam struct {
	framework.ParamBase `use:"set current-version" desc:"set current version for etcd meta parsing"`
	// contains filtered or unexported fields
}

func (*SetCurrentVersionParam) ParseArgs

func (p *SetCurrentVersionParam) ParseArgs(args []string) error

type ShowCurrentVersionParam

type ShowCurrentVersionParam struct {
	framework.ParamBase `use:"show current-version" desc:"display current Milvus Meta data version"`
}

type SliceMeta

type SliceMeta struct {
	Meta []struct {
		Name        string `json:"name"`
		SliceNum    int    `json:"slice_num"`
		TotalLength int64  `json:"total_len"`
	} `json:"meta"`
}

type StorageAnalysisParam

type StorageAnalysisParam struct {
	framework.ParamBase `use:"storage-analysis" desc:"segment storage analysis" require:"etcd,minio"`
	CollectionID        int64 `name:"collection" default:"0" desc:"collection id to analysis"`
	Detail              bool  `name:"detail" default:"false" desc:"print detailed binlog size info"`
}

type TestMinioCfgParam

type TestMinioCfgParam struct {
	framework.ParamBase `use:"test-minio-cfg"`
	// *MinioConnectParam
	MinioAddress  string `name:"minioAddress"`
	MinioPasswd   string `name:"minioPassword"`
	MinioUserName string `name:"minioUsername"`
}

type UseParam

type UseParam struct {
	framework.ParamBase `use:"use [instance-name]" desc:"use specified milvus instance"`

	Force    bool   `name:"force" default:"false" desc:"force connect ignoring ping result"`
	MetaPath string `name:"metaPath" default:"meta" desc:"meta path prefix"`
	// contains filtered or unexported fields
}

func (*UseParam) ParseArgs

func (p *UseParam) ParseArgs(args []string) error

type ValidateIndexParam

type ValidateIndexParam struct {
	framework.ParamBase `use:"validate-indexfiles [directory]" desc:"validate index file size"`
	// contains filtered or unexported fields
}

func (*ValidateIndexParam) ParseArgs

func (p *ValidateIndexParam) ParseArgs(args []string) error

type WALMessageIDParam

type WALMessageIDParam struct {
	framework.ParamBase `use:"parse-wal-message-id" desc:"parse wal message id from binary"`
	IDBinary            string `name:"id-binary" default:"" desc:"string of binary message id"`
	WALName             string `name:"wal-name" default:"" desc:"a hint of wal name, auto guess if not provided"`
}

Directories

Path Synopsis
set

Jump to

Keyboard shortcuts

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