| 1795 | } |
| 1796 | |
| 1797 | void ImpalaServer::FinishUnregisterQuery(const QueryHandle& query_handle) { |
| 1798 | DCHECK_EQ(this, ExecEnv::GetInstance()->impala_server()); |
| 1799 | // Do all the finalization before removing the QueryDriver from the map so that |
| 1800 | // concurrent operations, e.g. GetRuntimeProfile() can find the query. |
| 1801 | CloseClientRequestState(query_handle); |
| 1802 | DebugActionNoFail(query_handle->query_options(), "CLOSED_NOT_UNREGISTERED"); |
| 1803 | // Make the QueryDriver inaccessible. There is a time window where the query is |
| 1804 | // both in 'query_driver_map_' and 'query_locations_'. |
| 1805 | Status status = query_handle.query_driver()->Unregister(&query_driver_map_); |
| 1806 | string err_msg = "QueryDriver can only be deleted once: " + status.GetDetail(); |
| 1807 | DCHECK(status.ok()) << err_msg; |
| 1808 | if (UNLIKELY(!status.ok())) { |
| 1809 | LOG(ERROR) << status.GetDetail(); |
| 1810 | } else { |
| 1811 | VLOG_QUERY << "Query successfully unregistered: query_id=" |
| 1812 | << PrintId(query_handle->query_id()); |
| 1813 | } |
| 1814 | } |
| 1815 | |
| 1816 | void ImpalaServer::UnregisterQueryDiscardResult( |
| 1817 | const TUniqueId& query_id, const Status* cause, bool interrupted) { |
nothing calls this directly
no test coverage detected