From 2eef0fbb10507565d145844cb7fd83b0bea90118 Mon Sep 17 00:00:00 2001 From: Francesco Nigro Date: Wed, 2 May 2018 19:44:11 +0200 Subject: [PATCH] ARTEMIS-1842 make sure quorum vote loops exits The stopped flag used to stop the quorum vote loop needs to be volatile in order to be safely published between threads. --- .../core/server/cluster/qourum/SharedNothingBackupQuorum.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/qourum/SharedNothingBackupQuorum.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/qourum/SharedNothingBackupQuorum.java index dd1248df48..035ca05a49 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/qourum/SharedNothingBackupQuorum.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/qourum/SharedNothingBackupQuorum.java @@ -64,7 +64,7 @@ public class SharedNothingBackupQuorum implements Quorum, SessionFailureListener private final NetworkHealthCheck networkHealthCheck; - private boolean stopped = false; + private volatile boolean stopped = false; /** * This is a safety net in case the live sends the first {@link ReplicationLiveIsStoppingMessage}