mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 02:41:59 +00:00
Change cancellation reason for Backups timeout.
This commit is contained in:
parent
7599020b87
commit
8d43e3bc90
@ -747,7 +747,7 @@ void BackupCoordinationStageSync::cancelQueryIfDisconnectedTooLong()
|
||||
/// we don't want the watching thread to try waiting here for retries or a reconnection).
|
||||
/// Also we don't set the `state.host_with_error` field here because `state.host_with_error` can only be set
|
||||
/// AFTER creating the 'error' node (see the comment for `State`).
|
||||
process_list_element->cancelQuery(CancelReason::TIMEOUT, exception);
|
||||
process_list_element->cancelQuery(CancelReason::CANCELLED_BY_USER, exception);
|
||||
|
||||
state_changed.notify_all();
|
||||
}
|
||||
|
@ -509,10 +509,7 @@ void QueryStatus::throwProperExceptionIfNeeded(const UInt64 & max_execution_time
|
||||
additional_error_part = fmt::format("elapsed {} ms, ", static_cast<double>(elapsed_ns) / 1000000000ULL);
|
||||
|
||||
if (cancel_reason == CancelReason::TIMEOUT)
|
||||
{
|
||||
cancel_reason = CancelReason::UNDEFINED; // We can assign only CancelReason::TIMEOUT to cancel_reason, so we need to assign it back to UNDEFINED
|
||||
throw Exception(ErrorCodes::TIMEOUT_EXCEEDED, "Timeout exceeded: {}maximum: {} ms", additional_error_part, max_execution_time / 1000.0);
|
||||
}
|
||||
throwQueryWasCancelled();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user