maedhroz commented on code in PR #1796:
URL: https://github.com/apache/cassandra/pull/1796#discussion_r952862408
##########
src/java/org/apache/cassandra/service/reads/ReadCallback.java:
##########
@@ -120,6 +121,12 @@ public void awaitResults() throws ReadFailureException,
ReadTimeoutException
*/
int received = resolver.responses.size();
boolean failed = failures > 0 && (blockFor > received ||
!resolver.isDataPresent());
+ // If all messages came back as a TIMEOUT then signaled=true and
failed=true.
+ // Need to distinguish between a timeout and a failure (network, bad
data, etc.), so store an extra field.
+ // see CASSANDRA-17828
+ boolean timedout = !signaled;
+ if (failed)
+ timedout = RequestCallback.isTimeout(new
HashMap<>(failureReasonByEndpoint));
Review Comment:
nit: Defensive copy of `failureReasonByEndpoint` isn't strictly necessary
now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]