From 49470ed61373c96b93f7e7d75d15a1d2f6484dbb Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Mon, 9 Nov 2020 13:24:48 +0300 Subject: [PATCH] [#158] metabase: Log errors inside DeleteObjects method implementation Signed-off-by: Leonard Lyubich --- pkg/local_object_storage/metabase/delete.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/local_object_storage/metabase/delete.go b/pkg/local_object_storage/metabase/delete.go index eb63ef7df..4d26f60c0 100644 --- a/pkg/local_object_storage/metabase/delete.go +++ b/pkg/local_object_storage/metabase/delete.go @@ -4,6 +4,7 @@ import ( "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/pkg/errors" "go.etcd.io/bbolt" + "go.uber.org/zap" ) var tombstoneBucket = []byte("tombstones") @@ -22,7 +23,9 @@ func objectRemoved(tx *bbolt.Tx, addr []byte) bool { // DeleteObjects marks list of objects as deleted. func (db *DB) DeleteObjects(list ...*object.Address) { if err := db.delete(list...); err != nil { - // TODO: log error + db.log.Error("could not delete object list", + zap.String("error", err.Error()), + ) } }