Skip to content
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

http2: make GoAway and INTERNAL_ERROR to implement Temporary interface #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kirillx
Copy link

@kirillx kirillx commented Jan 27, 2020

... returning true.

Justification from golang/go#35286 (#35286):

  1. http.http2GoAwayError (e.g. 'http2: server sent GOAWAY and closed the
    connection; LastStreamID=8329, ErrCode=NO_ERROR, debug="max_age"')

This error happens typically if server decides enough requests per connection
serviced or after some timeout or graceful shutdown
(https://http2.github.io/http2-spec/#GOAWAY).

  1. http.http2StreamError with INTERNAL_ERROR code (e.g. 'stream error: stream ID 309; INTERNAL_ERROR')

According to HTTP2 SPEC:
INTERNAL_ERROR (0x2): The endpoint encountered an unexpected internal error.

i.e. this error to be used similar to HTTP 500 and real-life experience clearly
demonstrates it is retryable (like HTTP 500).

Google Cloud SDK also implements retries on this error at cloud.google.com/go/storage/reader.go:
if strings.HasSuffix(err.Error(), "INTERNAL_ERROR") && strings.Contains(reflect.TypeOf(err).String(), "http2")

Signed-off-by: Kirill Korotaev [email protected]

... returning true.

Justification from golang/go#35286 (#35286):

1. http.http2GoAwayError (e.g. 'http2: server sent GOAWAY and closed the
connection; LastStreamID=8329, ErrCode=NO_ERROR, debug="max_age"')

This error happens typically if server decides enough requests per connection
serviced or after some timeout or graceful shutdown
(https://http2.github.io/http2-spec/#GOAWAY).

2. http.http2StreamError with INTERNAL_ERROR code (e.g. 'stream error: stream ID 309; INTERNAL_ERROR')

According to HTTP2 SPEC:
INTERNAL_ERROR (0x2): The endpoint encountered an unexpected internal error.

i.e. this error to be used similar to HTTP 500 and real-life experience clearly
demonstrates it is retryable (like HTTP 500).

Google Cloud SDK also implements retries on this error at cloud.google.com/go/storage/reader.go:
if strings.HasSuffix(err.Error(), "INTERNAL_ERROR") && strings.Contains(reflect.TypeOf(err).String(), "http2")

Signed-off-by: Kirill Korotaev <[email protected]>
@gopherbot
Copy link
Contributor

This PR (HEAD: 0a66f32) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/net/+/216398 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Bryan C. Mills:

Patch Set 1: Code-Review-1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/216398.
After addressing review feedback, remember to publish your drafts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants