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

neil_a_wilson
24.18.2006 8472e2397acadbea4c85f14d3951b8e60de403ee
Fix a problem in which the modify operation checked for a cancel request
immediately after acquiring a lock on the target entry but before entering the
try/finally block to ensure that the lock would be released. This could lead
to a case in which the lock will never be released, interfering with the
ability to interact with that entry in the future.

OpenDS Issue Number: 714
1 files modified
50 ■■■■ changed files
opends/src/server/org/opends/server/core/ModifyOperation.java 50 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/core/ModifyOperation.java
@@ -872,33 +872,33 @@
      }
      // Check for and handle a request to cancel this operation.
      if (cancelRequest != null)
      {
        setCancelResult(CancelResult.CANCELED);
        if (cancelRequest.notifyOriginalRequestor() ||
            DirectoryServer.notifyAbandonedOperations())
        {
          setResultCode(ResultCode.CANCELED);
          String cancelReason = cancelRequest.getCancelReason();
          if (cancelReason != null)
          {
            appendErrorMessage(cancelReason);
          }
          clientConnection.sendResponse(this);
        }
        processingStopTime = System.currentTimeMillis();
        logModifyResponse(this);
        return;
      }
      try
      {
        // Check for and handle a request to cancel this operation.
        if (cancelRequest != null)
        {
          setCancelResult(CancelResult.CANCELED);
          if (cancelRequest.notifyOriginalRequestor() ||
              DirectoryServer.notifyAbandonedOperations())
          {
            setResultCode(ResultCode.CANCELED);
            String cancelReason = cancelRequest.getCancelReason();
            if (cancelReason != null)
            {
              appendErrorMessage(cancelReason);
            }
            clientConnection.sendResponse(this);
          }
          processingStopTime = System.currentTimeMillis();
          logModifyResponse(this);
          return;
        }
        // Get the entry to modify.  If it does not exist, then fail.
        try
        {