| | |
| | | import org.opends.server.backends.task.Task; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.protocols.asn1.ASN1Exception; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.protocols.internal.InternalSearchListener; |
| | |
| | | import static org.opends.messages.ReplicationMessages.*; |
| | | import static org.opends.messages.ToolMessages.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.replication.plugin.EntryHistorical.*; |
| | | import static org.opends.server.replication.protocol.OperationContext.*; |
| | | import static org.opends.server.replication.service.ReplicationMonitor.*; |
| | |
| | | * supposed to have when it was marked as conflicting. |
| | | */ |
| | | public static final String DS_SYNC_CONFLICT = "ds-sync-conflict"; |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * The update to replay message queue where the listener thread is going to |
| | |
| | | private boolean isBackendFractionalConfigConsistent() |
| | | { |
| | | // Read config stored in domain root entry |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo( |
| | | if (logger.isTraceEnabled()) |
| | | logger.trace( |
| | | "Attempt to read the potential fractional config in domain root " |
| | | + "entry " + getBaseDNString()); |
| | | |
| | |
| | | { |
| | | // A failure occurred after the change had been removed from the pending |
| | | // changes table. |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo( |
| | | logger.trace( |
| | | "LDAPReplicationDomain.updateError: Unable to find remote " |
| | | + "pending change for CSN %s", csn); |
| | | } |
| | |
| | | { |
| | | long genId = exportBackend(null, true); |
| | | |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo("Computed generationId: generationId=" + genId); |
| | | if (logger.isTraceEnabled()) |
| | | logger.trace("Computed generationId: generationId=" + genId); |
| | | |
| | | return genId; |
| | | } |
| | |
| | | */ |
| | | private long loadGenerationId() throws DirectoryException |
| | | { |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo("Attempt to read generation ID from DB " |
| | | if (logger.isTraceEnabled()) |
| | | logger.trace("Attempt to read generation ID from DB " |
| | | + getBaseDNString()); |
| | | |
| | | /* |
| | |
| | | aGenerationId = computeGenerationId(); |
| | | saveGenerationId(aGenerationId); |
| | | |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo("Generation ID created for domain baseDN=" |
| | | if (logger.isTraceEnabled()) |
| | | logger.trace("Generation ID created for domain baseDN=" |
| | | + getBaseDNString() + " generationId=" + aGenerationId); |
| | | } |
| | | else |
| | | { |
| | | generationIdSavedStatus = true; |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo("Generation ID successfully read from domain baseDN=" |
| | | if (logger.isTraceEnabled()) |
| | | logger.trace("Generation ID successfully read from domain baseDN=" |
| | | + getBaseDNString() + " generationId=" + aGenerationId); |
| | | } |
| | | return aGenerationId; |
| | |
| | | } |
| | | catch(Exception e) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | logError(ERR_CHECK_CREATE_REPL_BACKEND_FAILED.get( |
| | | stackTraceToSingleLineString(e))); |
| | | } |
| | |
| | | * causing a recovery of all changes since the current committed server |
| | | * state. See OPENDJ-1115. |
| | | */ |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo( |
| | | logger.trace( |
| | | "LDAPReplicationDomain.processUpdate: ignoring " |
| | | + "duplicate change %s", msg.getCSN()); |
| | | } |
| | |
| | | public void purgeConflictsHistorical(PurgeConflictsHistoricalTask task, |
| | | long endDate) throws DirectoryException |
| | | { |
| | | TRACER.debugInfo("[PURGE] purgeConflictsHistorical " |
| | | logger.trace("[PURGE] purgeConflictsHistorical " |
| | | + "on domain: " + getBaseDNString() |
| | | + "endDate:" + new Date(endDate) |
| | | + "lastCSNPurgedFromHist: " |