From 11dd0687c90e739fbc68805969e45b670156199e Mon Sep 17 00:00:00 2001 From: Egon Elbre Date: Mon, 6 Jun 2022 15:07:14 +0300 Subject: [PATCH] satellite/metabase: add missing monitoring Change-Id: I8b1049aafc0d2c6029a68cac0e6fdc3d7b25b30d --- satellite/metabase/delete.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/satellite/metabase/delete.go b/satellite/metabase/delete.go index fc99cfb06..044aa1852 100644 --- a/satellite/metabase/delete.go +++ b/satellite/metabase/delete.go @@ -296,6 +296,8 @@ func (db *DB) DeleteObjectExactVersion(ctx context.Context, opts DeleteObjectExa } func (db *DB) deleteObjectExactVersionServerSideCopy(ctx context.Context, opts DeleteObjectExactVersion) (result DeleteObjectResult, err error) { + defer mon.Task()(&ctx)(&err) + objects := []deletedObjectInfo{} err = txutil.WithTx(ctx, db.db, nil, func(ctx context.Context, tx tagsql.Tx) (err error) { err = withRows( @@ -333,7 +335,9 @@ func (db *DB) deleteObjectExactVersionServerSideCopy(ctx context.Context, opts D return result, nil } -func (db *DB) promoteNewAncestors(ctx context.Context, tx tagsql.Tx, objects []deletedObjectInfo) error { +func (db *DB) promoteNewAncestors(ctx context.Context, tx tagsql.Tx, objects []deletedObjectInfo) (err error) { + defer mon.Task()(&ctx)(&err) + for _, object := range objects { if object.PromotedAncestor == nil { continue