xreg

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  • Copyright (c) 2018-2026, 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
)

GenBEID vars (see xact/xreg/uuid)

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 []byte) (beid string, xctn core.Xact, err error)

"best-effort ID" - to independently and locally generate globally unique xaction ID see related: cmn/cos/uuid.go

func GetActiveXact added in v1.3.30

func GetActiveXact(uuid string) (xctn core.Xact)

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 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 {
	TCBArgs
}

type DsortArgs added in v1.3.19

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

type ECEncodeArgs

type ECEncodeArgs struct {
	Phase   string
	Recover bool
}

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

type LsoArgs struct {
	Msg *apc.LsoMsg
	Hdr http.Header
}

type MNCArgs

type MNCArgs struct {
	Tag    string
	Copies int
}

type RebArgs added in v1.3.31

type RebArgs struct {
	Bck    *meta.Bck // (limited-scope)
	Prefix string    // (ditto)
	Flags  uint32    // = xact.ArgsMsg.Flags
}

type RechunkArgs added in v1.4.1

type RechunkArgs struct {
	ObjSizeLimit int64
	ChunkSize    int64
	Prefix       string
}

type RenewBase

type RenewBase struct {
	Bck *meta.Bck
	Args
}

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

func RenewBckRechunks(bck *meta.Bck, uuid string, args *RechunkArgs) RenewRes

func RenewBckRename

func RenewBckRename(bckFrom, bckTo *meta.Bck, uuid, 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, checkAndRecover bool) 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.EvdMsg) RenewRes

func RenewGetBatch added in v1.3.30

func RenewGetBatch(bck *meta.Bck, uuid string, designated bool) RenewRes

func RenewLRU

func RenewLRU(id, ctlmsg string) RenewRes

func RenewLso

func RenewLso(bck *meta.Bck, uuid string, msg *apc.LsoMsg, hdr http.Header) 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, args *RebArgs) RenewRes

func RenewResilver

func RenewResilver(id string, args *ResArgs) RenewRes

func RenewStoreCleanup

func RenewStoreCleanup(id, ctlmsg string) RenewRes

func RenewTCB

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

func RenewTCObjs

func RenewTCObjs(kind string, custom *TCOArgs) RenewRes

kind: (apc.ActCopyObjects | apc.ActETLObjects)

func (*RenewRes) IsRunning

func (rns *RenewRes) IsRunning() bool

note: for a newly constructed instance x-registry always returns RenewRes{Entry: entry} with empty rns.UUID in other words, IsRunning() can only be true when we are using xprev

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

type ResArgs struct {
	Config *cmn.Config
	Smap   *meta.Smap
}

type TCBArgs

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

type TCOArgs added in v1.3.28

type TCOArgs struct {
	BckFrom   *meta.Bck
	BckTo     *meta.Bck
	Msg       *apc.TCOMsg
	DisableDM bool
}

type WPR

type WPR int

Jump to

Keyboard shortcuts

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