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

prep work for enabling caching #7862

Merged
merged 11 commits into from
Sep 1, 2016
Merged

Conversation

makdharma
Copy link
Contributor

Added new header grpc-payload-bin
Added new channel arg for setting max payload size
Ability to create a GET request in client filter
Ability to parse the payload from header in server filter.

Added new header grpc-payload-bin
Added new channel arg for setting max payload size
Ability to create a GET request in client filter
Ability to parse the payload from header in server filter.

if (method == GRPC_MDELEM_METHOD_GET) {
gpr_slice slice;
/* TODO (makdharma): extend code for messages with multiple slices */
Copy link
Member

Choose a reason for hiding this comment

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

Needs to be completed before submission

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

freeing up payload_bytes.
returning GET response only once.
@makdharma
Copy link
Contributor Author

test this please

@makdharma
Copy link
Contributor Author

@nicolasnoble Test failures look like a flake, could you please confirm and LGTM if so?

@nicolasnoble
Copy link
Member

I don't have a clear idea as to why clang-format seems to have lost its head here and is fighting with itself. We've been taking precautions to make sure we are sticking on a very specific version of it for this exact reason.


/* Decide which HTTP VERB to use */
grpc_mdelem *method = GRPC_MDELEM_METHOD_POST;
if (op->send_initial_metadata != NULL && (op->send_initial_metadata_flags &
Copy link
Member

Choose a reason for hiding this comment

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

Comment that we need both send initial metadata and the first send in the same batch (for now) to enable GET

Makarand Dharmapurikar added 2 commits August 30, 2016 16:59
modified comment about when GET verb is used.
Added code to read data from send_message and defer the op when
  it is not fully available.
clang-format one more time.
cacheable, and the operation contains both initial metadata and send message,
and the payload is below the size threshold, and all the data
for this request is immediately available. */
grpc_mdelem *method = GRPC_MDELEM_METHOD_POST;
Copy link
Member

@ctiller ctiller Aug 31, 2016

Choose a reason for hiding this comment

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

This whole block (up until line 261) could probably go into an if (op->send_initial_metadata) right?
That way we'd skip doing some complicated processing on other code paths (like, say, recv_initial_metadata)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK

Makarand Dharmapurikar added 2 commits August 31, 2016 15:42
moved method computation in a if block only when send_initial_metadata
is true.
@ctiller
Copy link
Member

ctiller commented Sep 1, 2016

LGTM

@makdharma makdharma merged commit 9d7e049 into grpc:master Sep 1, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jan 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants