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

pgamba
15.14.2007 6f1406dcda6af294506f212a7f76b813e71521d6
Fix #2597 exceptions after restart of replication server
1 files modified
36 ■■■■■ changed files
opends/src/server/org/opends/server/replication/server/ReplicationBackend.java 36 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationBackend.java
@@ -1142,18 +1142,6 @@
    ArrayList<ReplicationCache> searchContainers =
      new ArrayList<ReplicationCache>();
    if (server==null)
    {
      server = retrievesReplicationServer();
      if (server == null)
      {
        Message message = ERR_REPLICATIONBACKEND_ENTRY_DOESNT_EXIST.
        get(String.valueOf(searchBaseDN));
        throw new DirectoryException(
          ResultCode.NO_SUCH_OBJECT, message, null, null);
      }
    }
    //This check is for GroupManager initialization. It currently doesn't
    //come into play because the replication server variable is null in
    //the check above. But if the order of initialization of the server variable
@@ -1189,6 +1177,30 @@
          ResultCode.NO_SUCH_OBJECT, message, matchedDN, null);
    }
    if (server==null)
    {
      server = retrievesReplicationServer();
      if (server == null)
      {
        if (baseDNSet.contains(searchBaseDN))
        {
          searchOperation.returnEntry(
              new Entry(searchBaseDN, rootObjectclasses, attributes,
                  operationalAttributes),
                  new LinkedList<Control>());
          return;
        }
        else
        {
          Message message = ERR_REPLICATIONBACKEND_ENTRY_DOESNT_EXIST.
          get(String.valueOf(searchBaseDN));
          throw new DirectoryException(
              ResultCode.NO_SUCH_OBJECT, message, null, null);
        }
      }
    }
    // Walk through all entries and send the ones that match.
    Iterator<ReplicationCache> rcachei = server.getCacheIterator();
    if (rcachei != null)