more logging

This commit is contained in:
aarshkshah1992 2021-05-21 14:56:37 +05:30
parent 78a0458ada
commit 85f2ac8789
2 changed files with 3 additions and 0 deletions

View File

@ -57,6 +57,7 @@ func (p *pieceProvider) tryReadUnsealedPiece(ctx context.Context, sector storage
// the unsealed piece.
r, err := p.storage.Reader(ctx, sector, abi.PaddedPieceSize(offset.Padded()), size.Padded())
if err != nil {
log.Debugf("failed storage reader;sector=%+v, err:%s", sector.ID, err)
cancel()
return nil, nil, err
}

View File

@ -510,6 +510,7 @@ func (r *Remote) Reader(ctx context.Context, s storage.SectorRef, offset, size a
log.Infof("Read local %s (+%d,%d)", path, offset, size)
ssize, err := s.ProofType.SectorSize()
if err != nil {
log.Debugf("failed to get sectorsize: %s", err)
return nil, err
}
@ -530,6 +531,7 @@ func (r *Remote) Reader(ctx context.Context, s storage.SectorRef, offset, size a
if err := r.pfHandler.Close(pf); err != nil {
return nil, xerrors.Errorf("close partial file: %w", err)
}
log.Debugf("miner has unsealed file but not unseal piece, %s (+%d,%d)", path, offset, size)
return nil, nil
}