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

ludovicp
15.32.2010 4097284648812ee7dea49e8d5a20f17167424188
Fix an issue with External Changelog after having disabled a replication suffix.
1 files modified
22 ■■■■■ changed files
opends/src/server/org/opends/server/replication/server/ECLServerHandler.java 22 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ECLServerHandler.java
@@ -685,6 +685,12 @@
      boolean allowUnknownDomains)
  throws DirectoryException
  {
    // This map is initialized from the providedCookie.
    // Below, it will be traversed and each domain configured with ECL will be
    // checked and removed from the map.
    // At the end, normally the map should be empty.
    // Depending on allowUnknownDomains provided flag, a non empty map will
    // be considered as an error when allowUnknownDomains is false.
    HashMap<String,ServerState> startStatesFromProvidedCookie =
      new HashMap<String,ServerState>();
@@ -832,6 +838,22 @@
      domainCtxts = tmpSet.toArray(new DomainContext[0]);
      // When it is valid to have the provided cookie containing unknown domains
      // (allowUnknownDomains is true), 2 cases must be considered :
      // - if the cookie contains a domain that is replicated but where
      //   ECL is disabled, then this case is considered above
      // - if the cookie contains a domain that is even not replicated
      //   then this case need to be considered here in another loop.
      if (!startStatesFromProvidedCookie.isEmpty())
      {
        if (allowUnknownDomains)
          for (String providedDomain : startStatesFromProvidedCookie.keySet())
            if (rs.getReplicationServerDomain(providedDomain, false) == null)
              // the domain provided in the cookie is not replicated
              startStatesFromProvidedCookie.remove(providedDomain);
      }
      // Now do the final checking
      if (!startStatesFromProvidedCookie.isEmpty())
      {
        // After reading all the knows domains from the provided cookie, there