Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
PushOne: Improve logging of lock failure
Change-Id: Ic1c5984ea680293f15c8e21e99e7b058a688a77c
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java b/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
index e5a3775..5e187f6 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
@@ -368,9 +368,7 @@
repLog.atSevere().log("Cannot replicate to %s: %s", uri, cause.getMessage());
} else if (e instanceof LockFailureException) {
lockRetryCount++;
- // The LockFailureException message contains both URI and reason
- // for this failure.
- repLog.atSevere().log("Cannot replicate to %s: %s", uri, e.getMessage());
+ repLog.atSevere().log("Cannot replicate to %s due to lock failure", uri);
// The remote push operation should be retried.
if (lockRetryCount <= maxLockRetries) {
@@ -381,8 +379,7 @@
}
} else {
repLog.atSevere().log(
- "Giving up after %d occurrences of this error: %s during replication to %s",
- lockRetryCount, e.getMessage(), uri);
+ "Giving up after %d lock failures during replication to %s", lockRetryCount, uri);
}
} else {
if (canceledWhileRunning.get()) {