Skip to content
Snippets Groups Projects
Commit 92c2deb0 authored by Georges Racinet's avatar Georges Racinet
Browse files

Blob service: streaming in chunks of WRITE_BUFFER_SIZE

The reason why Gitaly does not respect `WRITE_BUFFER_SIZE`
even though the Blob serving method go through its
`streamio.SendWriter` object which enforces it is now
roughly understood: the `SendWriter` object is called for
the smaller chunks generated by `io.CopyN`.

Since this does not look to be the actual intent in Gitaly
and may be corrected later, we make HGitaly abide to
`WRITE_BUFFER_SIZE` right away. This makes our code
more consistent.

Also, this makes the default chunk size go up from 16kB to
128kB. It wouldn't be very surprising if the penalty for
chunks that are too small (number of requests multiplied by 8)
would be bigger in a Python program than in a Go program, because
we may have a higher overhead per request.
parent 9e62dfcb
No related branches found
No related tags found
1 merge request!61Blob(s): fix flakiness in Gitaly Comparison tests and settle for chunks of length WRITE_BUFFER_SIZE
Pipeline #20993 passed with warnings
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment