Skip to content

Commit d35fb5d

Browse files
author
Myron Scott
committed
do not validate servers against standby nodes
1 parent e244d9c commit d35fb5d

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
@@ -139,17 +139,19 @@ private SessionID prime(ServerID node) {
139139
Assert.assertFalse(node.isNull());
140140
SessionID current = passiveNodes.get(node);
141141
// no session means we are allowed to proceed
142-
if (current == null && serverIsValid(node)) {
142+
if (current == null) {
143143
if (!consistencyMgr.requestTransition(ServerMode.ACTIVE, node, ConsistencyManager.Transition.ADD_PASSIVE)) {
144144
serverCheck.zapNode(node, L2HAZapNodeRequestProcessor.SPLIT_BRAIN, "unable to verify active");
145145
return SessionID.NULL_ID;
146146
} else {
147-
LOGGER.debug("Starting message sequence on " + node);
147+
LOGGER.info("Starting message sequence on " + node);
148148
SessionID newSession = new SessionID(sessionMaker.incrementAndGet());
149149
if (passiveNodes.putIfAbsent(node, newSession) == null) {
150-
boolean sent = this.replicationSender.addPassive(node, newSession, executionLane(newSession), SyncReplicationActivity.createStartMessage());
151-
Assert.assertTrue(sent);
152-
return newSession;
150+
if (this.replicationSender.addPassive(node, newSession, executionLane(newSession), SyncReplicationActivity.createStartMessage())) {
151+
return newSession;
152+
} else {
153+
passiveNodes.remove(node, newSession);
154+
}
153155
}
154156
}
155157
}
@@ -178,12 +180,8 @@ public boolean startPassiveSync(ServerID newNode) {
178180
executePassiveSync(newNode, session);
179181
return true;
180182
} else {
181-
if (!passiveNodes.containsKey(newNode)) {
182-
LOGGER.info("passive node {} to requesting prime is no longer a valid passive", newNode);
183-
} else {
184-
LOGGER.info("unable to prime connection to {} for passive sync", newNode);
185-
serverCheck.closeMember(newNode);
186-
}
183+
LOGGER.info("unable to prime connection to {} for passive sync", newNode);
184+
serverCheck.closeMember(newNode);
187185
return false;
188186
}
189187
}

0 commit comments

Comments
 (0)