activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [1/2] activemq-artemis git commit: ARTEMIS-1484 Live's topology update may be ignored
Date Fri, 27 Oct 2017 13:48:13 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 9a5a3d496 -> 6d8e89df9


ARTEMIS-1484 Live's topology update may be ignored

If the current node has no connector to Live, it is better
to update it from older message than to have none.


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

Branch: refs/heads/master
Commit: 84fb07be53b28dd17688bd1a7f81b51bdc4570b9
Parents: 9a5a3d4
Author: Erich Duda <dudaerich@gmail.com>
Authored: Thu Oct 26 15:36:24 2017 +0200
Committer: Erich Duda <dudaerich@gmail.com>
Committed: Fri Oct 27 10:48:33 2017 +0200

----------------------------------------------------------------------
 .../apache/activemq/artemis/core/client/impl/Topology.java  | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/84fb07be/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/Topology.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/Topology.java
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/Topology.java
index 096fd66..966167f 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/Topology.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/Topology.java
@@ -202,7 +202,7 @@ public final class Topology {
             sendMemberUp(nodeId, memberInput);
             return true;
          }
-         if (uniqueEventID > currentMember.getUniqueEventID()) {
+         if (uniqueEventID > currentMember.getUniqueEventID() || (currentMember.getLive()
== null && memberInput.getLive() != null)) {
             TopologyMemberImpl newMember = new TopologyMemberImpl(nodeId, memberInput.getBackupGroupName(),
memberInput.getScaleDownGroupName(), memberInput.getLive(), memberInput.getBackup());
 
             if (newMember.getLive() == null && currentMember.getLive() != null) {
@@ -219,7 +219,12 @@ public final class Topology {
                                newMember, new Exception("trace"));
             }
 
-            newMember.setUniqueEventID(uniqueEventID);
+            if (uniqueEventID > currentMember.getUniqueEventID()) {
+               newMember.setUniqueEventID(uniqueEventID);
+            } else {
+               newMember.setUniqueEventID(currentMember.getUniqueEventID());
+            }
+
             topology.remove(nodeId);
             topology.put(nodeId, newMember);
             sendMemberUp(nodeId, newMember);


Mime
View raw message