| 817 | } |
| 818 | |
| 819 | Status Coordinator::SetNonErrorTerminalState(const ExecState state) { |
| 820 | DCHECK(state == ExecState::RETURNED_RESULTS || state == ExecState::CANCELLED); |
| 821 | Status ret_status; |
| 822 | { |
| 823 | lock_guard<SpinLock> l(exec_state_lock_); |
| 824 | // May have already entered a terminal state, in which case nothing to do. |
| 825 | if (!IsExecuting()) return exec_status_; |
| 826 | DCHECK(exec_status_.ok()) << exec_status_; |
| 827 | exec_state_.Store(state); |
| 828 | if (state == ExecState::CANCELLED) exec_status_ = Status::CANCELLED; |
| 829 | ret_status = exec_status_; |
| 830 | } |
| 831 | VLOG_QUERY << Substitute("ExecState: query id=$0 execution $1", PrintId(query_id()), |
| 832 | state == ExecState::CANCELLED ? "cancelled" : "completed"); |
| 833 | HandleExecStateTransition(ExecState::EXECUTING, state); |
| 834 | return ret_status; |
| 835 | } |
| 836 | |
| 837 | Status Coordinator::UpdateExecState(const Status& status, |
| 838 | const TUniqueId* failed_finst, const string& instance_hostname) { |
nothing calls this directly
no test coverage detected