Skip to content

Commit

Permalink
Merge pull request #2964 from yandex/zookeeper-tweak-error-codes
Browse files Browse the repository at this point in the history
Tweak error code in ZooKeeper library for correct expectations from t…
  • Loading branch information
alexey-milovidov committed Aug 27, 2018
2 parents eb5f571 + eb165a0 commit 2a99560
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dbms/src/Common/ZooKeeper/ZooKeeperImpl.cpp
Expand Up @@ -1265,7 +1265,9 @@ void ZooKeeper::receiveEvent()
if (!response)
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)
request_info.callback(*response);

Expand Down

0 comments on commit 2a99560

Please sign in to comment.