[#1261] shard: Fix delete objects from FSTree
Some checks failed
Tests and linters / Lint (pull_request) Failing after 35s
DCO action / DCO (pull_request) Successful in 1m5s
Tests and linters / Tests (1.20) (pull_request) Failing after 1m25s
Tests and linters / Staticcheck (pull_request) Failing after 1m36s
Build / Build Components (1.21) (pull_request) Successful in 2m53s
Build / Build Components (1.20) (pull_request) Successful in 3m17s
Tests and linters / gopls check (pull_request) Successful in 4m33s
Tests and linters / Tests (1.21) (pull_request) Successful in 5m5s
Tests and linters / Tests with -race (pull_request) Successful in 6m29s
Vulncheck / Vulncheck (pull_request) Failing after 14m26s
Some checks failed
Tests and linters / Lint (pull_request) Failing after 35s
DCO action / DCO (pull_request) Successful in 1m5s
Tests and linters / Tests (1.20) (pull_request) Failing after 1m25s
Tests and linters / Staticcheck (pull_request) Failing after 1m36s
Build / Build Components (1.21) (pull_request) Successful in 2m53s
Build / Build Components (1.20) (pull_request) Successful in 3m17s
Tests and linters / gopls check (pull_request) Successful in 4m33s
Tests and linters / Tests (1.21) (pull_request) Successful in 5m5s
Tests and linters / Tests with -race (pull_request) Successful in 6m29s
Vulncheck / Vulncheck (pull_request) Failing after 14m26s
Replace nil storageID with empty like by shard.Get. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
845d8be672
commit
3bcc31696b
1 changed files with 6 additions and 0 deletions
|
@ -117,6 +117,12 @@ func (s *Shard) deleteFromBlobstor(ctx context.Context, addr oid.Address) error
|
|||
return err
|
||||
}
|
||||
storageID := res.StorageID()
|
||||
if storageID == nil {
|
||||
// if storageID is nil it means:
|
||||
// 1. there is no such object
|
||||
// 2. object stored by writecache: should not happen, as `validateWritecacheDoesntContainObject` called before `deleteFromBlobstor`
|
||||
return nil
|
||||
}
|
||||
|
||||
var delPrm common.DeletePrm
|
||||
delPrm.Address = addr
|
||||
|
|
Loading…
Reference in a new issue