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.
This commit is contained in:
parent
9a5a3d496d
commit
84fb07be53
|
@ -202,7 +202,7 @@ public final class Topology {
|
||||||
sendMemberUp(nodeId, memberInput);
|
sendMemberUp(nodeId, memberInput);
|
||||||
return true;
|
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());
|
TopologyMemberImpl newMember = new TopologyMemberImpl(nodeId, memberInput.getBackupGroupName(), memberInput.getScaleDownGroupName(), memberInput.getLive(), memberInput.getBackup());
|
||||||
|
|
||||||
if (newMember.getLive() == null && currentMember.getLive() != null) {
|
if (newMember.getLive() == null && currentMember.getLive() != null) {
|
||||||
|
@ -219,7 +219,12 @@ public final class Topology {
|
||||||
newMember, new Exception("trace"));
|
newMember, new Exception("trace"));
|
||||||
}
|
}
|
||||||
|
|
||||||
newMember.setUniqueEventID(uniqueEventID);
|
if (uniqueEventID > currentMember.getUniqueEventID()) {
|
||||||
|
newMember.setUniqueEventID(uniqueEventID);
|
||||||
|
} else {
|
||||||
|
newMember.setUniqueEventID(currentMember.getUniqueEventID());
|
||||||
|
}
|
||||||
|
|
||||||
topology.remove(nodeId);
|
topology.remove(nodeId);
|
||||||
topology.put(nodeId, newMember);
|
topology.put(nodeId, newMember);
|
||||||
sendMemberUp(nodeId, newMember);
|
sendMemberUp(nodeId, newMember);
|
||||||
|
|
Loading…
Reference in New Issue