| commit | b0e7aa63cf3e6ee2afb82d96aa117e38600b0015 | [log] [tgz] |
|---|---|---|
| author | Luca Milanesio <luca.milanesio@gmail.com> | Tue Jul 01 10:53:46 2025 +0100 |
| committer | Luca Milanesio <luca.milanesio@gmail.com> | Tue Jul 01 10:53:46 2025 +0100 |
| tree | 5e546deba4d82594a02f7efd9f4d002e25fbec6f | |
| parent | e94dfc98f0d68f2699daf43dc3ee56b18a4c9fc7 [diff] | |
| parent | 83e15b020a4693bbc0daa24acf6e08bb9e8f8864 [diff] |
Merge branch 'stable-3.11' into stable-3.12 * stable-3.11: Fix concurrent pushes to the same target URI Change-Id: I7b5778de0a757023180e5d02f934bbf57e354936
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 d535934..41a9a49 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java
@@ -672,7 +672,7 @@ } RunwayStatus requestRunway(PushOne op) { - stateLock.withWriteLock( + return stateLock.withWriteLock( op.getURI(), () -> { if (op.wasCanceled()) { @@ -685,9 +685,8 @@ } op.notifyNotAttempted(op.setStartedRefs(replicationTasksStorage.get().start(op))); queue.inFlight.put(op.getURI(), op); - return null; + return RunwayStatus.allowed(); }); - return RunwayStatus.allowed(); } void notifyFinished(PushOne op) {