xreg

package
v1.3.19 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package xreg provides registry and (renew, find) functions for AIS eXtended Actions (xactions).

  • Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.

Package xreg provides registry and (renew, find) functions for AIS eXtended Actions (xactions).

  • Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.

Package xreg provides registry and (renew, find) functions for AIS eXtended Actions (xactions).

  • Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.

Package xreg provides registry and (renew, find) functions for AIS eXtended Actions (xactions).

  • Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.

Package xreg provides registry and (renew, find) functions for AIS eXtended Actions (xactions).

  • Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.

Index

Constants

View Source
const (
	WprAbort = iota + 1
	WprUse
	WprKeepAndStartNew
)

Variables

This section is empty.

Functions

func AbortAll

func AbortAll(err error, scope ...int)

AbortAll waits until abort of all xactions is finished Every abort is done asynchronously

func AbortAllBuckets

func AbortAllBuckets(err error, bcks ...*meta.Bck)

func AbortAllMountpathsXactions

func AbortAllMountpathsXactions()

func AbortKind

func AbortKind(err error, kind string)

func DoAbort

func DoAbort(flt Flt, err error) (bool, error)

func GetAllRunning

func GetAllRunning(kind string, separateIdle bool) ([]string, []string)

func GetRebMarked

func GetRebMarked() (out xact.Marked)

func GetResilverMarked

func GetResilverMarked() (out xact.Marked)

func GetSnap

func GetSnap(flt Flt) ([]*cluster.Snap, error)

func GetXact

func GetXact(uuid string) (cluster.Xact, error)

func Init

func Init()

func LimitedCoexistence

func LimitedCoexistence(tsi *meta.Snode, bck *meta.Bck, action string, otherBck ...*meta.Bck) (err error)

func RegBckXact

func RegBckXact(entry Renewable)

func RegNonBckXact

func RegNonBckXact(entry Renewable)

func RegWithHK

func RegWithHK()

register w/housekeeper periodic registry cleanups

func RenewMakeNCopies

func RenewMakeNCopies(t cluster.Target, uuid, tag string)

func RenewResilver

func RenewResilver(id string) cluster.Xact

func TestReset

func TestReset()

Types

type Args

type Args struct {
	T      cluster.Target
	Custom any // Additional arguments that are specific for a given xact.
	UUID   string
}

used in constructions

type BckRenameArgs

type BckRenameArgs struct {
	T       cluster.TargetExt
	BckFrom *meta.Bck
	BckTo   *meta.Bck
	RebID   string
	Phase   string
}

type ECEncodeArgs

type ECEncodeArgs struct {
	Phase string
}

type Flt

type Flt struct {
	Bck         *meta.Bck
	OnlyRunning *bool
	ID          string
	Kind        string
	Buckets     []*meta.Bck
}

simplified non-JSON QueryMsg (internal AIS use)

func (Flt) Matches

func (flt Flt) Matches(xctn cluster.Xact) (yes bool)

func (*Flt) String

func (flt *Flt) String() string

type MNCArgs

type MNCArgs struct {
	Tag    string
	Copies int
}

type RenewBase

type RenewBase struct {
	Args
	Bck *meta.Bck
}

func (*RenewBase) Bucket

func (r *RenewBase) Bucket() *meta.Bck

func (*RenewBase) Str

func (r *RenewBase) Str(kind string) string

func (*RenewBase) UUID

func (r *RenewBase) UUID() string

type RenewRes

type RenewRes struct {
	Entry Renewable // Depending on situation can be new or old entry.
	Err   error     // Error that occurred during renewal.
	UUID  string    // "" if a new entry has been created, ID of the existing xaction otherwise
}

Represents result of renewing given xact.

func RenewBckLoadLomCache

func RenewBckLoadLomCache(t cluster.Target, uuid string, bck *meta.Bck) RenewRes

func RenewBckMakeNCopies

func RenewBckMakeNCopies(t cluster.Target, bck *meta.Bck, uuid, tag string, copies int) (res RenewRes)

func RenewBckRename

func RenewBckRename(t cluster.TargetExt, bckFrom, bckTo *meta.Bck, uuid string, rmdVersion int64, phase string) RenewRes

func RenewBckSummary

func RenewBckSummary(t cluster.Target, bck *meta.Bck, msg *apc.BsummCtrlMsg) RenewRes

func RenewBucketXact

func RenewBucketXact(kind string, bck *meta.Bck, args Args, buckets ...*meta.Bck) (res RenewRes)

RenewBucketXact is general function to renew bucket xaction without any additional or specific parameters.

func RenewDownloader

func RenewDownloader(t cluster.Target, statsT stats.Tracker, xid string) RenewRes

func RenewECEncode

func RenewECEncode(t cluster.Target, bck *meta.Bck, uuid, phase string) RenewRes

func RenewETL

func RenewETL(t cluster.Target, msg any, xid string) RenewRes

func RenewElection

func RenewElection() RenewRes

func RenewEvictDelete

func RenewEvictDelete(uuid string, t cluster.Target, kind string, bck *meta.Bck, msg *apc.ListRange) RenewRes

func RenewLRU

func RenewLRU(id string) RenewRes

func RenewLso

func RenewLso(t cluster.Target, bck *meta.Bck, uuid string, msg *apc.LsoMsg) RenewRes

func RenewPrefetch

func RenewPrefetch(uuid string, t cluster.Target, bck *meta.Bck, msg *apc.ListRange) RenewRes

func RenewPromote

func RenewPromote(t cluster.Target, uuid string, bck *meta.Bck, args *cluster.PromoteArgs) RenewRes

func RenewPutArchive

func RenewPutArchive(uuid string, t cluster.Target, bckFrom, bckTo *meta.Bck) RenewRes

func RenewPutMirror

func RenewPutMirror(t cluster.Target, lom *cluster.LOM) RenewRes

func RenewRebalance

func RenewRebalance(id int64) RenewRes

func RenewStoreCleanup

func RenewStoreCleanup(id string) RenewRes

func RenewTCB

func RenewTCB(t cluster.Target, uuid, kind string, custom *TCBArgs) RenewRes

func RenewTCObjs

func RenewTCObjs(t cluster.Target, uuid, kind string, custom *TCObjsArgs) RenewRes

func (*RenewRes) IsRunning

func (rns *RenewRes) IsRunning() bool

type Renewable

type Renewable interface {
	New(args Args, bck *meta.Bck) Renewable // new xaction stub that can be `Start`-ed.
	Start() error                           // starts an xaction, will be called when entry is stored into registry
	Kind() string
	Get() cluster.Xact
	WhenPrevIsRunning(prevEntry Renewable) (action WPR, err error)
	Bucket() *meta.Bck
	UUID() string
}

func GetLatest

func GetLatest(flt Flt) Renewable

NOTE: relies on the find() to walk in the newer --> older order

func GetRunning

func GetRunning(flt Flt) Renewable

type TCBArgs

type TCBArgs struct {
	DP      cluster.DP
	BckFrom *meta.Bck
	BckTo   *meta.Bck
	Msg     *apc.TCBMsg
	Phase   string
}

type TCObjsArgs

type TCObjsArgs struct {
	BckFrom *meta.Bck
	BckTo   *meta.Bck
	DP      cluster.DP
}

type WPR

type WPR int

Jump to

Keyboard shortcuts

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