| | |
| | | if (search.getResultCode() != ResultCode.SUCCESS |
| | | && search.getResultCode() != ResultCode.NO_SUCH_OBJECT) |
| | | { |
| | | Message message = ERR_SEARCHING_GENERATION_ID.get( |
| | | logError(ERR_SEARCHING_GENERATION_ID.get( |
| | | search.getResultCode().getResultCodeName() + " " + |
| | | search.getErrorMessage(), |
| | | getBaseDNString()); |
| | | logError(message); |
| | | getBaseDNString())); |
| | | return false; |
| | | } |
| | | |
| | |
| | | } |
| | | if (attr.size() > 1) |
| | | { |
| | | Message message = ERR_LOADING_GENERATION_ID.get(getBaseDNString(), |
| | | logError(ERR_LOADING_GENERATION_ID.get(getBaseDNString(), |
| | | "#Values=" + attr.size() + " Must be exactly 1 in entry " |
| | | + resultEntry.toLDIFString()); |
| | | logError(message); |
| | | + resultEntry.toLDIFString())); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (NoSuchElementException e) |
| | | { |
| | | Message message = ERR_OPERATION_NOT_FOUND_IN_PENDING.get( |
| | | op.toString(), curCSN.toString()); |
| | | logError(message); |
| | | logError(ERR_OPERATION_NOT_FOUND_IN_PENDING.get( |
| | | op.toString(), curCSN.toString())); |
| | | return; |
| | | } |
| | | } |
| | |
| | | * It should never happen. |
| | | */ |
| | | pendingChanges.remove(curCSN); |
| | | Message message = |
| | | ERR_UNKNOWN_TYPE.get(op.getOperationType().toString()); |
| | | logError(message); |
| | | logError(ERR_UNKNOWN_TYPE.get(op.getOperationType().toString())); |
| | | return; |
| | | } |
| | | |
| | |
| | | { |
| | | // will be caught at publish time. |
| | | } |
| | | catch (NoSuchElementException e) |
| | | catch (NoSuchElementException e) |
| | | { |
| | | Message message = ERR_OPERATION_NOT_FOUND_IN_PENDING.get( |
| | | op.toString(), curCSN.toString()); |
| | | logError(message); |
| | | logError(ERR_OPERATION_NOT_FOUND_IN_PENDING.get( |
| | | op.toString(), curCSN.toString())); |
| | | return; |
| | | } |
| | | // If assured replication is enabled, this will wait for the matching |
| | |
| | | waitForAckIfAssuredEnabled(msg); |
| | | } catch (TimeoutException ex) |
| | | { |
| | | // This exception may only be raised if assured replication is |
| | | // enabled |
| | | Message errorMsg = NOTE_DS_ACK_TIMEOUT.get(getBaseDNString(), |
| | | Long.toString(getAssuredTimeout()), msg.toString()); |
| | | logError(errorMsg); |
| | | // This exception may only be raised if assured replication is enabled |
| | | logError(NOTE_DS_ACK_TIMEOUT.get(getBaseDNString(), |
| | | Long.toString(getAssuredTimeout()), msg.toString())); |
| | | } |
| | | } |
| | | |
| | |
| | | ResultCode res = newOp.getResultCode(); |
| | | if (res != ResultCode.SUCCESS) |
| | | { |
| | | Message message = |
| | | ERR_COULD_NOT_SOLVE_CONFLICT.get(entryDN.toString(), res.toString()); |
| | | logError(message); |
| | | logError(ERR_COULD_NOT_SOLVE_CONFLICT.get( |
| | | entryDN.toString(), res.toString())); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | // The other type of errors can not be caused by naming conflicts. |
| | | // Log a message for the repair tool. |
| | | Message message = ERR_ERROR_REPLAYING_OPERATION.get( |
| | | logError(ERR_ERROR_REPLAYING_OPERATION.get( |
| | | op.toString(), ctx.getCSN().toString(), |
| | | result.toString(), op.getErrorMessage().toString()); |
| | | logError(message); |
| | | result.toString(), op.getErrorMessage().toString())); |
| | | return true; |
| | | } |
| | | } |
| | |
| | | { |
| | | // The other type of errors can not be caused by naming conflicts. |
| | | // Log a message for the repair tool. |
| | | Message message = ERR_ERROR_REPLAYING_OPERATION.get( |
| | | logError(ERR_ERROR_REPLAYING_OPERATION.get( |
| | | op.toString(), ctx.getCSN().toString(), |
| | | result.toString(), op.getErrorMessage().toString()); |
| | | logError(message); |
| | | result.toString(), op.getErrorMessage().toString())); |
| | | return true; |
| | | } |
| | | } |
| | |
| | | { |
| | | // The other type of errors can not be caused by naming conflicts. |
| | | // Log a message for the repair tool. |
| | | Message message = ERR_ERROR_REPLAYING_OPERATION.get( |
| | | logError(ERR_ERROR_REPLAYING_OPERATION.get( |
| | | op.toString(), ctx.getCSN().toString(), |
| | | result.toString(), op.getErrorMessage().toString()); |
| | | logError(message); |
| | | result.toString(), op.getErrorMessage().toString())); |
| | | return true; |
| | | } |
| | | } |
| | |
| | | { |
| | | // The other type of errors can not be caused by naming conflicts. |
| | | // log a message for the repair tool. |
| | | Message message = ERR_ERROR_REPLAYING_OPERATION.get( |
| | | logError(ERR_ERROR_REPLAYING_OPERATION.get( |
| | | op.toString(), ctx.getCSN().toString(), |
| | | result.toString(), op.getErrorMessage().toString()); |
| | | logError(message); |
| | | result.toString(), op.getErrorMessage().toString())); |
| | | return true; |
| | | } |
| | | } |
| | |
| | | if (search.getResultCode() != ResultCode.SUCCESS) |
| | | { |
| | | if (search.getResultCode() != ResultCode.NO_SUCH_OBJECT) |
| | | { // This is an error. |
| | | Message message = ERR_SEARCHING_GENERATION_ID.get( |
| | | { |
| | | logError(ERR_SEARCHING_GENERATION_ID.get( |
| | | search.getResultCode().getResultCodeName() + " " + |
| | | search.getErrorMessage(), |
| | | getBaseDNString()); |
| | | logError(message); |
| | | getBaseDNString())); |
| | | } |
| | | } |
| | | else |
| | |
| | | Attribute attr = attrs.get(0); |
| | | if (attr.size()>1) |
| | | { |
| | | Message message = ERR_LOADING_GENERATION_ID.get( |
| | | logError(ERR_LOADING_GENERATION_ID.get( |
| | | getBaseDNString(), "#Values=" + attr.size() + |
| | | " Must be exactly 1 in entry " + resultEntry.toLDIFString()); |
| | | logError(message); |
| | | " Must be exactly 1 in entry " + resultEntry.toLDIFString())); |
| | | } |
| | | else if (attr.size() == 1) |
| | | { |
| | | found=true; |
| | | found = true; |
| | | try |
| | | { |
| | | aGenerationId = Long.decode(attr.iterator().next().toString()); |
| | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void sessionInitiated( |
| | | ServerStatus initStatus, |
| | | ServerState replicationServerState, |
| | | long generationID, |
| | | Session session) |
| | | public void sessionInitiated(ServerStatus initStatus, ServerState rsState) |
| | | { |
| | | // Check domain fractional configuration consistency with local |
| | | // configuration variables |
| | | forceBadDataSet = !isBackendFractionalConfigConsistent(); |
| | | |
| | | super.sessionInitiated( |
| | | initStatus, replicationServerState,generationID, session); |
| | | super.sessionInitiated(initStatus, rsState); |
| | | |
| | | // Now that we are connected , we can enable ECL if : |
| | | // 1/ RS must in the same JVM and created an ECL_WORKFLOW_ELEMENT |
| | |
| | | * Check that the ReplicationServer has seen all our previous |
| | | * changes. |
| | | */ |
| | | CSN replServerMaxCSN = replicationServerState.getCSN(getServerId()); |
| | | CSN replServerMaxCSN = rsState.getCSN(getServerId()); |
| | | |
| | | // we don't want to update from here (a DS) an empty RS because |
| | | // normally the RS should have been updated by other RSes except for |