worker: RemoveCopies expects one type at a time
This commit is contained in:
parent
5ed5744cb6
commit
c4259cb594
2
extern/sector-storage/stores/remote.go
vendored
2
extern/sector-storage/stores/remote.go
vendored
@ -46,7 +46,7 @@ type Remote struct {
|
||||
|
||||
func (r *Remote) RemoveCopies(ctx context.Context, s abi.SectorID, typ storiface.SectorFileType) error {
|
||||
if bits.OnesCount(uint(typ)) != 1 {
|
||||
return xerrors.New("delete expects one file type")
|
||||
return xerrors.New("RemoveCopies expects one file type")
|
||||
}
|
||||
|
||||
if err := r.local.RemoveCopies(ctx, s, typ); err != nil {
|
||||
|
2
extern/sector-storage/worker_local.go
vendored
2
extern/sector-storage/worker_local.go
vendored
@ -525,7 +525,7 @@ func (l *LocalWorker) MoveStorage(ctx context.Context, sector storage.SectorRef,
|
||||
continue
|
||||
}
|
||||
|
||||
if err := l.storage.RemoveCopies(ctx, sector.ID, types); err != nil {
|
||||
if err := l.storage.RemoveCopies(ctx, sector.ID, fileType); err != nil {
|
||||
return nil, xerrors.Errorf("rm copies (t:%s, s:%v): %w", fileType, sector, err)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user