mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-22 01:30:51 +00:00
dbms: Server: Correctly disconnect when exceptions occur in RemoteBlockInputStream. [#METR-15689]
This commit is contained in:
parent
beddce0927
commit
bc2de9a94d
@ -97,7 +97,7 @@ public:
|
||||
* все соединения, затем читаем и пропускаем оставшиеся пакеты чтобы
|
||||
* эти соединения не остались висеть в рассихронизированном состоянии.
|
||||
*/
|
||||
if (established || isQueryInProgress())
|
||||
if (established || isQueryInProgress() || isQueryCancelled())
|
||||
parallel_replicas->disconnect();
|
||||
}
|
||||
|
||||
@ -257,6 +257,12 @@ protected:
|
||||
return sent_query && !finished && !was_cancelled;
|
||||
}
|
||||
|
||||
/// Возвращает true, если запрос отправлен, а отменён до его завершения.
|
||||
bool isQueryCancelled() const
|
||||
{
|
||||
return sent_query && !finished && was_cancelled;
|
||||
}
|
||||
|
||||
/// Возвращает true, если никакой запрос не отправлен или один запрос уже выполнен.
|
||||
bool hasNoQueryInProgress() const
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user