Remove MaxConnsPerHost settings to avoid potential hangs (#10438)

MaxConnsPerHost can potentially hang a call without any
way to timeout, we do not need this setting for our proxy
and gateway implementations instead IdleConn settings are
good enough.

Also ensure to use NewRequestWithContext and make sure to
take the disks offline only for network errors.

Fixes #10304
This commit is contained in:
Harshavardhana
2020-09-08 14:22:04 -07:00
committed by GitHub
parent 96997d2b21
commit c13afd56e8
13 changed files with 40 additions and 46 deletions

View File

@@ -1217,7 +1217,7 @@ func (fs *FSObjects) putObject(ctx context.Context, bucket string, object string
// Should return IncompleteBody{} error when reader has fewer
// bytes than specified in request header.
if bytesWritten < data.Size() {
return ObjectInfo{}, IncompleteBody{}
return ObjectInfo{}, IncompleteBody{Bucket: bucket, Object: object}
}
// Entire object was written to the temp location, now it's safe to rename it to the actual location.