commit | a4638e8cee55159794630988f39fb183a42f6517 | [log] [tgz] |
---|---|---|
author | Marcin Czech <maczech@gmail.com> | Wed Dec 15 13:10:00 2021 +0100 |
committer | Marcin Czech <maczech@gmail.com> | Wed Dec 15 13:10:00 2021 +0100 |
tree | 70ff2ea8fef61bf0cf5226e8f3a5746fd89b2885 | |
parent | 835a8e48560bf5f047e6ebb06b885625cb5b8287 [diff] | |
parent | e9a9baa151e09bfb4a99bc141a64fa4163398384 [diff] |
Merge branch 'stable-3.2' into stable-3.3 * stable-3.2: Fix issue with skipping events from high-availability Change-Id: Ib8a845ee8706189a45637700b0dd50218606726c
diff --git a/src/main/java/com/googlesource/gerrit/plugins/multisite/forwarder/ForwarderTask.java b/src/main/java/com/googlesource/gerrit/plugins/multisite/forwarder/ForwarderTask.java index 329b5cb..c5706a5 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/multisite/forwarder/ForwarderTask.java +++ b/src/main/java/com/googlesource/gerrit/plugins/multisite/forwarder/ForwarderTask.java
@@ -15,9 +15,9 @@ package com.googlesource.gerrit.plugins.multisite.forwarder; public abstract class ForwarderTask implements Runnable { - private final Thread callerThread = Thread.currentThread(); + private final String callerThreadName = Thread.currentThread().getName(); - public Thread getCallerThread() { - return callerThread; + public String getCallerThreadName() { + return callerThreadName; } }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/multisite/forwarder/broker/BrokerForwarder.java b/src/main/java/com/googlesource/gerrit/plugins/multisite/forwarder/broker/BrokerForwarder.java index 3522731..975916a 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/multisite/forwarder/broker/BrokerForwarder.java +++ b/src/main/java/com/googlesource/gerrit/plugins/multisite/forwarder/broker/BrokerForwarder.java
@@ -35,7 +35,7 @@ } protected boolean currentThreadBelongsToHighAvailabilityPlugin(ForwarderTask task) { - String currentThreadName = task.getCallerThread().getName(); + String currentThreadName = task.getCallerThreadName(); return currentThreadName.contains(HIGH_AVAILABILITY_PLUGIN) || currentThreadName.contains(HIGH_AVAILABILITY_FORWARDER)