-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
fix(server/transporter.go) fix the short timeout problem of sending snapshot #616
Conversation
…napshot Snapshot can be tens of MB. We need to have a minute level timeout for sending snapshot. We add a separate snapshot http client for snapshot request, which has 120s timeout.
@philips Shall we also add test in this pull request? But we will be testing the httpclient package from https://github.com/mreiferson/go-httpclient. |
/cc @unihorn |
@@ -58,6 +78,9 @@ func NewTransporter(followersStats *raftFollowersStats, serverStats *raftServerS | |||
func (t *transporter) SetTLSConfig(tlsConf tls.Config) { | |||
t.transport.TLSClientConfig = &tlsConf | |||
t.transport.DisableCompression = true | |||
|
|||
t.snapshotTransport.TLSClientConfig = &tlsConf | |||
t.snapshotTransport.DisableCompression = true |
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.
Does it make sense to disable compression on large things like the snapshot?
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.
@philips I just copied the previous setting. I do not think we are using gzip on the server side for now. So disabling or not makes no difference.
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.
ack
lgtm |
@xiangli-cmu Does this fix #591 or do we need to make snapshotting itself more efficient too? |
@xiangli-cmu Do you want to merge this one? |
fix(server/transporter.go) fix the short timeout problem of sending snapshot
Snapshot can be tens of MB. We need to have a minute level timeout for sending snapshot.
We add a separate snapshot http client for snapshot request, which has 120s timeout.
fix #591
There is issue in raft too. I have fixed that in a coming pull request for raft.