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

Decouple transport flow control from application read. #1265

Merged
merged 5 commits into from Jun 1, 2017

Conversation

MakMukhi
Copy link
Contributor

No description provided.

@MakMukhi MakMukhi requested review from menghanl and dfawley May 30, 2017 22:46
@@ -845,22 +837,19 @@ func (t *http2Client) handleData(f *http2.DataFrame) {
t.notifyError(connectionErrorf(true, err, "%v", err))
return
}
// Decouple connection's flow control form application's read.
Copy link
Contributor

Choose a reason for hiding this comment

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

s/form/from
Also, explain a bit more here?
We won't remember what we decoupled when we get used to the new flow control structure.

// Select the right stream to dispatch.
s, ok := t.getStream(f)
if !ok {
if w := t.fc.onRead(uint32(size)); w > 0 {
t.controlBuf.put(&windowUpdate{0, w})
}
return
}
if size > 0 {
s.mu.Lock()
if s.state == streamDone {
s.mu.Unlock()
// The stream has been closed. Release the corresponding quota.
Copy link
Contributor

Choose a reason for hiding this comment

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

remove this comment

@@ -845,22 +837,26 @@ func (t *http2Client) handleData(f *http2.DataFrame) {
t.notifyError(connectionErrorf(true, err, "%v", err))
return
}
// Decouple connection's flow control from application's read.
// An update on connection's flow control should not depend on
// whether user-applicaiton has read the data or not. Such a
Copy link
Member

Choose a reason for hiding this comment

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

s/user-applicaiton/user application

(ditto for the comment further down)

return false, nil
})

// Exhaust client's conneciton window.
Copy link
Member

Choose a reason for hiding this comment

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

typo: connection

@MakMukhi MakMukhi merged commit 1e47334 into grpc:master Jun 1, 2017
@menghanl menghanl added 1.4 Type: Performance Performance improvements (CPU, network, memory, etc) labels Jun 7, 2017
@MakMukhi MakMukhi deleted the decouple branch May 4, 2018 02:02
@lock lock bot locked as resolved and limited conversation to collaborators Oct 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Performance Performance improvements (CPU, network, memory, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants