mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

pgamba
26.48.2008 1f7dcb1c674c1a22371672053aba10645c07fdb7
Fix 3276 - dsreplication post-external-initialization should return (an error) if replication plugin is stopped
3 files modified
26 ■■■■■ changed files
opends/src/messages/messages/replication.properties 5 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java 11 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tasks/SetGenerationIdTask.java 10 ●●●●● patch | view | raw | blame | history
opends/src/messages/messages/replication.properties
@@ -275,4 +275,7 @@
NOTICE_IGNORING_REMOTE_MONITOR_DATA_116=Some monitor data have been received \
 from the server with server ID %s too late and are ignored
NOTICE_SERVER_STATE_RECOVERY_117=ServerState recovery for domain %s, \
updated with changeNumber %s
updated with changeNumber %s
SEVERE_ERR_RESET_GENERATION_CONN_ERR_ID_118=The generation ID could not be \
reset for domain %s because it is NOT connected to the replication. You should \
check in the configuration that the domain is enabled
opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java
@@ -2525,13 +2525,24 @@
   * their change dbs.
   *
   * @param generationIdNewValue The new value of the generation Id.
   * @throws DirectoryException when an error occurs
   */
  public void resetGenerationId(Long generationIdNewValue)
  throws DirectoryException
  {
    if (debugEnabled())
      TRACER.debugInfo(
          this.getName() + "resetGenerationId" + generationIdNewValue);
    if (!isConnected())
    {
      ResultCode resultCode = ResultCode.OTHER;
      Message message = ERR_RESET_GENERATION_CONN_ERR_ID.get(
          baseDN.toNormalizedString());
      throw new DirectoryException(
         resultCode, message);
    }
    ResetGenerationId genIdMessage = null;
    if (generationIdNewValue == null)
    {
opends/src/server/org/opends/server/tasks/SetGenerationIdTask.java
@@ -150,7 +150,15 @@
    debugInfo("setGenerationIdTask is starting on domain%s" +
        domain.getBaseDN());
    domain.resetGenerationId(generationId);
    try
    {
      domain.resetGenerationId(generationId);
    }
    catch(DirectoryException de)
    {
      logError(de.getMessageObject());
      return TaskState.STOPPED_BY_ERROR;
    }
    debugInfo("setGenerationIdTask is ending SUCCESSFULLY");
    return TaskState.COMPLETED_SUCCESSFULLY;