mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Merge pull request #30594 from azat/fix-logical-error-on-connection-drain
Fix LOGICAL_ERROR on connection draining in case of ECONNRESET
This commit is contained in:
commit
f1e96ee9ac
@ -236,12 +236,12 @@ void HedgedConnections::sendCancel()
|
||||
if (!sent_query || cancelled)
|
||||
throw Exception("Cannot cancel. Either no query sent or already cancelled.", ErrorCodes::LOGICAL_ERROR);
|
||||
|
||||
cancelled = true;
|
||||
|
||||
for (auto & offset_status : offset_states)
|
||||
for (auto & replica : offset_status.replicas)
|
||||
if (replica.connection)
|
||||
replica.connection->sendCancel();
|
||||
|
||||
cancelled = true;
|
||||
}
|
||||
|
||||
Packet HedgedConnections::drain()
|
||||
|
Loading…
Reference in New Issue
Block a user