[go: up one dir, main page]

Skip to content

repository: Retrieve error from stream when EOF received

CreateBundleFromRefList does not acknowledge the header message sent as the first message in the stream to the client which can make it harder to understand the problem if server returns error while client already starts its data stream without the acknowledgement. It can also prevent client from retrying the request on another node if it already started streaming the data without buffering it.

After some fruitful discussions below, decided to only implement error handling here and leave the retryability issue to be handled later after more discussions on how to do it.

For error handling, what is currently missing is that when client receives EOF during Send operation, it returns the error but actually we need to call Recv on the stream when we encounter EOF to get the actual status of the stream. This is described in the documentation:

On error, SendMsg aborts the stream. If the error was generated by the client, the status is returned directly; otherwise, io.EOF is returned and the status of the stream may be discovered using Recv.

In this MR, decided we decided to handle this for all the Client streamers that uses chunker (just 2). It will cover both Send and Flush operations from the chunker.

Closes #6229 (closed)

Edited by Mustafa Bayar

Merge request reports

Loading