-
Notifications
You must be signed in to change notification settings - Fork 41
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
Make FillUntil errors non-fatal #285
Conversation
Pull Request Test Coverage Report for Build 1279
💛 - Coveralls |
@pboothe I think you're the right person to review this. I won't expect a response until Tuesday. |
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 once the SetWriteDeadline stuff is removed.
Reviewable status: complete! 1 of 1 approvals obtained (waiting on @pboothe and @stephen-soltesz)
ndt5/protocol/protocol.go, line 184 at r3 (raw file):
func (ws *wsConnection) FillUntil(t time.Time, bytes []byte) (bytesWritten int64, err error) { ws.SetWriteDeadline(t)
SetWriteDeadline
is a deep deep rabbithole, and I have been burned by it in the past. After talking in person, we agreed to remove those changes from this PR.
https://golang.org/src/net/net.go?s=8402:8452#L248
https://golang.org/src/net/fd_unix.go?h=netFD#L19
https://golang.org/src/internal/poll/fd_poll_runtime.go?s=3141:3190#L27
https://github.com/golang/go/blob/master/src/runtime/netpoll.go#L241
ndt5/s2c/s2c.go, line 99 at r3 (raw file):
record.StartTime = time.Now() testConn.FillUntil(time.Now().Add(10*time.Second), dataToSend) record.EndTime = time.Now()
The changes to S2C look good to me.
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.
Reviewable status: complete! 1 of 1 approvals obtained (waiting on @pboothe)
ndt5/protocol/protocol.go, line 184 at r3 (raw file):
Previously, pboothe (Peter Boothe) wrote…
SetWriteDeadline
is a deep deep rabbithole, and I have been burned by it in the past. After talking in person, we agreed to remove those changes from this PR.https://golang.org/src/net/net.go?s=8402:8452#L248
https://golang.org/src/net/fd_unix.go?h=netFD#L19
https://golang.org/src/internal/poll/fd_poll_runtime.go?s=3141:3190#L27
https://github.com/golang/go/blob/master/src/runtime/netpoll.go#L241
Removed.
While investigating a higher than expected error rate from the throttled ndt5-client used in the e2e monitoring with access tokens, I discovered that the cause of failure from the client perspective was the server handling
FillUntil
errors as fatal.FillUntil in prometheus metrics is the second most frequent error from clients. In the case of the ndt5-client, the error is a result of two steps:
ws.WritePreparedMessage()
.After the 15sec timeout, the client closes the test connection. Because the server was blocked in a write, the write returns an error and returns from FillUntil. When the server aborts the test, the client also registers a failure.
This PR prevents that failure by ignoring the FillUntil error and continuing to collect connection metrics and sending them to the client via the control channel. If the client has truly disconnected, there are additional opportunities for error: sending results, receiving client performance, sending all metrics, sending test finalize.
This change is