Skip to content

[binder] Handle inbound flow control#27228

Merged
TaWeiTu merged 1 commit intogrpc:masterfrom
TaWeiTu:flow-control-inbound
Sep 8, 2021
Merged

[binder] Handle inbound flow control#27228
TaWeiTu merged 1 commit intogrpc:masterfrom
TaWeiTu:flow-control-inbound

Conversation

@TaWeiTu
Copy link
Copy Markdown
Contributor

@TaWeiTu TaWeiTu commented Sep 2, 2021

Tested locally with a Java server.

@TaWeiTu TaWeiTu added the release notes: no Indicates if PR should not be in release notes label Sep 2, 2021
@TaWeiTu TaWeiTu force-pushed the flow-control-inbound branch from 752f832 to 5e18e35 Compare September 2, 2021 08:12
@TaWeiTu TaWeiTu requested a review from sifmelcara September 2, 2021 08:48
@sifmelcara
Copy link
Copy Markdown
Contributor

sifmelcara commented Sep 2, 2021

I think we will want to raise this topic with Java team first before we commit an implementation. Can you open a PR at grpc/proposal to add this flow control spec to the wire format doc? (I think 4~5 sentences to briefly explain this should be enough)

}
gpr_log(GPR_INFO, "msg_data = %s", msg_data.c_str());
transport_stream_receiver_->NotifyRecvMessage(code, std::move(msg_data));
message_buffer_[code] += msg_data;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wonder if there exists a hint somewhere (ex. initial metadata) telling us expected total message size? So that we don't need to resize the message buffer

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if there's any since this hint won't make sense in streaming call scenario.

return binder_->Transact(BinderTransportTxCode(tx.GetTxCode()));
}

absl::Status WireWriterImpl::Ack(size_t num_bytes) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We reports total number of bytes received in this RPC call?

Again, we better document this in wire format doc..

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah I didn't find any document about this behavior. This is just what the Java implementation did.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've added this to the gRFC PR.

@TaWeiTu
Copy link
Copy Markdown
Contributor Author

TaWeiTu commented Sep 2, 2021

I think we will want to raise this topic with Java team first before we commit an implementation. Can you open a PR at grpc/proposal to add this flow control spec to the wire format doc? (I think 4~5 sentences to briefly explain this should be enough)

Opened grpc/proposal#258.

@TaWeiTu TaWeiTu force-pushed the flow-control-inbound branch 4 times, most recently from 755d547 to f830398 Compare September 3, 2021 10:00
@TaWeiTu TaWeiTu force-pushed the flow-control-inbound branch from f830398 to d9cb0f9 Compare September 6, 2021 13:25
@TaWeiTu TaWeiTu merged commit dff9e84 into grpc:master Sep 8, 2021
@copybara-service copybara-service bot added the imported Specifies if the PR has been imported to the internal repository label Sep 8, 2021
lidizheng pushed a commit to lidizheng/grpc that referenced this pull request Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

imported Specifies if the PR has been imported to the internal repository lang/core release notes: no Indicates if PR should not be in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants