activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject activemq-artemis git commit: ARTEMIS-1154 tweak logic to support previous semantics
Date Fri, 12 May 2017 00:29:48 GMT
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 <jbertram@apache.org>
Authored: Thu May 11 09:54:28 2017 -0500
Committer: Clebert Suconic <clebertsuconic@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();


Mime
View raw message