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

Method ReleaseBackendResources

be/src/runtime/query-state.cc:130–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130void QueryState::ReleaseBackendResources() {
131 DCHECK(!released_backend_resources_);
132 // Clean up temporary files.
133 if (file_group_ != nullptr) file_group_->Close();
134 if (filter_bank_ != nullptr) filter_bank_->Close();
135 // Release any remaining reservation.
136 if (initial_reservations_ != nullptr) initial_reservations_->ReleaseResources();
137 if (buffer_reservation_ != nullptr) buffer_reservation_->Close();
138 if (desc_tbl_ != nullptr) desc_tbl_->ReleaseResources();
139 // Release any memory associated with codegen.
140 for (auto& elem : fragment_state_map_) {
141 elem.second->ReleaseResources();
142 }
143 // Mark the query as finished on the query MemTracker so that admission control will
144 // not consider the whole query memory limit to be "reserved".
145 query_mem_tracker_->set_query_exec_finished();
146 // At this point query execution should not be consuming any resources but some tracked
147 // memory may still be used by the ClientRequestState for result caching. The query
148 // MemTracker will be closed later when this QueryState is torn down.
149 released_backend_resources_ = true;
150}
151
152QueryState::~QueryState() {
153 DCHECK_EQ(refcnt_.Load(), 0);

Callers

nothing calls this directly

Calls 3

CloseMethod · 0.45
ReleaseResourcesMethod · 0.45

Tested by

no test coverage detected