in src/main/java/com/ericsson/gerrit/plugins/highavailability/forwarder/rest/RestForwarder.java [212:237]
boolean execute() throws ForwardingException {
log.atFine().log("Executing %s %s towards %s", action, key, destination);
try {
execCnt++;
tryOnce();
log.atFine().log("%s %s towards %s OK", action, key, destination);
return true;
} catch (ForwardingException e) {
int maxTries = cfg.http().maxTries();
log.atFine().withCause(e).log(
"Failed to %s %s on %s [%d/%d]", action, key, destination, execCnt, maxTries);
if (!e.isRecoverable()) {
log.atSevere().withCause(e).log(
"%s %s towards %s failed with unrecoverable error; giving up",
action, key, destination);
throw e;
}
if (execCnt >= maxTries) {
log.atSevere().log(
"Failed to %s %s on %s after %d tries; giving up",
action, key, destination, maxTries);
throw e;
}
}
return false;
}