storage_proxy: fix rpc connection failure handling by read operation
Currently rpc::closed_error is not counted towards replica failure during read and thus read operation waits for timeout even if one of the nodes dies. Fix this by counting rpc::closed_error towards failed attempts. Fixes #3590. Message-Id: <20180708123522.GC28899@scylladb.com>
This commit is contained in:
@@ -1991,9 +1991,10 @@ public:
|
||||
try {
|
||||
std::rethrow_exception(eptr);
|
||||
} catch (rpc::closed_error&) {
|
||||
return; // do not report connection closed exception, gossiper does that
|
||||
// do not report connection closed exception, gossiper does that
|
||||
} catch (rpc::timeout_error&) {
|
||||
return; // do not report timeouts, the whole operation will timeout and be reported
|
||||
// do not report timeouts, the whole operation will timeout and be reported
|
||||
return; // also do not report timeout as replica failure for the same reason
|
||||
} catch(std::exception& e) {
|
||||
why = e.what();
|
||||
} catch(...) {
|
||||
@@ -2004,7 +2005,9 @@ public:
|
||||
on_error(ep);
|
||||
}
|
||||
|
||||
slogger.error("Exception when communicating with {}: {}", ep, why);
|
||||
if (why.length()) {
|
||||
slogger.error("Exception when communicating with {}: {}", ep, why);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user