Merge with master and fix a bad-merge

pull/10662/head
Sree Kuchibhotla 8 years ago
parent 0fb74c2bb7
commit 8ac5c6deda
  1. 14
      src/core/lib/surface/completion_queue.c

@ -609,14 +609,16 @@ static void cq_end_op_for_pluck(grpc_exec_ctx *exec_ctx,
GPR_TIMER_BEGIN("cq_end_op_for_pluck", 0); GPR_TIMER_BEGIN("cq_end_op_for_pluck", 0);
if (grpc_api_trace || if (GRPC_TRACER_ON(grpc_api_trace) ||
(grpc_trace_operation_failures && error != GRPC_ERROR_NONE)) { (GRPC_TRACER_ON(grpc_trace_operation_failures) &&
error != GRPC_ERROR_NONE)) {
const char *errmsg = grpc_error_string(error); const char *errmsg = grpc_error_string(error);
GRPC_API_TRACE( GRPC_API_TRACE(
"cq_end_op_for_pluck(exec_ctx=%p, cc=%p, tag=%p, error=%s, " "cq_end_op_for_pluck(exec_ctx=%p, cc=%p, tag=%p, error=%s, "
"done=%p, done_arg=%p, storage=%p)", "done=%p, done_arg=%p, storage=%p)",
7, (exec_ctx, cc, tag, errmsg, done, done_arg, storage)); 7, (exec_ctx, cc, tag, errmsg, done, done_arg, storage));
if (grpc_trace_operation_failures && error != GRPC_ERROR_NONE) { if (GRPC_TRACER_ON(grpc_trace_operation_failures) &&
error != GRPC_ERROR_NONE) {
gpr_log(GPR_ERROR, "Operation failed: tag=%p, error=%s", tag, errmsg); gpr_log(GPR_ERROR, "Operation failed: tag=%p, error=%s", tag, errmsg);
} }
} }
@ -829,7 +831,7 @@ static grpc_event cq_next(grpc_completion_queue *cc, gpr_timespec deadline,
/* The main polling work happens in grpc_pollset_work */ /* The main polling work happens in grpc_pollset_work */
gpr_mu_lock(cqd->mu); gpr_mu_lock(cqd->mu);
grpc_error *err = cc->poller_vtable->work(&exec_ctx, POLLSET_FROM_CQ(cc), grpc_error *err = cc->poller_vtable->work(&exec_ctx, POLLSET_FROM_CQ(cc),
NULL, now, deadline); NULL, now, iteration_deadline);
gpr_mu_unlock(cqd->mu); gpr_mu_unlock(cqd->mu);
if (err != GRPC_ERROR_NONE) { if (err != GRPC_ERROR_NONE) {
@ -1029,6 +1031,7 @@ static grpc_event cq_pluck(grpc_completion_queue *cc, void *tag,
} }
is_finished_arg.first_loop = false; is_finished_arg.first_loop = false;
del_plucker(cc, tag, &worker); del_plucker(cc, tag, &worker);
}
done: done:
GRPC_SURFACE_TRACE_RETURNED_EVENT(cc, &ret); GRPC_SURFACE_TRACE_RETURNED_EVENT(cc, &ret);
GRPC_CQ_INTERNAL_UNREF(&exec_ctx, cc, "pluck"); GRPC_CQ_INTERNAL_UNREF(&exec_ctx, cc, "pluck");
@ -1041,8 +1044,7 @@ static grpc_event cq_pluck(grpc_completion_queue *cc, void *tag,
} }
grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag,
gpr_timespec deadline, gpr_timespec deadline, void *reserved) {
void *reserved) {
return cc->vtable->pluck(cc, tag, deadline, reserved); return cc->vtable->pluck(cc, tag, deadline, reserved);
} }

Loading…
Cancel
Save