Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
Add missing log statement if replication was canceled
When rescheduling due to in-flight push log also the in-flight task ID
Make sure to always remove in-flight pushes
Change-Id: Ia3cff74476f360388d49ee68fc08ed96ab4b03e9
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 168c95f..14398c4 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
@@ -303,7 +303,9 @@
MDC.put(ID_MDC_KEY, HexFormat.fromInt(id));
RunwayStatus status = pool.requestRunway(this);
if (!status.isAllowed()) {
- if (!status.isCanceled()) {
+ if (status.isCanceled()) {
+ repLog.info("PushOp for replication to {} was canceled and thus won't be rescheduled", uri);
+ } else {
repLog.info(
"Rescheduling replication to {} to avoid collision with the in-flight push [{}].",
uri,