fup: set buffer size to 8MiB
SeaweedFS' default chunk size is 4MiB; if we don't match it (or a multiple) then our multipart uploads become uneven because they end up as chunks of the buffer size followed by the remaining data. This is particularly egregious with the current default of 5MiB, because then we get a 4MiB chunk followed by a 1MiB chunk every time.
This commit is contained in:
parent
2e9b5e4a66
commit
8b27353be7
1 changed files with 1 additions and 0 deletions
|
@ -40,6 +40,7 @@ func (m *Metadata) WriterOptions() *blob.WriterOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
return &blob.WriterOptions{
|
return &blob.WriterOptions{
|
||||||
|
BufferSize: 8 * 1024 * 1024, /* 8 MiB */
|
||||||
CacheControl: attrs.CacheControl,
|
CacheControl: attrs.CacheControl,
|
||||||
ContentDisposition: attrs.ContentDisposition,
|
ContentDisposition: attrs.ContentDisposition,
|
||||||
ContentEncoding: attrs.ContentEncoding,
|
ContentEncoding: attrs.ContentEncoding,
|
||||||
|
|
Loading…
Reference in a new issue