Skip to content

Commit

Permalink
Add logging of failed chunks transfer (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
reshke authored Sep 25, 2024
1 parent 15cebb7 commit d642e2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func copyFunc(con net.Conn, instanceCnf *config.Instance, args []string) error {

ansType, body, err := protoReader.ReadPacket()
if err != nil {
ylogger.Zero.Debug().Err(err).Msg("error while ans")
ylogger.Zero.Debug().Err(err).Msg("error while answer")
return err
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/proc/interaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,13 @@ func ProcConn(s storage.StorageInteractor, cr crypt.Crypter, ycl client.YproxyCl
}

if _, err := io.Copy(writerToNewBucket, fromReader); err != nil {
ylogger.Zero.Error().Err(err).Msg("failed to copy data")
ylogger.Zero.Error().Str("path", path).Err(err).Msg("failed to copy data")
failed = append(failed, objectMetas[i])
return
}

if err := writerToNewBucket.Close(); err != nil {
ylogger.Zero.Error().Err(err).Msg("failed to close writer")
ylogger.Zero.Error().Str("path", path).Err(err).Msg("failed to close writer")
failed = append(failed, objectMetas[i])
return
}
Expand Down

0 comments on commit d642e2c

Please sign in to comment.