[ 
https://issues.apache.org/jira/browse/IMPALA-10705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Quanlong Huang updated IMPALA-10705:
------------------------------------
    Component/s: Backend

> Expose query retry failure
> --------------------------
>
>                 Key: IMPALA-10705
>                 URL: https://issues.apache.org/jira/browse/IMPALA-10705
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Backend
>            Reporter: Quanlong Huang
>            Priority: Major
>
> When encountering failures in submitting the retried query, there are no 
> means for clients to get the reason. To be specifit, in 
> QueryDriver::RetryQueryFromThread(), we handle errors in this pattern:
> {code:cpp}
>   // Run the new query.
>   status = retry_request_state->Exec();
>   if (!status.ok()) {
>     string error_msg =
>         Substitute("Exec for new query with id $0 failed", 
> PrintId(retry_query_id));
>     HandleRetryFailure(&status, &error_msg, request_state, retry_query_id);
>     return;
>   }
> {code}
> HandleRetryFailure() tries to add the non-ok status to the query state:
> {code:cpp}
> void QueryDriver::HandleRetryFailure(Status* status, string* error_msg,
>     ClientRequestState* request_state, const TUniqueId& retry_query_id) {
>   DCHECK(status != nullptr && !status->ok());
>   status->AddDetail(
>       Substitute("Failed to retry query $0", 
> PrintId(request_state->query_id())));
>   status->AddDetail(*error_msg);
>   discard_result(request_state->UpdateQueryStatus(*status));
>   parent_server_->UnregisterQueryDiscardResult(retry_query_id, false, status);
> }
> {code}
> But it's ignored since the original query already has a non-ok status 
> (otherwise it won't fail):
> {code:cpp}
> Status ClientRequestState::UpdateQueryStatus(const Status& status) {
>   // Preserve the first non-ok status
>   if (!status.ok() && query_status_.ok()) {
>     UpdateExecState(ExecState::ERROR);
>     query_status_ = status;
>     summary_profile_->AddInfoStringRedacted(QUERY_STATUS_KEY, 
> query_status_.GetDetail());
>   }
>   return status;
> }
> {code}
> So the failure is neither logged or shown in the query profile.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to