Skip to content

Commit

Permalink
node/meta: do not stop deleting objects on errors, log them instead
Browse files Browse the repository at this point in the history
Relates #2822.

Signed-off-by: Pavel Karpy <[email protected]>
  • Loading branch information
carpawell committed Jun 18, 2024
1 parent 5b6b5a4 commit 66b3c52
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/local_object_storage/metabase/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
objectSDK "github.com/nspcc-dev/neofs-sdk-go/object"
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
"go.etcd.io/bbolt"
"go.uber.org/zap"
)

// DeletePrm groups the parameters of Delete operation.
Expand Down Expand Up @@ -103,7 +104,8 @@ func (db *DB) deleteGroup(tx *bbolt.Tx, addrs []oid.Address, sizes []uint64) (ui
for i := range addrs {
removed, available, size, err := db.delete(tx, addrs[i], currEpoch)
if err != nil {
return 0, 0, err // maybe log and continue?
db.log.Warn("failed to delete object", zap.Error(err), zap.Stringer("addr", addrs[i]))
return 0, 0, nil

Check warning on line 108 in pkg/local_object_storage/metabase/delete.go

View check run for this annotation

Codecov / codecov/patch

pkg/local_object_storage/metabase/delete.go#L107-L108

Added lines #L107 - L108 were not covered by tests
}

if removed {
Expand Down

0 comments on commit 66b3c52

Please sign in to comment.