-
Notifications
You must be signed in to change notification settings - Fork 355
Closed
Description
In the code ( as in
err = s.validateChecksum(s.chunk.Bytes()) |
err = s.validateChecksum(s.chunk.Bytes())
if err != nil {
return 0, nil
}
If the validateChecksum return an err, it will just return 0, nil.
And in the following code (
hdfs/internal/transfer/block_reader.go
Line 95 in f2f512d
n, err := br.stream.Read(b) |
n, err := br.stream.Read(b)
br.Offset += int64(n)
if err != nil && err != io.EOF {
br.stream = nil
br.datanodes.recordFailure(err)
if n > 0 {
return n, nil
}
continue
}
There is a chance for the br.stream.Read return n > 0 and err = errInvalidChecksum, so the whole call will return n, nil
Is these a feature or a bug?
Metadata
Metadata
Assignees
Labels
No labels