Log cancelled fetch collisions without reschedule
Log when a fetch task is cancelled and the project is locked by another
in-flight fetch. In this case the task is not rescheduled; previously
this path exited silently, making it harder to diagnose why a
replication did not retry.
Change-Id: I0abc0dc2f5d38014ce79a46958f295ebf32c9c4f
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchOne.java b/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchOne.java
index 76ecd80..7f69304 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchOne.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchOne.java
@@ -489,6 +489,14 @@
e.getConflictingTaskId());
pool.reschedule(this, Source.RetryReason.COLLISION);
isCollision = true;
+ } else {
+ repLog.info(
+ "[{}] Project {} is locked. Task is cancelled and conflicting with in-flight fetch task"
+ + " [{}]. NOT rescheduling replication from {}.",
+ taskIdHex,
+ projectName,
+ e.getConflictingTaskId(),
+ uri);
}
}
}