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

Valery Kharseko
7 hours ago 016502d22e0490ed8b1b4951f5e12be01c4a224c
opendj-server-legacy/src/main/java/org/opends/server/api/LocalBackend.java
@@ -24,6 +24,8 @@
import java.util.Set;
import java.util.concurrent.ConcurrentLinkedQueue;
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.i18n.slf4j.LocalizedLogger;
import org.forgerock.opendj.config.Configuration;
import org.forgerock.opendj.config.server.ConfigException;
import org.forgerock.opendj.ldap.ConditionResult;
@@ -72,6 +74,8 @@
public abstract class LocalBackend<C extends Configuration> extends Backend<C>
// should have been BackendCfg instead of Configuration
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /** Indicates whether this is a private backend or one that holds user data. */
  private boolean isPrivateBackend;
@@ -103,7 +107,11 @@
  {
    for (PersistentSearch psearch : persistentSearches)
    {
      psearch.cancel();
      // Tell the clients that no more changes are coming: this backend will not notify them any
      // more, and a cancelled persistent search which sends nothing leaves them waiting forever.
      final LocalizableMessage reason = WARN_PSEARCH_BACKEND_UNAVAILABLE.get(getBackendID());
      logger.warn(reason);
      psearch.cancelAndNotifyClient(reason);
    }
    persistentSearches.clear();
    closeBackend();