Documentation
¶
Overview ¶
Package xact provides core functionality for the AIStore eXtended Actions (xactions).
- Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
Package xact provides core functionality for the AIStore eXtended Actions (xactions).
- Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
Package xact provides core functionality for the AIStore eXtended Actions (xactions).
- Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
Package xact provides core functionality for the AIStore eXtended Actions (xactions).
- Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
Package xact provides core functionality for the AIStore eXtended Actions (xactions).
- Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
Package xact provides core functionality for the AIStore eXtended Actions (xactions).
- Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.
Index ¶
- Constants
- Variables
- func CompareRebIDs(someID, fltID string) int
- func GetKindName(kindOrName string) (kind, name string)
- func GoRunW(xctn cluster.Xact)
- func IdlesBeforeFinishing(kindOrName string) bool
- func IsMountpath(kind string) bool
- func IsSameScope(kindOrName string, scs ...int) bool
- func IsValidKind(kind string) bool
- func IsValidRebID(id string) (valid bool)
- func IsValidUUID(id string) bool
- func ListDisplayNames(onlyStartable bool) (names []string)
- func RebID2S(id int64) string
- func RefcntQuiCB(refc *atomic.Int32, maxTimeout, totalSoFar time.Duration) cluster.QuiRes
- func S2RebID(id string) (int64, error)
- type ArgsMsg
- type Base
- func (xctn *Base) Abort(err error) (ok bool)
- func (xctn *Base) AbortErr() (err error)
- func (xctn *Base) AbortedAfter(d time.Duration) (err error)
- func (xctn *Base) AddNotif(n cluster.Notif)
- func (xctn *Base) Bck() *meta.Bck
- func (xctn *Base) Bytes() int64
- func (xctn *Base) ChanAbort() <-chan error
- func (xctn *Base) EndTime() time.Time
- func (xctn *Base) Finish(err error)
- func (xctn *Base) Finished() bool
- func (*Base) FromTo() (*meta.Bck, *meta.Bck)
- func (xctn *Base) ID() string
- func (xctn *Base) InBytes() int64
- func (xctn *Base) InMaintOrDecomm(smap *meta.Smap, tsi *meta.Snode) (err error)
- func (xctn *Base) InObjs() int64
- func (xctn *Base) InObjsAdd(cnt int, size int64)
- func (xctn *Base) InitBase(id, kind string, bck *meta.Bck)
- func (xctn *Base) IsAborted() bool
- func (xctn *Base) IsIdle() bool
- func (xctn *Base) Kind() string
- func (xctn *Base) LomAdd(lom *cluster.LOM)
- func (xctn *Base) Name() (s string)
- func (xctn *Base) Objs() int64
- func (xctn *Base) ObjsAdd(cnt int, size int64)
- func (xctn *Base) OutBytes() int64
- func (xctn *Base) OutObjs() int64
- func (xctn *Base) OutObjsAdd(cnt int, size int64)
- func (xctn *Base) Quiesce(d time.Duration, cb cluster.QuiCB) cluster.QuiRes
- func (*Base) Result() (any, error)
- func (xctn *Base) Running() (yes bool)
- func (xctn *Base) StartTime() time.Time
- func (xctn *Base) String() string
- func (xctn *Base) ToSnap(snap *cluster.Snap)
- func (xctn *Base) ToStats(stats *cluster.Stats)
- type BckJog
- type Demand
- type DemandBase
- func (r *DemandBase) Abort(err error) (ok bool)
- func (r *DemandBase) DecPending()
- func (r *DemandBase) IdleTimer() <-chan struct{}
- func (r *DemandBase) IncPending()
- func (r *DemandBase) Init(uuid, kind string, bck *meta.Bck, idle time.Duration) (xdb *DemandBase)
- func (r *DemandBase) IsIdle() bool
- func (r *DemandBase) Pending() (cnt int64)
- func (r *DemandBase) Stop()
- func (r *DemandBase) SubPending(n int)
- type Descriptor
- type Marked
- type MultiSnap
- func (xs MultiSnap) ByteCounts(xid string) (locBytes, outBytes, inBytes int64)
- func (xs MultiSnap) GetUUIDs() []string
- func (xs MultiSnap) IsAborted(xid string) (bool, error)
- func (xs MultiSnap) IsIdle(xid string) (found, idle bool)
- func (xs MultiSnap) ObjCounts(xid string) (locObjs, outObjs, inObjs int64)
- func (xs MultiSnap) RunningTarget(xid string) (string, *cluster.Snap, error)
- func (xs MultiSnap) TotalRunningTime(xid string) (time.Duration, error)
- type NotifXact
- type NotifXactListener
- type QueryMsg
Constants ¶
const ( ScopeG = iota + 1 // cluster ScopeB // bucket ScopeGB // (one bucket) | (all buckets) ScopeT // target )
const ( LeftID = "[" RightID = "]" )
const ( DefWaitTimeShort = time.Minute // zero `ArgsMsg.Timeout` defaults to DefWaitTimeLong = 7 * 24 * time.Hour // when `ArgsMsg.Timeout` is negative MaxProbingFreq = 30 * time.Second // as the name implies MinPollTime = 2 * time.Second // ditto MaxPollTime = 2 * time.Minute // can grow up to NumConsecutiveIdle = 3 // number of consecutive 'idle' states (to exclude false-positive "is idle") )
global waiting tunables (used in: `api.WaitForXactionIC` and `api.WaitForXactionNode`)
const UUIDSepa = ","
Variables ¶
var IncFinished func()
var Table = map[string]Descriptor{ apc.ActElection: {DisplayName: "elect-primary", Scope: ScopeG, Startable: false}, apc.ActRebalance: {Scope: ScopeG, Startable: true, Metasync: true, Owned: false, Mountpath: true, Rebalance: true}, apc.ActDownload: {Scope: ScopeG, Startable: false, Mountpath: true, Idles: true}, apc.ActETLInline: {Scope: ScopeG, Startable: false, Mountpath: false}, apc.ActLRU: {DisplayName: "lru-eviction", Scope: ScopeGB, Startable: true, Mountpath: true}, apc.ActStoreCleanup: {DisplayName: "cleanup", Scope: ScopeGB, Startable: true, Mountpath: true}, apc.ActSummaryBck: { DisplayName: "summary", Scope: ScopeGB, Access: apc.AceObjLIST | apc.AceBckHEAD, Startable: false, Metasync: false, Owned: true, Mountpath: true, }, apc.ActResilver: {Scope: ScopeT, Startable: true, Mountpath: true, Resilver: true}, apc.ActECGet: {Scope: ScopeB, Startable: false, Idles: true}, apc.ActECPut: {Scope: ScopeB, Startable: false, Mountpath: true, RefreshCap: true, Idles: true}, apc.ActECRespond: {Scope: ScopeB, Startable: false, Idles: true}, apc.ActPutCopies: {Scope: ScopeB, Startable: false, Mountpath: true, RefreshCap: true, Idles: true}, apc.ActArchive: {Scope: ScopeB, Startable: false, RefreshCap: true, Idles: true}, apc.ActCopyObjects: {DisplayName: "copy-objects", Scope: ScopeB, Startable: false, RefreshCap: true, Idles: true}, apc.ActETLObjects: {DisplayName: "etl-objects", Scope: ScopeB, Startable: false, RefreshCap: true, Idles: true}, apc.ActPromote: {DisplayName: "promote-files", Scope: ScopeB, Access: apc.AcePromote, Startable: false, RefreshCap: true}, apc.ActEvictObjects: { DisplayName: "evict-objects", Scope: ScopeB, Access: apc.AceObjDELETE, Startable: false, RefreshCap: true, Mountpath: true, }, apc.ActDeleteObjects: { DisplayName: "delete-objects", Scope: ScopeB, Access: apc.AceObjDELETE, Startable: false, RefreshCap: true, Mountpath: true, }, apc.ActPrefetchObjects: { DisplayName: "prefetch-objects", Scope: ScopeB, Access: apc.AccessRW, Startable: true, RefreshCap: true, }, apc.ActECEncode: { DisplayName: "ec-bucket", Scope: ScopeB, Access: apc.AccessRW, Startable: true, Metasync: true, Owned: false, RefreshCap: true, Mountpath: true, MassiveBck: true, }, apc.ActMakeNCopies: { DisplayName: "mirror", Scope: ScopeB, Access: apc.AccessRW, Startable: true, Metasync: true, Owned: false, RefreshCap: true, Mountpath: true, }, apc.ActMoveBck: { DisplayName: "rename-bucket", Scope: ScopeB, Access: apc.AceMoveBucket, Startable: false, Metasync: true, Owned: false, Mountpath: true, Rebalance: true, MassiveBck: true, }, apc.ActCopyBck: { DisplayName: "copy-bucket", Scope: ScopeB, Access: apc.AccessRW, Startable: false, Metasync: true, Owned: false, RefreshCap: true, Mountpath: true, MassiveBck: true, }, apc.ActETLBck: { DisplayName: "etl-bucket", Scope: ScopeB, Access: apc.AccessRW, Startable: false, Metasync: true, Owned: false, RefreshCap: true, Mountpath: true, MassiveBck: true, }, apc.ActList: {Scope: ScopeB, Access: apc.AceObjLIST, Startable: false, Metasync: false, Owned: true, Idles: true}, apc.ActLoadLomCache: {DisplayName: "warm-up-metadata", Scope: ScopeB, Startable: true, Mountpath: true}, apc.ActInvalListCache: {Scope: ScopeB, Access: apc.AceObjLIST, Startable: false}, }
`xact.Table` is a static, public, and global Kind=>[Xaction Descriptor] map that contains xaction kinds and static properties, such as `Startable`, `Owned`, etc. In particular, "startability" is narrowly defined as ability to start xaction via `api.StartXaction` (whereby copying bucket, for instance, requires a separate `api.CopyBucket`, etc.)
Functions ¶
func CompareRebIDs ¶
func GetKindName ¶
func IdlesBeforeFinishing ¶
func IsMountpath ¶
func IsSameScope ¶
func IsValidKind ¶
func IsValidRebID ¶
func IsValidUUID ¶
func ListDisplayNames ¶
func RefcntQuiCB ¶
common ref-counted quiescence
Types ¶
type ArgsMsg ¶
type ArgsMsg struct { ID string // xaction UUID Kind string // xaction kind _or_ name (see `xact.Table`) // optional parameters to further narrow down or filter-out xactions in question DaemonID string // node that runs this xaction Bck cmn.Bck // bucket Buckets []cmn.Bck // list of buckets (e.g., copy-bucket, lru-evict, etc.) Timeout time.Duration // max time to wait and other "non-filters" Force bool // force OnlyRunning bool // look only for running xactions }
either xaction ID or Kind must be specified is getting passed via ActMsg.Value w/ MorphMarshal extraction
type Base ¶
type Base struct {
// contains filtered or unexported fields
}
func (*Base) InMaintOrDecomm ¶
func (*Base) OutObjsAdd ¶
func (*Base) Quiesce ¶
count all the way to duration; reset and adjust every time activity is detected
type BckJog ¶
type BckJog struct { Base // contains filtered or unexported fields }
type Demand ¶
type Demand interface { cluster.Xact IdleTimer() <-chan struct{} IncPending() DecPending() SubPending(n int) }
xaction that self-terminates after staying idle for a while with an added capability to renew itself and ref-count its pending work
type DemandBase ¶
type DemandBase struct { Base // contains filtered or unexported fields }
func (*DemandBase) Abort ¶
func (r *DemandBase) Abort(err error) (ok bool)
func (*DemandBase) DecPending ¶
func (r *DemandBase) DecPending()
func (*DemandBase) IdleTimer ¶
func (r *DemandBase) IdleTimer() <-chan struct{}
func (*DemandBase) IncPending ¶
func (r *DemandBase) IncPending()
func (*DemandBase) Init ¶
func (r *DemandBase) Init(uuid, kind string, bck *meta.Bck, idle time.Duration) (xdb *DemandBase)
func (*DemandBase) Pending ¶
func (r *DemandBase) Pending() (cnt int64)
func (*DemandBase) Stop ¶
func (r *DemandBase) Stop()
func (*DemandBase) SubPending ¶
func (r *DemandBase) SubPending(n int)
type Descriptor ¶
type Descriptor struct { DisplayName string // as implied Access apc.AccessAttrs // access permissions (see: apc.Access*) Scope int // ScopeG (global), etc. - the enum above Startable bool // true if user can start this xaction (e.g., via `api.StartXaction`) Metasync bool // true if this xaction changes (and metasyncs) cluster metadata Owned bool // (for definition, see ais/ic.go) RefreshCap bool // refresh capacity stats upon completion Mountpath bool // is a mountpath-traversing ("jogger") xaction // see xreg for "limited coexistence" Rebalance bool // moves data between nodes Resilver bool // moves data between mountpaths MassiveBck bool // massive data copying (transforming, encoding) operation on a bucket // xaction has an intermediate `idle` state whereby it becomes `idle` in-between // requests - typically, for up to a few dozen seconds prior to finishing // (see also: xact/demand.go) Idles bool }
func GetDescriptor ¶
func GetDescriptor(kindOrName string) (string, Descriptor, error)
type MultiSnap ¶
primarily: `api.QueryXactionSnaps`
func (MultiSnap) ByteCounts ¶
func (MultiSnap) RunningTarget ¶
type NotifXact ¶
func (*NotifXact) ToNotifMsg ¶
type NotifXactListener ¶
type NotifXactListener struct {
nl.ListenerBase
}
func (*NotifXactListener) QueryArgs ¶
func (nxb *NotifXactListener) QueryArgs() cmn.HreqArgs
func (*NotifXactListener) UnmarshalStats ¶
func (*NotifXactListener) UnmarshalStats(rawMsg []byte) (stats any, finished, aborted bool, err error)
Directories
¶
Path | Synopsis |
---|---|
Package xreg provides registry and (renew, find) functions for AIS eXtended Actions (xactions).
|
Package xreg provides registry and (renew, find) functions for AIS eXtended Actions (xactions). |
Package xs is a collection of eXtended actions (xactions), including multi-object operations, list-objects, (cluster) rebalance and (target) resilver, ETL, and more.
|
Package xs is a collection of eXtended actions (xactions), including multi-object operations, list-objects, (cluster) rebalance and (target) resilver, ETL, and more. |