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

Method CancelAndMarkInactive

be/src/runtime/io/request-context.cc:348–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346}
347
348void RequestContext::CancelAndMarkInactive() {
349 Cancel();
350
351 unique_lock<mutex> l(lock_);
352 DCHECK_NE(state_, Inactive);
353 DCHECK(Validate()) << endl << DebugString();
354
355 // Wait until the ranges finish up.
356 while (num_disks_with_ranges_ > 0) disks_complete_cond_var_.Wait(l);
357
358 // Validate that no ranges are active.
359 DCHECK_EQ(0, active_scan_ranges_.size()) << endl << DebugString();
360
361 // Validate that no threads are active and the context is not queued.
362 for (const PerDiskState& disk_state : disk_states_) {
363 DCHECK_EQ(0, disk_state.in_flight_ranges()->size()) << endl << DebugString();
364 DCHECK_EQ(0, disk_state.unstarted_scan_ranges()->size()) << endl << DebugString();
365 DCHECK_EQ(0, disk_state.num_threads_in_op()) << endl << DebugString();
366 DCHECK(!disk_state.is_on_queue()) << endl << DebugString();
367 }
368 DCHECK(Validate()) << endl << DebugString();
369 state_ = Inactive;
370}
371
372void RequestContext::AddRangeToDisk(const unique_lock<mutex>& lock,
373 RequestRange* range, ScheduleMode schedule_mode) {

Callers 1

UnregisterContextMethod · 0.80

Calls 8

in_flight_rangesMethod · 0.80
unstarted_scan_rangesMethod · 0.80
num_threads_in_opMethod · 0.80
is_on_queueMethod · 0.80
ValidateFunction · 0.50
DebugStringFunction · 0.50
WaitMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected