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

Method ReleaseResources

be/src/runtime/runtime-state.cc:344–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342}
343
344void RuntimeState::ReleaseResources() {
345 DCHECK(!released_resources_);
346 if (resource_pool_ != nullptr) {
347 ExecEnv::GetInstance()->thread_mgr()->DestroyPool(move(resource_pool_));
348 }
349 // Release the reservation, which should be unused at the point.
350 if (instance_buffer_reservation_ != nullptr) instance_buffer_reservation_->Close();
351
352 // No more memory should be tracked for this instance at this point.
353 if (instance_mem_tracker_->consumption() != 0) {
354 LOG(WARNING) << "Query " << PrintId(query_id()) << " may have leaked memory." << endl
355 << instance_mem_tracker_->LogUsage(MemTracker::UNLIMITED_DEPTH);
356 }
357 instance_mem_tracker_->Close();
358
359 if (local_query_state_.get() != nullptr) {
360 local_query_state_->ReleaseBackendResourceRefcount();
361 }
362 released_resources_ = true;
363}
364
365void RuntimeState::SetRPCErrorInfo(NetworkAddressPB dest_node, int16_t posix_error_code) {
366 std::lock_guard<SpinLock> l(aux_error_info_lock_);

Callers

nothing calls this directly

Calls 9

moveFunction · 0.85
PrintIdFunction · 0.85
DestroyPoolMethod · 0.80
thread_mgrMethod · 0.80
LogUsageMethod · 0.80
getMethod · 0.65
CloseMethod · 0.45
consumptionMethod · 0.45

Tested by

no test coverage detected