MCPcopy Create free account
hub / github.com/apache/impala / QueueResponseForCall

Method QueueResponseForCall

be/src/kudu/rpc/connection.cc:610–633  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

608};
609
610void Connection::QueueResponseForCall(unique_ptr<InboundCall> call) {
611 // This is usually called by the IPC worker thread when the response
612 // is set, but in some circumstances may also be called by the
613 // reactor thread (e.g. if the service has shut down)
614
615 DCHECK_EQ(direction_, SERVER);
616
617 // If the connection is torn down, then the QueueOutbound() call that
618 // eventually runs in the reactor thread will take care of calling
619 // ResponseTransferCallbacks::NotifyTransferAborted.
620
621 TransferPayload tmp_slices;
622 call->SerializeResponseTo(&tmp_slices);
623
624 TransferCallbacks *cb = new ResponseTransferCallbacks(std::move(call), this);
625 // After the response is sent, can delete the InboundCall object.
626 // We set a dummy call ID and required feature set, since these are not needed
627 // when sending responses.
628 unique_ptr<OutboundTransfer> t(
629 OutboundTransfer::CreateForCallResponse(tmp_slices, cb));
630
631 QueueTransferTask *task = new QueueTransferTask(std::move(t), this);
632 reactor_thread_->reactor()->ScheduleReactorTask(task);
633}
634
635void Connection::set_confidential(bool is_confidential) {
636 is_confidential_ = is_confidential;

Callers 1

RespondMethod · 0.80

Calls 4

moveFunction · 0.85
SerializeResponseToMethod · 0.80
ScheduleReactorTaskMethod · 0.80
reactorMethod · 0.80

Tested by

no test coverage detected