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 2017/05/12 00:29:48 UTC
activemq-artemis git commit: ARTEMIS-1154 tweak logic to support
previous semantics
Repository: activemq-artemis
Updated Branches:
refs/heads/1.x 7e4de767b -> 7ed40326c
ARTEMIS-1154 tweak logic to support previous semantics
(cherry picked from commit 88e185d2b915e4827803dc7302152c6087924211)
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/7ed40326
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/7ed40326
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/7ed40326
Branch: refs/heads/1.x
Commit: 7ed40326c834353ecfee9fd60ae2abe3e0106aff
Parents: 7e4de76
Author: Justin Bertram <jb...@apache.org>
Authored: Thu May 11 09:54:28 2017 -0500
Committer: Clebert Suconic <cl...@apache.org>
Committed: Thu May 11 20:29:42 2017 -0400
----------------------------------------------------------------------
.../cluster/qourum/SharedNothingBackupQuorum.java | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7ed40326/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/qourum/SharedNothingBackupQuorum.java
----------------------------------------------------------------------
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 51d2487..dbb5d90 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
@@ -105,12 +105,17 @@ public class SharedNothingBackupQuorum implements Quorum, SessionFailureListener
signal = BACKUP_ACTIVATION.FAIL_OVER;
}
- if (networkHealthCheck != null && !networkHealthCheck.isEmpty() && networkHealthCheck.check()) {
- // live is assumed to be down, backup fails-over
- signal = BACKUP_ACTIVATION.FAIL_OVER;
- } else {
- ActiveMQServerLogger.LOGGER.serverIsolatedOnNetwork();
- signal = BACKUP_ACTIVATION.FAILURE_REPLICATING;
+ /* use NetworkHealthCheck to determine if node is isolated
+ * if there are no addresses/urls configured then ignore and rely on quorum vote only
+ */
+ if (networkHealthCheck != null && !networkHealthCheck.isEmpty()) {
+ if (networkHealthCheck.check()) {
+ // live is assumed to be down, backup fails-over
+ signal = BACKUP_ACTIVATION.FAIL_OVER;
+ } else {
+ ActiveMQServerLogger.LOGGER.serverIsolatedOnNetwork();
+ signal = BACKUP_ACTIVATION.FAILURE_REPLICATING;
+ }
}
}
latch.countDown();