Tweak error code in ZooKeeper library for correct expectations from the calling code [#CLICKHOUSE-3916]

This commit is contained in:
Alexey Milovidov 2018-08-27 15:19:22 +03:00
parent 9b358e037e
commit eb165a0616

View File

@ -1265,7 +1265,9 @@ void ZooKeeper::receiveEvent()
if (!response) if (!response)
std::terminate(); std::terminate();
response->error = ZMARSHALLINGERROR; /// In case we cannot read the response, we should indicate it as the error of that type
/// when the user cannot assume whether the request was processed or not.
response->error = ZCONNECTIONLOSS;
if (request_info.callback) if (request_info.callback)
request_info.callback(*response); request_info.callback(*response);