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

Method CollectQueriesToCancel

be/src/runtime/query-exec-mgr.cc:228–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228void QueryExecMgr::CollectQueriesToCancel(std::function<bool(QueryState*)> filter,
229 bool is_coord_active, vector<QueryExecMgr::QueryCancellationTask>* to_cancel) {
230 DCHECK(to_cancel != nullptr);
231 ExecEnv::GetInstance()->query_exec_mgr()->qs_map_.DoFuncForAllEntries(
232 [&](QueryState* qs) {
233 if (qs != nullptr && !qs->IsCancelled() && filter(qs)) {
234 // decremented by ReleaseQueryState()
235 AcquireQueryStateLocked(qs);
236 to_cancel->push_back(QueryCancellationTask(qs, is_coord_active));
237 }
238 });
239}
240
241void QueryExecMgr::CancelQueries(const QueryCancellationTask& to_cancel) {
242 QueryState* qs = to_cancel.GetQueryState();

Callers

nothing calls this directly

Calls 6

filterFunction · 0.85
DoFuncForAllEntriesMethod · 0.80
query_exec_mgrMethod · 0.80
push_backMethod · 0.80
IsCancelledMethod · 0.45

Tested by

no test coverage detected