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

Method ExecCompleteCb

be/src/runtime/coordinator-backend-state.cc:242–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240}
241
242void Coordinator::BackendState::ExecCompleteCb(
243 TypedCountingBarrier<Status>* exec_status_barrier, int64_t start_ms) {
244 {
245 lock_guard<mutex> l(lock_);
246 exec_rpc_status_ = exec_rpc_controller_.status();
247
248 Status complete_cb_debug_status =
249 DebugAction(exec_params_.query_options(), "IMPALA_MISS_EXEC_COMPLETE_CB");
250 if (UNLIKELY(exec_rpc_status_.ok() && !complete_cb_debug_status.ok())) {
251 // Simulate the missing of callback for successful RPC.
252 LOG(ERROR) << "Debug action: missing ExecComplete callback";
253 return;
254 }
255
256 rpc_latency_ = MonotonicMillis() - start_ms;
257
258 if (!exec_rpc_status_.ok()) {
259 // Return CANCELLED instead of ABORTED if the RPC is cancelled.
260 if (cancel_exec_rpc_ && exec_rpc_status_.IsAborted()) {
261 LOG(ERROR) << "ExecQueryFInstances rpc query_id=" << PrintId(query_id_)
262 << " was aborted by cancellation";
263 status_ = Status::CANCELLED;
264 exec_done_ = true;
265 exec_status_barrier->NotifyRemaining(status_);
266 } else {
267 SetExecError(
268 FromKuduStatus(exec_rpc_status_, "Exec() rpc failed"), exec_status_barrier);
269 }
270 goto done;
271 }
272
273 Status exec_status = StatusFromProto(exec_response_.status());
274 if (!exec_status.ok()) {
275 SetExecError(exec_status, exec_status_barrier);
276 goto done;
277 }
278
279 for (const auto& entry : instance_stats_map_) entry.second->stopwatch_.Start();
280 VLOG_FILE << "rpc succeeded: ExecQueryFInstances query_id=" << PrintId(query_id_);
281 exec_done_ = true;
282 last_report_time_ms_ = GenerateReportTimestamp();
283 exec_status_barrier->Notify(Status::OK());
284 }
285done:
286 // Notify after releasing 'lock_' so that we don't wake up a thread just to have it
287 // immediately block again.
288 exec_done_cv_.NotifyAll();
289}
290
291void Coordinator::BackendState::ExecAsync(const DebugOptions& debug_options,
292 const FilterRoutingTable& filter_routing_table,

Callers

nothing calls this directly

Calls 12

DebugActionFunction · 0.85
MonotonicMillisFunction · 0.85
PrintIdFunction · 0.85
FromKuduStatusFunction · 0.85
StatusFromProtoFunction · 0.85
OKFunction · 0.85
NotifyAllMethod · 0.80
statusMethod · 0.45
okMethod · 0.45
NotifyRemainingMethod · 0.45
StartMethod · 0.45
NotifyMethod · 0.45

Tested by

no test coverage detected