forked from TrueCloudLab/frostfs-node
[#1166] blobovnicza: Return NoSpaceLeft error instead of syscall.ENOSPC
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
a0c588263b
commit
e7d479f4c2
4 changed files with 29 additions and 2 deletions
|
@ -2,7 +2,9 @@ package blobovnicza
|
|||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"syscall"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/util/logicerr"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-observability/tracing"
|
||||
|
@ -95,6 +97,8 @@ func (b *Blobovnicza) Put(ctx context.Context, prm PutPrm) (PutRes, error) {
|
|||
})
|
||||
if err == nil {
|
||||
b.itemAdded(recordSize)
|
||||
} else if errors.Is(err, syscall.ENOSPC) {
|
||||
err = ErrNoSpace
|
||||
}
|
||||
|
||||
return PutRes{}, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue