Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zstd: Forward read errors #373

Merged
merged 2 commits into from
May 11, 2021
Merged

zstd: Forward read errors #373

merged 2 commits into from
May 11, 2021

Conversation

klauspost
Copy link
Owner

Forward all read errors.

Fixes #372

Forward all read errors.

Fixes #372
@klauspost klauspost merged commit 2748482 into master May 11, 2021
@klauspost klauspost deleted the zstd-forward-read-errors branch May 11, 2021 09:15
return io.ErrUnexpectedEOF
tmp, err := br.readSmall(3)
if err != nil {
println("Reading block header:", err)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these printlns meant to be gated with debug?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@twmb There is another check in the println function, so it will not print unless compiled with debug enabled.

After encoding and decoding was separated it should, though.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thank you very much! I didn't see that this was an override of the Go builtin, but seeing two arguments should've been the hint.

mostynb added a commit to mostynb/zstdpool-syncpool that referenced this pull request May 30, 2021
This includes the following zstd improvement since v1.12.2:

* Forward read errors
  klauspost/compress#373
mostynb added a commit to mostynb/go-grpc-compression that referenced this pull request May 30, 2021
This includes the following zstd improvement since v1.12.2:

* zstd: Forward read errors (#373)
  klauspost/compress#373
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.

zstd reader does not transmit upstream reader failure
2 participants