Skip to content

Commit

Permalink
follow-up
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Aizman <[email protected]>
  • Loading branch information
alex-aizman committed Jul 19, 2024
1 parent 0609b04 commit f242fd4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ais/target.go
Original file line number Diff line number Diff line change
Expand Up @@ -1452,7 +1452,7 @@ func (t *target) blobdl(params *core.BlobParams, oa *cmn.ObjAttrs) (string, *xs.
// cap
cs := fs.Cap()
if errCap := cs.Err(); errCap != nil {
cs = t.oos(nil)
cs = t.oos(cmn.GCO.Get())
if err := cs.Err(); err != nil {
return "", nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion ais/tgtcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ func (t *target) _postBMD(newBMD *bucketMD, tag string, rmbcks []*meta.Bck) {
// since some buckets may have been destroyed
cs := fs.Cap()
if cs.Err() != nil {
_ = t.oos(nil)
_ = t.oos(cmn.GCO.Get())
}
}

Expand Down
5 changes: 4 additions & 1 deletion ais/tgtspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ var (

// triggers by an out-of-space condition or a suspicion of thereof

func (t *target) oos(config *cmn.Config) fs.CapStatus { return t.OOS(nil, config, nil) }
func (t *target) oos(config *cmn.Config) fs.CapStatus {
debug.Assert(config != nil)
return t.OOS(nil, config, nil)
}

func (t *target) OOS(csRefreshed *fs.CapStatus, config *cmn.Config, tcdf *fs.TargetCDF) (cs fs.CapStatus) {
var errCap error
Expand Down
2 changes: 1 addition & 1 deletion ais/tgttxn.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (t *target) txnHandler(w http.ResponseWriter, r *http.Request) {
t.transactions.find(c.uuid, ActCleanup)

if cmn.IsErrCapExceeded(err) {
cs := t.oos(nil)
cs := t.oos(cmn.GCO.Get())
t.writeErrStatusf(w, r, http.StatusInsufficientStorage, "%s: %v", cs.String(), err)
} else {
t.writeErr(w, r, err)
Expand Down

0 comments on commit f242fd4

Please sign in to comment.