Add ZSTD ReadOffset support - #362
Conversation
|
This bug was identified and fixed in pr #347 as well but as that is a much larger pull request it is likely to need some more time before it is ready to merge. @EdSchouten Any opinion on merging the specific bug fix separately? |
| } | ||
|
|
||
| func (s *byteStreamServer) Read(in *bytestream.ReadRequest, out bytestream.ByteStream_ReadServer) error { | ||
| if in.ReadLimit != 0 { |
There was a problem hiding this comment.
What's up with this change? I don't think we have any code for respecting this, even for the uncompressed case.
There was a problem hiding this comment.
This change leaves existing behavior as is for the uncompressed case, but changes the return value to InvalidArgument for the compressed case, because the spec wants it that way
// When downloading compressed blobs:
// * `ReadRequest.read_offset` refers to the offset in the uncompressed form
// of the blob.
// * Servers MUST return `INVALID_ARGUMENT` if `ReadRequest.read_limit` is
// non-zero.
It probably doesn't matter since clients likely won't send a read limit for the compressed case, but I figured I'd fix it anyway. Please let me know if you want it reverted and I can do that too
This should close #360
AI was used to create this code