Skip to content

Commit

Permalink
worker: RemoveCopies expects one type at a time
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k committed Mar 16, 2022
1 parent 39e3ddb commit 99c6ef5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extern/sector-storage/stores/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion extern/sector-storage/worker_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 99c6ef5

Please sign in to comment.