Documentation ¶
Overview ¶
Package xact provides core functionality for the AIStore eXtended Actions (xactions).
- Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.
Package xact provides core functionality for the AIStore eXtended Actions (xactions).
- Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.
Package xact provides core functionality for the AIStore eXtended Actions (xactions).
- Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.
Package xact provides core functionality for the AIStore eXtended Actions (xactions).
- Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.
Package xact provides core functionality for the AIStore eXtended Actions (xactions).
- Copyright (c) 2018-2024, 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 Cname(kind, uuid string) string
- func CompareRebIDs(someID, fltID string) int
- func GetKindName(kindOrName string) (kind, name string)
- func GoRunW(xctn core.Xact)
- func IdlesBeforeFinishing(kindOrName 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 ParseCname(cname string) (xactKind, xactID string, _ error)
- func RebID2S(id int64) string
- func RefcntQuiCB(refc *atomic.Int32, maxTimeout, totalSoFar time.Duration) core.QuiRes
- func S2RebID(id string) (int64, error)
- type ArgsMsg
- type Base
- func (xctn *Base) Abort(err error) bool
- func (xctn *Base) AbortErr() error
- func (xctn *Base) AbortedAfter(d time.Duration) (err error)
- func (xctn *Base) AddErr(err error, logExtra ...int)
- func (xctn *Base) AddNotif(n core.Notif)
- func (xctn *Base) Bck() *meta.Bck
- func (xctn *Base) Bytes() int64
- func (xctn *Base) ChanAbort() <-chan error
- func (xctn *Base) Cname() string
- func (xctn *Base) EndTime() time.Time
- func (xctn *Base) Err() error
- func (xctn *Base) ErrCnt() int
- func (xctn *Base) Finish()
- 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) 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) JoinErr() (int, error)
- func (xctn *Base) Kind() string
- func (xctn *Base) LomAdd(lom *core.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 core.QuiCB) core.QuiRes
- func (xctn *Base) Running() (yes bool)
- func (xctn *Base) StartTime() time.Time
- func (xctn *Base) String() string
- func (xctn *Base) ToSnap(snap *core.Snap)
- func (xctn *Base) ToStats(stats *core.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, idleDur time.Duration)
- func (r *DemandBase) IsIdle() bool
- func (r *DemandBase) Pending() (cnt int64)
- func (r *DemandBase) Reset(idleTime time.Duration)
- 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) IsIdle(xid string) (aborted, running, notstarted bool)
- func (xs MultiSnap) ObjCounts(xid string) (locObjs, outObjs, inObjs int64)
- func (xs MultiSnap) RunningTarget(xid string) (string, *core.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 ( SepaID = "," 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 // number of consecutive 'idle' xaction states, with possible numeric // values translating as follows: // 1: fully rely on xact.IsIdle() logic with no extra checks whatsoever // 2: one additional IsIdle() call after MinPollTime // 3: two additional IsIdle() calls spaced at MinPollTime interval, and so on. NumConsecutiveIdle = 2 )
global waiting tunables (used in: `api.WaitForXactionIC` and `api.WaitForXactionNode`)
const (
IdleDefault = time.Minute // hk -> idle tick
)
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, Rebalance: true}, apc.ActETLInline: {Scope: ScopeG, Startable: false, AbortRebRes: true}, apc.ActLRU: {DisplayName: "lru-eviction", Scope: ScopeGB, Startable: true}, apc.ActStoreCleanup: {DisplayName: "cleanup", Scope: ScopeGB, Startable: true}, apc.ActSummaryBck: { DisplayName: "summary", Scope: ScopeGB, Access: apc.AceObjLIST | apc.AceBckHEAD, Startable: false, Metasync: false, }, apc.ActResilver: {Scope: ScopeT, Startable: true, Resilver: true}, apc.ActECGet: {Scope: ScopeB, Startable: false, Idles: true, ExtendedStats: true}, apc.ActECPut: {Scope: ScopeB, Startable: false, RefreshCap: true, Idles: true, ExtendedStats: true}, apc.ActECRespond: {Scope: ScopeB, Startable: false, Idles: true}, apc.ActPutCopies: {Scope: ScopeB, Startable: false, RefreshCap: true, Idles: true}, apc.ActArchive: {Scope: ScopeB, Access: apc.AccessRW, Startable: false, RefreshCap: true, Idles: true}, apc.ActCopyObjects: { DisplayName: "copy-objects", Scope: ScopeB, Access: apc.AccessRW, Startable: false, RefreshCap: true, Idles: true, }, apc.ActETLObjects: { DisplayName: "etl-objects", Scope: ScopeB, Access: apc.AccessRW, Startable: false, RefreshCap: true, Idles: true, AbortRebRes: true, }, apc.ActBlobDl: {Access: apc.AccessRW, Scope: ScopeB, Startable: true, AbortRebRes: true, RefreshCap: true}, apc.ActDownload: {Access: apc.AccessRW, Scope: ScopeG, Startable: false, Idles: true, AbortRebRes: true}, apc.ActDsort: { DisplayName: "dsort", Scope: ScopeB, Access: apc.AccessRW, Startable: false, RefreshCap: true, ConflictRebRes: true, ExtendedStats: true, AbortRebRes: 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, }, apc.ActDeleteObjects: { DisplayName: "delete-objects", Scope: ScopeB, Access: apc.AceObjDELETE, Startable: false, RefreshCap: 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, RefreshCap: true, ConflictRebRes: true, }, apc.ActMakeNCopies: { DisplayName: "mirror", Scope: ScopeB, Access: apc.AccessRW, Startable: true, Metasync: true, RefreshCap: true, }, apc.ActMoveBck: { DisplayName: "rename-bucket", Scope: ScopeB, Access: apc.AceMoveBucket, Startable: false, Metasync: true, Rebalance: true, ConflictRebRes: true, }, apc.ActCopyBck: { DisplayName: "copy-bucket", Scope: ScopeB, Access: apc.AccessRW, Startable: false, Metasync: true, RefreshCap: true, ConflictRebRes: true, }, apc.ActETLBck: { DisplayName: "etl-bucket", Scope: ScopeB, Access: apc.AccessRW, Startable: false, Metasync: true, RefreshCap: true, AbortRebRes: true, }, apc.ActList: {Scope: ScopeB, Access: apc.AceObjLIST, Startable: false, Metasync: false, Idles: true}, apc.ActLoadLomCache: {DisplayName: "warm-up-metadata", Scope: ScopeB, Startable: 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 ¶ added in v1.3.16
func IdlesBeforeFinishing ¶ added in v1.3.16
func IsSameScope ¶ added in v1.3.16
func IsValidKind ¶
func IsValidRebID ¶
func IsValidUUID ¶ added in v1.3.16
func ListDisplayNames ¶ added in v1.3.16
func ParseCname ¶ added in v1.3.22
func RefcntQuiCB ¶
common ref-counted quiescence
Types ¶
type ArgsMsg ¶ added in v1.3.16
type ArgsMsg struct { ID string // xaction UUID Kind string // xaction kind _or_ name (see `xact.Table`) // optional parameters 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 Force bool // force OnlyRunning bool // 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) OutObjsAdd ¶
func (*Base) Quiesce ¶
count all the way to duration; reset and adjust every time activity is detected
type Demand ¶
type Demand interface { core.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) IsIdle ¶ added in v1.3.16
func (r *DemandBase) IsIdle() bool
NOTE: override `Base.IsIdle`
func (*DemandBase) Pending ¶
func (r *DemandBase) Pending() (cnt int64)
func (*DemandBase) Reset ¶ added in v1.3.22
func (r *DemandBase) Reset(idleTime time.Duration)
(e.g. usage: listed last page)
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 RefreshCap bool // refresh capacity stats upon completion // see xreg for "limited coexistence" Rebalance bool // moves data between nodes Resilver bool // moves data between mountpaths ConflictRebRes bool // conflicts with rebalance/resilver AbortRebRes bool // gets aborted upon rebalance/resilver - currently, all `ext`-ensions // xaction has an intermediate `idle` state whereby it "idles" between requests // (see related: xact/demand.go) Idles bool // xaction returns extended xaction-specific stats // (see related: `Snap.Ext` in core/xaction.go) ExtendedStats bool }
func GetDescriptor ¶ added in v1.3.16
func GetDescriptor(kindOrName string) (string, Descriptor, error)
type MultiSnap ¶ added in v1.3.16
primarily: `api.QueryXactionSnaps`
func (MultiSnap) ByteCounts ¶ added in v1.3.16
func (MultiSnap) RunningTarget ¶ added in v1.3.16
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)
func (*NotifXactListener) WithCause ¶ added in v1.3.21
func (nxb *NotifXactListener) WithCause(cause string) *NotifXactListener
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. |