Skip to content

Commit

Permalink
move transform/copy-bucket from 'mirror' package to 'xs'
Browse files Browse the repository at this point in the history
* colocate with multi-obj copy/transform

Signed-off-by: Alex Aizman <[email protected]>
  • Loading branch information
alex-aizman committed Dec 19, 2023
1 parent 824f63e commit d8c2155
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
3 changes: 1 addition & 2 deletions ais/tgttxn.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
"github.com/NVIDIA/aistore/cmn/nlog"
"github.com/NVIDIA/aistore/ext/etl"
"github.com/NVIDIA/aistore/fs"
"github.com/NVIDIA/aistore/mirror"
"github.com/NVIDIA/aistore/nl"
"github.com/NVIDIA/aistore/reb"
"github.com/NVIDIA/aistore/xact"
Expand Down Expand Up @@ -607,7 +606,7 @@ func (t *target) _tcbBegin(c *txnServerCtx, msg *apc.TCBMsg, dp cluster.DP) (err

var (
xctn = rns.Entry.Get()
xtcb = xctn.(*mirror.XactTCB)
xtcb = xctn.(*xs.XactTCB)
txn = newTxnTCB(c, xtcb)
nlps = []cluster.NLP{nlpFrom}
)
Expand Down
5 changes: 2 additions & 3 deletions ais/txn.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"github.com/NVIDIA/aistore/cmn/mono"
"github.com/NVIDIA/aistore/cmn/nlog"
"github.com/NVIDIA/aistore/hk"
"github.com/NVIDIA/aistore/mirror"
"github.com/NVIDIA/aistore/xact/xs"
)

Expand Down Expand Up @@ -110,7 +109,7 @@ type (
txnBckBase
}
txnTCB struct {
xtcb *mirror.XactTCB
xtcb *xs.XactTCB
txnBckBase
}
txnTCObjs struct {
Expand Down Expand Up @@ -562,7 +561,7 @@ func newTxnRenameBucket(c *txnServerCtx, bckFrom, bckTo *meta.Bck) (txn *txnRena
// txnTCB //
////////////

func newTxnTCB(c *txnServerCtx, xtcb *mirror.XactTCB) (txn *txnTCB) {
func newTxnTCB(c *txnServerCtx, xtcb *xs.XactTCB) (txn *txnTCB) {
txn = &txnTCB{xtcb: xtcb}
txn.init(xtcb.Args().BckFrom)
txn.fillFromCtx(c)
Expand Down
3 changes: 0 additions & 3 deletions mirror/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@
package mirror

import (
"github.com/NVIDIA/aistore/api/apc"
"github.com/NVIDIA/aistore/xact/xreg"
)

func Init() {
xreg.RegBckXact(&tcbFactory{kind: apc.ActCopyBck})
xreg.RegBckXact(&tcbFactory{kind: apc.ActETLBck})
xreg.RegBckXact(&mncFactory{})
xreg.RegBckXact(&putFactory{})
}
3 changes: 3 additions & 0 deletions xact/xs/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ func Xreg() {
xreg.RegBckXact(&proFactory{})
xreg.RegBckXact(&llcFactory{})

xreg.RegBckXact(&tcbFactory{kind: apc.ActCopyBck})
xreg.RegBckXact(&tcbFactory{kind: apc.ActETLBck})

xreg.RegBckXact(&tcoFactory{streamingF: streamingF{kind: apc.ActETLObjects}})
xreg.RegBckXact(&tcoFactory{streamingF: streamingF{kind: apc.ActCopyObjects}})
xreg.RegBckXact(&archFactory{streamingF: streamingF{kind: apc.ActArchive}})
Expand Down
2 changes: 1 addition & 1 deletion mirror/tcb.go → xact/xs/tcb.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
*/
package mirror
package xs

import (
"fmt"
Expand Down

0 comments on commit d8c2155

Please sign in to comment.