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:
alexey-milovidov 2021-10-24 05:34:27 +03:00 committed by GitHub
commit f1e96ee9ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()