diff options
author | Luca Milanesio <luca.milanesio@gmail.com> | 2019-07-13 23:20:54 +0100 |
---|---|---|
committer | Luca Milanesio <luca.milanesio@gmail.com> | 2019-07-16 06:32:48 +0000 |
commit | e780ae61cbbba3f88558a3620065d1fcdc0768c8 (patch) | |
tree | ee470aa14081665d01ab923906420e6b92c83c7a /src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java | |
parent | 9547d76a375827d79804704dadf716f47d176f0d (diff) |
Remove replication event from pending when runway is allowed
Consider a replication event not pending anymore *only if* the runway
is free and allowed to run. Removing it too early would result in a
ghost event which isn't officially pending but that will be eventually
run when rescheduled.
Change-Id: Ib0ffa3bec7a6d5d5be56e78a677e8b2133f91e18
Diffstat (limited to 'src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java')
-rw-r--r-- | src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java b/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java index 40f9900..9aab0f6 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java @@ -465,11 +465,11 @@ public class Destination { if (op.wasCanceled()) { return RunwayStatus.canceled(); } - pending.remove(op.getURI()); PushOne inFlightOp = inFlight.get(op.getURI()); if (inFlightOp != null) { return RunwayStatus.denied(inFlightOp.getId()); } + pending.remove(op.getURI()); inFlight.put(op.getURI(), op); } return RunwayStatus.allowed(); |