| 1505 | } |
| 1506 | |
| 1507 | void ClientRequestState::MarkAsRetrying(const Status& status) { |
| 1508 | retry_state_.Store(RetryState::RETRYING); |
| 1509 | summary_profile_->AddInfoString( |
| 1510 | RETRY_STATUS_KEY, RetryStateToString(RetryState::RETRYING)); |
| 1511 | |
| 1512 | // Set the query status. |
| 1513 | query_status_ = status; |
| 1514 | summary_profile_->AddInfoStringRedacted(QUERY_STATUS_KEY, query_status_.GetDetail()); |
| 1515 | // The Query Status might be overwritten later if the retry fails. "Retry Cause" |
| 1516 | // preserves the original error that triggered the retry. |
| 1517 | summary_profile_->AddInfoStringRedacted("Retry Cause", query_status_.GetDetail()); |
| 1518 | } |
| 1519 | |
| 1520 | Status ClientRequestState::UpdateQueryStatus(const Status& status, bool log_error) { |
| 1521 | // Preserve the first non-ok status |
no test coverage detected