[#158] metabase: Log errors inside DeleteObjects method implementation

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-11-09 13:24:48 +03:00 committed by Alex Vanin
parent 36d5af812e
commit 49470ed613

View file

@ -4,6 +4,7 @@ import (
"github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-api-go/pkg/object"
"github.com/pkg/errors" "github.com/pkg/errors"
"go.etcd.io/bbolt" "go.etcd.io/bbolt"
"go.uber.org/zap"
) )
var tombstoneBucket = []byte("tombstones") var tombstoneBucket = []byte("tombstones")
@ -22,7 +23,9 @@ func objectRemoved(tx *bbolt.Tx, addr []byte) bool {
// DeleteObjects marks list of objects as deleted. // DeleteObjects marks list of objects as deleted.
func (db *DB) DeleteObjects(list ...*object.Address) { func (db *DB) DeleteObjects(list ...*object.Address) {
if err := db.delete(list...); err != nil { if err := db.delete(list...); err != nil {
// TODO: log error db.log.Error("could not delete object list",
zap.String("error", err.Error()),
)
} }
} }