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

Add resource quota support to uv TCP code #8588

Merged
merged 4 commits into from
Nov 2, 2016

Conversation

murgatroid99
Copy link
Member

This gets Node tests working on master again.

@murgatroid99 murgatroid99 mentioned this pull request Nov 1, 2016
@@ -76,13 +76,30 @@ struct grpc_tcp_server {

/* shutdown callback */
grpc_closure *shutdown_complete;

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a docstring describing the role of resource_quota?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know what the docstring should say. I just copied this from the windows implementation, and the other implementations don't say.

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 "Pool of resources available to the libuv-based TCP server" (if that last bit is accurate).

Copy link
Member 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 that the first part is accurate. As far as I understand, it really is more of a "quota". You inform it when you need to allocate memory, and it tells you when that much of your quota is available.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, let's just leave it empty for now... there's plenty of docs in the related .h files.

grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota);
gpr_free(s);
return GRPC_ERROR_CREATE(GRPC_ARG_RESOURCE_QUOTA
" must be a pointer to a buffer pool");
Copy link
Contributor

Choose a reason for hiding this comment

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

will that result in a sensible error description?

Copy link
Member Author

Choose a reason for hiding this comment

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

I just copied this from the Windows implementation. I don't know.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, actually, I misread: it will, the value of the GRPC_ARG_RESOURCE_QUOTA on the previous will just be concat'd to the rest of the string. Never mind.

* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
*
Copy link
Contributor

Choose a reason for hiding this comment

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

this whole block looks like an accidental whitespace/formatting change.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I don't know how I did that. It's fixed now.

@murgatroid99 murgatroid99 merged commit 11948f7 into grpc:master Nov 2, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jan 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants