Skip to content

Commit

Permalink
cleanup fs-path-error only in API responses
Browse files Browse the repository at this point in the history
* and not anywhere else

Signed-off-by: Alex Aizman <[email protected]>
  • Loading branch information
alex-aizman committed Sep 13, 2024
1 parent e3b6463 commit 6cfa275
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 0 additions & 2 deletions cmn/err.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ func NewErrFailedTo(actor fmt.Stringer, action string, what any, err error, ecod
if e, ok := err.(*ErrFailedTo); ok {
return e
}
_clean(err)

e := &ErrFailedTo{action: action, what: what, err: err}
e.actor = thisNodeName
Expand Down Expand Up @@ -673,7 +672,6 @@ func NewErrAborted(what, ctx string, err error) *ErrAborted {
if e, ok := err.(*ErrAborted); ok {
return e
}
_clean(err)
return &ErrAborted{what: what, ctx: ctx, err: err}
}

Expand Down
2 changes: 2 additions & 0 deletions ec/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ func (mgr *Manager) recvResponse(hdr *transport.ObjHdr, objReader io.Reader, err
switch hdr.Opcode {
case reqPut:
xctn := mgr.RestoreBckRespXact(bck)
xctn.IncPending()
xctn.dispatchResp(iReq, hdr, objReader)
xctn.DecPending()
case respPut:
// Process the request even if the number of targets is insufficient
// (might've started when we had enough)
Expand Down
3 changes: 0 additions & 3 deletions ec/respondx.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,6 @@ func (r *XactRespond) dispatchReq(iReq intraReq, hdr *transport.ObjHdr, bck *met
}

func (r *XactRespond) dispatchResp(iReq intraReq, hdr *transport.ObjHdr, object io.Reader) {
r.IncPending()
defer r.DecPending()

switch hdr.Opcode {
case reqPut:
// a remote target sent a replica/slice while it was
Expand Down
2 changes: 1 addition & 1 deletion xact/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func (xctn *Base) AddErr(err error, logExtra ...int) {
return
}
debug.Assert(err != nil)
fs.CleanPathErr(err)

xctn.err.Add(err)
// just add
if len(logExtra) == 0 {
Expand Down

0 comments on commit 6cfa275

Please sign in to comment.