Merge branch 'stable-3.0' into stable-3.1 * stable-3.0: Fix issue with skipping events from high-availability Change-Id: Ia235b74761da0262de3fac5aca9673fdc28403f5
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)