commit | 5465d0757a29918a20da49ba5fb5f36bc18b7e9c | [log] [tgz] |
---|---|---|
author | Marcin Czech <maczech@gmail.com> | Thu Nov 16 08:32:53 2023 +0100 |
committer | Marcin Czech <maczech@gmail.com> | Thu Nov 16 08:32:53 2023 +0100 |
tree | ca6fb2fcd38596187722232c075958f5e9ff9800 | |
parent | b4be880d397674addc3e684c052a669b2cc64531 [diff] | |
parent | 614134a569e576adad0dd6c8b7c11449a7b3dce7 [diff] |
Merge branch 'stable-3.7' into stable-3.8 * stable-3.7: Remove events from beforeStartupEventsQueue in-memory queue Change-Id: I6a214ee9f9f571e42fe5049412ae7d5ea65ffe58
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/pull/ReplicationQueue.java b/src/main/java/com/googlesource/gerrit/plugins/replication/pull/ReplicationQueue.java index aafe12f..ef95596 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/pull/ReplicationQueue.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/pull/ReplicationQueue.java
@@ -546,7 +546,8 @@ private void fireBeforeStartupEvents() { Set<String> eventsReplayed = new HashSet<>(); - for (ReferenceUpdatedEvent event : beforeStartupEventsQueue) { + ReferenceUpdatedEvent event; + while ((event = beforeStartupEventsQueue.poll()) != null) { String eventKey = String.format("%s:%s", event.projectName(), event.refName()); if (!eventsReplayed.contains(eventKey)) { repLog.info("Firing pending task {}", event);