commit | 614134a569e576adad0dd6c8b7c11449a7b3dce7 | [log] [tgz] |
---|---|---|
author | Marcin Czech <maczech@gmail.com> | Thu Nov 16 08:32:02 2023 +0100 |
committer | Marcin Czech <maczech@gmail.com> | Thu Nov 16 08:32:02 2023 +0100 |
tree | 27fb29d7227a6fda07017f2ae49c3a3d0424f674 | |
parent | f1710cc04ccb5374675cb43646db190ad1767e21 [diff] | |
parent | 4e7efdf93fd1ddecba56438160d2527f618da364 [diff] |
Merge branch 'stable-3.6' into stable-3.7 * stable-3.6: Remove events from beforeStartupEventsQueue in-memory queue Change-Id: Iae3655c5a3dbe649af60fe8d364d4a5911f33613
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);