-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(storage): add GCSFuse client config [benchmarking] #8225
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small things, overall lgtm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
if err == nil { | ||
http2Trans.ReadIdleTimeout = time.Second * 31 | ||
if config.setGCSFuseOpts { | ||
base = &http.Transport{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to create another object, since we are cloning the transport object in line:190. We can just override the attributes. Like,
base.MaxConnsPerHost = 100
base.MaxIdleConnsPerHost = 100
base.TLSNextProto = make(map[string]func(string, *tls.Conn) http.RoundTripper)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather keep the exact initialization code as gcsFuse has. http.DefaultTransport
configures several transport variables to default values, and I'm not sure manually initializing an http.Transport
would have those configured the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionality wise looks good, have added minor refactoring comments.
No description provided.