| | |
| | | * out which one is the best to connect to. |
| | | */ |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo("phase 1 : will perform PhaseOneH with each RS in " + |
| | | debugInfo("serverId: " + serverId + |
| | | " phase 1 : will perform PhaseOneH with each RS in " + |
| | | " order to elect the preferred one"); |
| | | |
| | | // Get info from every available replication servers |
| | |
| | | |
| | | // Best found, now initialize connection to this one (handshake phase 1) |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo( |
| | | "phase 2 : will perform PhaseOneH with the preferred RS=" |
| | | debugInfo("serverId: " + serverId + |
| | | " phase 2 : will perform PhaseOneH with the preferred RS=" |
| | | + replicationServerInfo); |
| | | replicationServerInfo = performPhaseOneHandshake( |
| | | replicationServerInfo.getServerURL(), true); |
| | |
| | | |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugInfo("RB for dn " + baseDn + |
| | | debugInfo("RB for dn " + baseDn + |
| | | " and with server id " + Integer.toString(serverId) + " computed " + |
| | | Integer.toString(nChanges) + " changes late."); |
| | | } |
| | |
| | | |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugInfo("In RB for " + baseDn + |
| | | debugInfo("In RB for " + baseDn + |
| | | "\nRB HANDSHAKE SENT:\n" + serverStartMsg.toString() + |
| | | "\nAND RECEIVED:\n" + msg.toString()); |
| | | } |
| | |
| | | logError(message); |
| | | } else if (debugEnabled()) |
| | | { |
| | | TRACER.debugInfo(message.toString()); |
| | | debugInfo(message.toString()); |
| | | } |
| | | } |
| | | error = true; |
| | |
| | | { |
| | | if ((e instanceof SocketTimeoutException) && debugEnabled()) |
| | | { |
| | | TRACER.debugInfo("Timeout trying to connect to RS " + server + |
| | | debugInfo("Timeout trying to connect to RS " + server + |
| | | " for dn: " + baseDn); |
| | | } |
| | | Message message = ERR_EXCEPTION_STARTING_SESSION_PHASE.get("1", |
| | |
| | | logError(message); |
| | | } else if (debugEnabled()) |
| | | { |
| | | TRACER.debugInfo(message.toString()); |
| | | debugInfo(message.toString()); |
| | | } |
| | | error = true; |
| | | } |
| | |
| | | if (localSession != null) |
| | | { |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo("In RB, closing session after phase 1"); |
| | | debugInfo("In RB, closing session after phase 1"); |
| | | |
| | | if (protocolVersion >= ProtocolVersion.REPLICATION_PROTOCOL_V4) |
| | | { |
| | |
| | | |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugInfo("In RB for " + baseDn + |
| | | debugInfo("In RB for " + baseDn + |
| | | "\nRB HANDSHAKE SENT:\n" + serverStartECLMsg.toString() + |
| | | "\nAND RECEIVED:\n" + replServerStartDSMsg.toString()); |
| | | } |
| | |
| | | logError(message); |
| | | } else if (debugEnabled()) |
| | | { |
| | | TRACER.debugInfo(message.toString()); |
| | | debugInfo(message.toString()); |
| | | } |
| | | } |
| | | error = true; |
| | |
| | | { |
| | | if ((e instanceof SocketTimeoutException) && debugEnabled()) |
| | | { |
| | | TRACER.debugInfo("Timeout trying to connect to RS " + server + |
| | | debugInfo("Timeout trying to connect to RS " + server + |
| | | " for dn: " + baseDn); |
| | | } |
| | | Message message = ERR_EXCEPTION_STARTING_SESSION_PHASE.get("1", |
| | |
| | | logError(message); |
| | | } else if (debugEnabled()) |
| | | { |
| | | TRACER.debugInfo(message.toString()); |
| | | debugInfo(message.toString()); |
| | | } |
| | | error = true; |
| | | } |
| | |
| | | if (localSession != null) |
| | | { |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo("In RB, closing session after phase 1"); |
| | | debugInfo("In RB, closing session after phase 1"); |
| | | |
| | | // V4 protocol introduces a StopMsg to properly end communications |
| | | if (!error) |
| | |
| | | */ |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugInfo("In RB for " + baseDn + |
| | | debugInfo("In RB for " + baseDn + |
| | | "\nRB HANDSHAKE SENT:\n" + startECLSessionMsg.toString()); |
| | | // + "\nAND RECEIVED:\n" + topologyMsg.toString()); |
| | | } |
| | |
| | | |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugInfo("In RB for " + baseDn + |
| | | debugInfo("In RB for " + baseDn + |
| | | "\nRB HANDSHAKE SENT:\n" + startSessionMsg.toString() + |
| | | "\nAND RECEIVED:\n" + topologyMsg.toString()); |
| | | } |
| | |
| | | } |
| | | } |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo(this + |
| | | debugInfo(this + |
| | | " end restart : connected=" + connected + |
| | | " with RSid=" + this.getRsServerId() + |
| | | " genid=" + this.generationID); |
| | |
| | | public void receiveTopo(TopologyMsg topoMsg) |
| | | { |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo(this + " receive TopologyMsg=" + topoMsg); |
| | | debugInfo(this + " receive TopologyMsg=" + topoMsg); |
| | | |
| | | // Store new DS list |
| | | dsList = topoMsg.getDsList(); |
| | |
| | | } else |
| | | { |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo(this + |
| | | debugInfo(this + |
| | | " is not configured to send CN heartbeat interval"); |
| | | } |
| | | } |