mirror of
https://github.com/minio/minio.git
synced 2025-11-07 04:42:56 -05:00
xl: CreateFile shouldn't prematurely timeout (#11854)
For large objects taking more than '3 minutes' response times in a single PUT operation can timeout prematurely as 'ResponseHeader' timeout hits for 3 minutes. Avoid this by keeping the connection active during CreateFile phase.
This commit is contained in:
@@ -337,8 +337,10 @@ func (client *storageRESTClient) CreateFile(ctx context.Context, volume, path st
|
||||
values.Set(storageRESTFilePath, path)
|
||||
values.Set(storageRESTLength, strconv.Itoa(int(size)))
|
||||
respBody, err := client.call(ctx, storageRESTMethodCreateFile, values, ioutil.NopCloser(reader), size)
|
||||
defer http.DrainBody(respBody)
|
||||
return err
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return waitForHTTPStream(respBody, ioutil.Discard)
|
||||
}
|
||||
|
||||
func (client *storageRESTClient) WriteMetadata(ctx context.Context, volume, path string, fi FileInfo) error {
|
||||
|
||||
Reference in New Issue
Block a user