activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andytay...@apache.org
Subject [1/2] activemq-artemis git commit: ARTEMIS-1154 tweak logic to support previous semantics
Date Thu, 11 May 2017 15:57:02 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 02dcfe046 -> ec49c4310


ARTEMIS-1154 tweak logic to support previous semantics


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/88e185d2
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/88e185d2
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/88e185d2

Branch: refs/heads/master
Commit: 88e185d2b915e4827803dc7302152c6087924211
Parents: 02dcfe0
Author: Justin Bertram <jbertram@apache.org>
Authored: Thu May 11 09:54:28 2017 -0500
Committer: Justin Bertram <jbertram@apache.org>
Committed: Thu May 11 09:54:28 2017 -0500

----------------------------------------------------------------------
 .../cluster/qourum/SharedNothingBackupQuorum.java  | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/88e185d2/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 a5f1d8d..81b70ad 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
@@ -108,12 +108,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