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

Enable use of pollset_set for a channel call #6190

Merged
merged 19 commits into from
Jun 7, 2016

Conversation

dgquintas
Copy link
Contributor

No description provided.

@dgquintas dgquintas force-pushed the lb_pollset_propagation branch from 1dcba6c to 4afce7e Compare April 19, 2016 00:39
size_t count = call_stack->count;
grpc_call_element *call_elems;
char *user_data;
size_t i;

GPR_ASSERT(!(pollset != NULL && or_pollset_set != NULL));
Copy link
Member

Choose a reason for hiding this comment

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

makes my brain bleed: rename parameter? (I know I suggested the name)

Copy link
Member

Choose a reason for hiding this comment

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

I've always kind of liked:

GPR_ASSERT((a == NULL) + (b == NULL) == 1);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done and done. The new name isn't brilliant either, but...

@dgquintas dgquintas force-pushed the lb_pollset_propagation branch 5 times, most recently from 178aaa0 to 870860c Compare April 20, 2016 20:09
@dgquintas dgquintas force-pushed the lb_pollset_propagation branch from 870860c to e5c485d Compare April 20, 2016 22:23
@@ -68,6 +68,7 @@ void grpc_subchannel_call_holder_init(
holder->waiting_ops_capacity = 0;
holder->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING;
holder->owning_call = owning_call;
holder->pollset_set = grpc_pollset_set_create();
Copy link
Member

Choose a reason for hiding this comment

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

This is going to be quite bad for performance. The typical case is that we just want to set a pollset and not go ahead and create a new big container of object. Suggest bifurcating here and only creating the pollset_set when necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@ctiller
Copy link
Member

ctiller commented May 31, 2016

Needs a merge.

Looking at the code now I'm a bit worried about pops too: the variable name is ambiguous as to whether it represents a grpc_pops, or a pointer to some operations.

grpc_polling_entity?

Apologies for the bikeshed.

@dgquintas dgquintas force-pushed the lb_pollset_propagation branch from d24301c to 2a50dfe Compare May 31, 2016 22:11
@dgquintas
Copy link
Contributor Author

No worries :) I'm getting really good at grep+xargs+sed

Done. PTAL.

enum pops_tag { POPS_NONE, POPS_POLLSET, POPS_POLLSET_SET } tag;
} grpc_polling_entity;

grpc_polling_entity grpc_pops_create_from_pollset_set(
Copy link
Member

Choose a reason for hiding this comment

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

We probably want to rename these functions for consistency also

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Woops. Done.

@ctiller
Copy link
Member

ctiller commented Jun 6, 2016

LGTM... feel free to merge on green.

@jtattermusch
Copy link
Contributor

@dgquintas
Copy link
Contributor Author

Re-running to make sure

@dgquintas
Copy link
Contributor Author

FWIW, a local run under docker passes fine on my machine (yes, anecdata, let's see what jenkins thinks).

@dgquintas
Copy link
Contributor Author

The current jenkins run (without any further changes to this PR) is passing for ruby (https://grpc-testing.appspot.com/job/gRPC_pull_requests/9633/). There are a couple red exclamation marks for python/windows due to infrastructure hiccups. I'd argue that this run plus the previous one show this PR is good to be merged.

@jtattermusch jtattermusch merged commit d30d4e2 into grpc:master Jun 7, 2016
@@ -278,7 +278,8 @@ static int refill_queue(shard_type *shard, gpr_timespec now) {
return !grpc_timer_heap_is_empty(&shard->heap);
}

/* This pops the next non-cancelled timer with deadline <= now from the queue,
/* This pollent the next non-cancelled timer with deadline <= now from the

Choose a reason for hiding this comment

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

Unintended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ugh, yes. The perils of global sed search-and-replace. I'll send a fixing PR momentarily.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! #6832 Thanks!

@lock lock bot locked as resolved and limited conversation to collaborators Jan 27, 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.

5 participants