worker: Call RemoveCopies in MoveStorage
This commit is contained in:
parent
4d65e0101d
commit
a88edeb79d
11
extern/sector-storage/worker_local.go
vendored
11
extern/sector-storage/worker_local.go
vendored
@ -520,7 +520,16 @@ func (l *LocalWorker) MoveStorage(ctx context.Context, sector storage.SectorRef,
|
|||||||
return nil, xerrors.Errorf("move to storage: %w", err)
|
return nil, xerrors.Errorf("move to storage: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil, l.storage.RemoveCopies(ctx, sector.ID, types)
|
for _, fileType := range storiface.PathTypes {
|
||||||
|
if fileType&types == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := l.storage.RemoveCopies(ctx, sector.ID, types); err != nil {
|
||||||
|
return nil, xerrors.Errorf("rm copies (t:%s, s:%v): %w", fileType, sector, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil, nil
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user