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

ctissot
20.33.2008 1e197fe96f072e4a59802682dfa00c78a41b708c
Fix issue 3547: Persistent search can not be abandoned
1 files modified
21 ■■■■■ changed files
opends/src/server/org/opends/server/core/AbandonOperationBasis.java 21 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/core/AbandonOperationBasis.java
@@ -244,26 +244,23 @@
      // code to reflect whether the abandon was successful and an error message
      // if it was not.  Even though there is no response, the result should
      // still be logged.
      Operation operation =
           clientConnection.getOperationInProgress(idToAbandon);
      if (operation == null)
      {
        setResultCode(ResultCode.NO_SUCH_OPERATION);
        appendErrorMessage(ERR_ABANDON_OP_NO_SUCH_OPERATION.get(idToAbandon));
      }
      else
      {
      //
        // Even though it is technically illegal to send a response for
        // operations that have been abandoned, it may be a good idea to do so
        // to ensure that the requestor isn't left hanging.  This will be a
        // configurable option in the server.
        boolean notifyRequestor = DirectoryServer.notifyAbandonedOperations();
        Message cancelReason = INFO_CANCELED_BY_ABANDON_REQUEST.get(messageID);
        CancelResult result =
             operation.cancel(new CancelRequest(notifyRequestor, cancelReason));
      CancelRequest _cancelRequest = new CancelRequest(notifyRequestor,
                                                       cancelReason);
      CancelResult result = clientConnection.cancelOperation(idToAbandon,
                                                             _cancelRequest);
        setResultCode(result.getResultCode());
        appendErrorMessage(result.getResponseMessage());
      }
      PluginResult.PostOperation postOpResult =
          pluginConfigManager.invokePostOperationAbandonPlugins(this);