close
Skip to content

zstd: Forward read errors#373

Merged
klauspost merged 2 commits into
masterfrom
zstd-forward-read-errors
May 11, 2021
Merged

zstd: Forward read errors#373
klauspost merged 2 commits into
masterfrom
zstd-forward-read-errors

Conversation

@klauspost

Copy link
Copy Markdown
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
Comment thread zstd/blockdec.go
return io.ErrUnexpectedEOF
tmp, err := br.readSmall(3)
if err != nil {
println("Reading block header:", err)

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown

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