xreg

package
v1.3.22 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 18 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-2024, 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) 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

View Source
var (
	PrimeTime atomic.Int64
	MyTime    atomic.Int64
)

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 AbortByNewReb added in v1.3.21

func AbortByNewReb(err error)

func AbortKind added in v1.3.16

func AbortKind(err error, kind string)

func DoAbort

func DoAbort(flt Flt, err error)

func GenBEID added in v1.3.19

func GenBEID(div uint64, tag string) (beid string, xctn core.Xact, err error)

"best-effort ID" - to independently and locally generate globally unique xaction ID

func GetAllRunning added in v1.3.16

func GetAllRunning(inout *core.AllRunningInOut, periodic bool)

func GetRebMarked

func GetRebMarked() (out xact.Marked)

func GetResilverMarked

func GetResilverMarked() (out xact.Marked)

func GetSnap

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

func GetXact

func GetXact(uuid string) (core.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(uuid, tag string)

func RenewResilver

func RenewResilver(id string) core.Xact

func TestReset

func TestReset()

Types

type Args

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

used in constructions

type BckRenameArgs

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

type DsortArgs added in v1.3.19

type DsortArgs struct {
	BckFrom *meta.Bck
	BckTo   *meta.Bck
}

type ECEncodeArgs

type ECEncodeArgs struct {
	Phase string
}

type Flt added in v1.3.16

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 added in v1.3.16

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

func (*Flt) String added in v1.3.16

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(uuid string, bck *meta.Bck) RenewRes

func RenewBckMakeNCopies

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

func RenewBckRename

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

func RenewBckSummary

func RenewBckSummary(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(xid string, bck *meta.Bck) RenewRes

func RenewDsort added in v1.3.19

func RenewDsort(id string, custom *DsortArgs) RenewRes

func RenewECEncode

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

func RenewETL

func RenewETL(msg any, xid string) RenewRes

func RenewElection

func RenewElection() RenewRes

func RenewEvictDelete

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

func RenewLRU

func RenewLRU(id string) RenewRes

func RenewLso

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

func RenewPrefetch

func RenewPrefetch(uuid string, bck *meta.Bck, msg *apc.PrefetchMsg) RenewRes

func RenewPromote

func RenewPromote(uuid string, bck *meta.Bck, args *apc.PromoteArgs) RenewRes

func RenewPutArchive

func RenewPutArchive(bckFrom, bckTo *meta.Bck) RenewRes

func RenewPutMirror

func RenewPutMirror(lom *core.LOM) RenewRes

func RenewRebalance

func RenewRebalance(id int64) RenewRes

func RenewStoreCleanup

func RenewStoreCleanup(id string) RenewRes

func RenewTCB

func RenewTCB(uuid, kind string, custom *TCBArgs) RenewRes

func RenewTCObjs

func RenewTCObjs(kind string, custom *TCObjsArgs) RenewRes

kind: (apc.ActCopyObjects | apc.ActETLObjects)

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() core.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      core.DP
	BckFrom *meta.Bck
	BckTo   *meta.Bck
	Msg     *apc.TCBMsg
	Phase   string
}

type TCObjsArgs

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

type WPR

type WPR int

Jump to

Keyboard shortcuts

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