Skip to content

Commit 5fbccb3

Browse files
author
Myron Scott
committed
do not validate servers against standby nodes
1 parent 51c74d3 commit 5fbccb3

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

tc-server/src/main/java/com/tc/objectserver/entity/ActiveToPassiveReplication.java

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -138,17 +138,19 @@ private SessionID prime(ServerID node) {
138138
Assert.assertFalse(node.isNull());
139139
SessionID current = passiveNodes.get(node);
140140
// no session means we are allowed to proceed
141-
if (current == null && serverIsValid(node)) {
141+
if (current == null) {
142142
if (!consistencyMgr.requestTransition(ServerMode.ACTIVE, node, ConsistencyManager.Transition.ADD_PASSIVE)) {
143143
serverCheck.zapNode(node, L2HAZapNodeRequestProcessor.SPLIT_BRAIN, "unable to verify active");
144144
return SessionID.NULL_ID;
145145
} else {
146-
LOGGER.debug("Starting message sequence on " + node);
146+
LOGGER.info("Starting message sequence on " + node);
147147
SessionID newSession = new SessionID(sessionMaker.incrementAndGet());
148148
if (passiveNodes.putIfAbsent(node, newSession) == null) {
149-
boolean sent = this.replicationSender.addPassive(node, newSession, executionLane(newSession), SyncReplicationActivity.createStartMessage());
150-
Assert.assertTrue(sent);
151-
return newSession;
149+
if (this.replicationSender.addPassive(node, newSession, executionLane(newSession), SyncReplicationActivity.createStartMessage())) {
150+
return newSession;
151+
} else {
152+
passiveNodes.remove(node, newSession);
153+
}
152154
}
153155
}
154156
}
@@ -177,12 +179,8 @@ public boolean startPassiveSync(ServerID newNode) {
177179
executePassiveSync(newNode, session);
178180
return true;
179181
} else {
180-
if (!passiveNodes.containsKey(newNode)) {
181-
LOGGER.info("passive node {} to requesting prime is no longer a valid passive", newNode);
182-
} else {
183-
LOGGER.info("unable to prime connection to {} for passive sync", newNode);
184-
serverCheck.closeMember(newNode);
185-
}
182+
LOGGER.info("unable to prime connection to {} for passive sync", newNode);
183+
serverCheck.closeMember(newNode);
186184
return false;
187185
}
188186
}

0 commit comments

Comments
 (0)