satellite/metainfo: disallow cancelling deletion request

Change-Id: I05194d493632c9f454671ddf6b67b4901f2b7884
This commit is contained in:
Egon Elbre 2020-01-15 10:21:29 +02:00
parent 08f63614be
commit 02ed2b5a19

View File

@ -27,6 +27,7 @@ import (
"storj.io/common/storj"
"storj.io/common/sync2"
"storj.io/storj/pkg/macaroon"
"storj.io/storj/private/context2"
"storj.io/storj/private/dbutil"
"storj.io/storj/satellite/accounting"
"storj.io/storj/satellite/attribution"
@ -2275,6 +2276,9 @@ func (endpoint *Endpoint) DeleteObjectPieces(
) (err error) {
defer mon.Task()(&ctx, projectID.String(), bucket, encryptedPath)(&err)
// We should ignore client cancelling and always try to delete segments.
ctx = context2.WithoutCancellation(ctx)
numOfSegments, err := endpoint.getObjectNumberOfSegments(ctx, projectID, bucket, encryptedPath)
if err != nil {
return err