You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2020/10/22 16:44:54 UTC
[activemq-artemis] branch master updated: ARTEMIS-2958 Timed out
waiting pool stop on backup restart
This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/master by this push:
new b5753a0 ARTEMIS-2958 Timed out waiting pool stop on backup restart
new eea95e4 This closes #3312
b5753a0 is described below
commit b5753a0000c5dbe60aa06a29e834c3e58922116c
Author: franz1981 <ni...@gmail.com>
AuthorDate: Thu Oct 22 11:01:09 2020 +0200
ARTEMIS-2958 Timed out waiting pool stop on backup restart
BackupManager::activated should correctly unblock
unauthorized blocking requests to allow a backup broker
to prompty restart in case of live failback
---
.../activemq/artemis/core/protocol/core/impl/ChannelImpl.java | 4 ++++
.../apache/activemq/artemis/core/server/cluster/BackupManager.java | 6 +++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
index 47fecc8..a97f381 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
@@ -643,6 +643,10 @@ public final class ChannelImpl implements Channel {
unlock();
}
closed = true;
+ // unblock any blocked call:
+ // don't move this one before closed = true, because
+ // unblocked calls need to check if (closed) to "gracefully" shutdown.
+ returnBlocking();
}
@Override
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/BackupManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/BackupManager.java
index 97dcab5..db82925 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/BackupManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/BackupManager.java
@@ -192,9 +192,9 @@ public class BackupManager implements ActiveMQComponent {
private TransportConfiguration connector;
protected long retryInterval;
private ClusterManager clusterManager;
- private boolean stopping = false;
- private boolean announcingBackup;
- private boolean backupAnnounced = false;
+ private volatile boolean stopping = false;
+ private volatile boolean announcingBackup;
+ private volatile boolean backupAnnounced = false;
@Override
public String toString() {