You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Quanlong Huang (Jira)" <ji...@apache.org> on 2021/05/17 08:19:00 UTC

[jira] [Updated] (IMPALA-10705) Expose query retry failure

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

Quanlong Huang updated IMPALA-10705:
------------------------------------
    Labels: observability  (was: )

> 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
>              Labels: observability
>
> 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: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org