Skip to content

Commit

Permalink
core: copy/transform data-mover vs owt
Browse files Browse the repository at this point in the history
* for now, always set dm.owt = owt-put
  (and not migrate-replicate, as implied)

Signed-off-by: Alex Aizman <[email protected]>
  • Loading branch information
alex-aizman committed Jan 17, 2024
1 parent 0adcbf0 commit af123b8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions ais/tgtimpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ func (t *target) GetCold(ctx context.Context, lom *core.LOM, owt cmn.OWT) (errCo
}
default:
// for cmn.OwtGet, see goi.getCold
debug.Assert(false, "owt", owt)
return http.StatusInternalServerError, errors.New("invalid OWT")
debug.Assert(false, owt.String())
return http.StatusInternalServerError, errors.New("invalid " + owt.String())
}

// 2. GET remote object and store it
Expand Down
2 changes: 1 addition & 1 deletion ais/tgtobj.go
Original file line number Diff line number Diff line change
Expand Up @@ -1379,7 +1379,7 @@ func (coi *copyOI) _reader(t *target, dm *bundle.DataMover, lom, dst *core.LOM)
poi.cksumToUse = oah.Checksum()
}
switch {
case dm != nil && dm.OWT() != cmn.OwtNone:
case dm != nil:
poi.owt = dm.OWT()
default:
poi.owt = cmn.OwtMigrateRepl
Expand Down
4 changes: 1 addition & 3 deletions cmn/owt.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Package cmn provides common constants, types, and utilities for AIS clients
// and AIStore.
/*
* Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.
*/
package cmn

Expand Down Expand Up @@ -29,8 +29,6 @@ const (
OwtGetPrefetchLock // (used for maximum parallelism when prefetching)
)

const OwtNone = OWT(-1)

func (owt *OWT) FromS(s string) {
n, err := strconv.Atoi(s)
debug.AssertNoErr(err)
Expand Down
2 changes: 1 addition & 1 deletion xact/xs/tcb.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (p *tcbFactory) newDM(config *cmn.Config, uuid string, sizePDU int32) error
Multiplier: config.TCB.SbundleMult,
SizePDU: sizePDU,
}
dm, err := bundle.NewDataMover(trname+"-"+uuid, p.xctn.recv, cmn.OwtNone /* pass via coi */, dmExtra)
dm, err := bundle.NewDataMover(trname+"-"+uuid, p.xctn.recv, cmn.OwtPut /* pass via coi */, dmExtra)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion xact/xs/tcobjs.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (p *tcoFactory) Start() error {
// apc.ActETLObjects (transform) generates arbitrary sizes where we use PDU-based transport
sizePDU = memsys.DefaultBufSize
}
if err := p.newDM(p.Args.UUID /*trname*/, r.recv, r.config, cmn.OwtNone, sizePDU); err != nil {
if err := p.newDM(p.Args.UUID /*trname*/, r.recv, r.config, cmn.OwtPut, sizePDU); err != nil {
return err
}
if r.p.dm != nil {
Expand Down

0 comments on commit af123b8

Please sign in to comment.