Mmuzaf commented on code in PR #2832:
URL: https://github.com/apache/cassandra/pull/2832#discussion_r1373266830
##########
src/java/org/apache/cassandra/repair/messages/RepairMessage.java:
##########
@@ -165,13 +188,37 @@ public void onFailure(InetAddressAndPort from,
RequestFailureReason failureReaso
backoff.computeWaitTime(attempt), backoff.unit());
return;
}
+ maybeRecordRetry(failureReason);
finalCallback.onFailure(from, failureReason);
return;
default:
throw new AssertionError("Unknown error handler: " +
allowed);
}
}
+ private void maybeRecordRetry(@Nullable RequestFailureReason
reason)
+ {
+ if (attempt <= 0)
+ return;
+ // we don't know what the prefix kind is... so use NONE...
this impacts logPrefix as it will cause us to use "repair" rather than "preview
repair" which may not be correct... but close enough...
+ String prefix =
PreviewKind.NONE.logPrefix(request.parentRepairSession());
+ RepairMetrics.retry(verb, attempt);
+ if (reason == null)
+ {
+ noSpam.info("{} Retry of repair verb " + verb + " was
successful after {} attempts", prefix, attempt);
+ }
+ else if (reason == RequestFailureReason.TIMEOUT)
+ {
+ noSpam.warn("{} Timeout for repair verb " + verb + ";
could not complete within {} attempts", prefix, attempt);
+ RepairMetrics.retryTimeout(verb);
+ }
+ else
+ {
+ noSpam.warn("{} Failure for repair verb " + verb + ";
could not complete within {} attempts", prefix, attempt);
Review Comment:
Is it worth logging the `reason` as well?
--
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]