projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
1c1f12b
)
10468: Use long S3 timeouts by default, instead of waiting forever.
author
Tom Clegg <tom@curoverse.com>
Mon, 7 Nov 2016 15:15:55 +0000
(10:15 -0500)
committer
Tom Clegg <tom@curoverse.com>
Mon, 7 Nov 2016 15:15:55 +0000
(10:15 -0500)
services/keepstore/s3_volume.go
patch
|
blob
|
history
diff --git
a/services/keepstore/s3_volume.go
b/services/keepstore/s3_volume.go
index 6ddcaf170c928ebb19541351b32a806ef323667a..a0cf450cfb582a5c0fdcdb84887c8bfd5e35d249 100644
(file)
--- a/
services/keepstore/s3_volume.go
+++ b/
services/keepstore/s3_volume.go
@@
-209,6
+209,16
@@
func (v *S3Volume) Start() error {
if err != nil {
return err
}
+
+ // Zero timeouts mean "wait forever", which is a bad
+ // default. Default to long timeouts instead.
+ if v.ConnectTimeout == 0 {
+ v.ConnectTimeout = arvados.Duration(time.Minute)
+ }
+ if v.ReadTimeout == 0 {
+ v.ReadTimeout = arvados.Duration(10 * time.Minute)
+ }
+
client := s3.New(auth, region)
client.ConnectTimeout = time.Duration(v.ConnectTimeout)
client.ReadTimeout = time.Duration(v.ReadTimeout)