Improve error message on unknown packet for distributed queries

Although replica information is likely already empty (since it was
reseted due to error or disconnect), but let's keep it for now.
This commit is contained in:
Azat Khuzhin 2020-08-17 21:37:23 +03:00
parent b449b661e2
commit 3c6a8ed7be

View File

@ -237,7 +237,9 @@ Block RemoteQueryExecutor::read()
default: default:
got_unknown_packet_from_replica = true; got_unknown_packet_from_replica = true;
throw Exception("Unknown packet from server", ErrorCodes::UNKNOWN_PACKET_FROM_SERVER); throw Exception(ErrorCodes::UNKNOWN_PACKET_FROM_SERVER, "Unknown packet {} from one of the following replicas: {}",
toString(packet.type),
multiplexed_connections->dumpAddresses());
} }
} }
} }
@ -276,7 +278,9 @@ void RemoteQueryExecutor::finish()
default: default:
got_unknown_packet_from_replica = true; got_unknown_packet_from_replica = true;
throw Exception("Unknown packet from server", ErrorCodes::UNKNOWN_PACKET_FROM_SERVER); throw Exception(ErrorCodes::UNKNOWN_PACKET_FROM_SERVER, "Unknown packet {} from one of the following replicas: {}",
toString(packet.type),
multiplexed_connections->dumpAddresses());
} }
} }