Skip to content

Conversation

@MakMukhi
Copy link
Contributor

@MakMukhi MakMukhi commented Feb 10, 2017

…at 100 by default

fixes #1060

Copy link
Contributor

@menghanl menghanl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Some minor comments.
Thanks.

}
var rstStream bool
defer func() {
if !rstStream {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comments here to explain what rstStream means and our special handling for streams quota pool.

t.framer.writeSettings(true, i.ss...)
}
case *resetStream:
t.streamsQuota.add(1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain a little bit about the race.

statusCode codes.Code
statusDesc string
// rstStream is a flag that is true when a RST stream frame
// is sent to the server signifying that this stream is closing.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rstStream indicates whether a RSTStream needs to be sent to the server to signify that this stream is closing.

"is sent" is a bit confusing.


const defaultMaxStreamsClient = 100

func TestClientExceedMaxStreamsLimit(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about TestExceedDefaultMaxStreamsLimit, as opposed to the previous test TestExceedMaxStreamsLimit.

"Conn.resetTransport failed to create client transport",
"grpc: the connection is closing",
)
te.maxStream = 0 // Server allows infinite streams. The cap should be on client side.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add something saying that "the server won't send the settings frame for MaxConcurrentStreams"?

@menghanl menghanl merged commit 8b2e129 into grpc:master Mar 1, 2017
@MakMukhi MakMukhi deleted the issue_1060 branch May 4, 2018 02:05
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Client should avoid sending too many streams that exceeds server max stream limits

2 participants