Skip to content

Conversation

@klauspost
Copy link
Contributor

The io.ReaderAt docs states...

If ReadAt is reading from an input source with a seek offset, ReadAt should not affect nor be affected by the underlying seek offset.

We did not satisfy that constraint and Read would be affected by the ReadAt.

Since the ReadAt would only request the part of the object relevant for the ReadAt we shouldn't risk anyone relying on this feature since it would always have errored out before.

Fixes #2196

The [io.ReaderAt](https://pkg.go.dev/io#ReaderAt) docs states...

> If ReadAt is reading from an input source with a seek offset, ReadAt should not affect nor be affected by the underlying seek offset.

We did not satisfy that constraint and Read would be affected by the ReadAt.

Since the ReadAt would only request the part of the object relevant for the ReadAt we shouldn't risk anyone relying on this feature since it would always have errored out before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calling Read after ReadAt on minio.Object results in io.ErrUnexpectedEOF error

2 participants