Merge pull request #1653 from krishnasrinivas/timeout-8-minute

ListObjects on a prefix with 10 million entries takes around 8 minutes.
This commit is contained in:
Harshavardhana
2016-03-30 01:44:58 -07:00
3 changed files with 11 additions and 4 deletions
+2 -1
View File
@@ -119,7 +119,8 @@ func newFactory() func(config *Config) (Client, *probe.Error) {
// Set custom transport.
api.SetCustomTransport(transport)
}
// ListObjects on a prefix with 10 million entries takes around 8 minutes.
api.SetClientTimeout(8 * time.Minute)
// Store the new api object.
s3Clnt.api = api
+7 -1
View File
@@ -220,6 +220,13 @@ func (c *Client) SetCustomTransport(customHTTPTransport http.RoundTripper) {
}
}
// SetClientTimeout - set http client timeout.
func (c *Client) SetClientTimeout(timeout time.Duration) {
if c.httpClient != nil {
c.httpClient.Timeout = timeout
}
}
// TraceOn - enable HTTP tracing.
func (c *Client) TraceOn(outputStream io.Writer) {
// if outputStream is nil then default to os.Stdout.
@@ -498,7 +505,6 @@ func (c Client) newRequest(method string, metadata requestMetadata) (req *http.R
if method == "" {
method = "POST"
}
// Gather location only if bucketName is present.
location := "us-east-1" // Default all other requests to "us-east-1".
if metadata.bucketName != "" {
+2 -2
View File
@@ -39,8 +39,8 @@
},
{
"path": "github.com/minio/minio-go",
"revision": "5a338968f406d8351e55c0d66cc754613ab9a206",
"revisionTime": "2016-03-25T17:35:39-07:00"
"revision": "414cf5ccf29473975e6b6c544c42f26991855647",
"revisionTime": "2016-03-29T14:24:27-07:00"
},
{
"path": "github.com/minio/minio/pkg/atomic",