From 8472e2397acadbea4c85f14d3951b8e60de403ee Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Sat, 23 Sep 2006 23:18:04 +0000
Subject: [PATCH] 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/src/server/org/opends/server/core/ModifyOperation.java | 50 +++++++++++++++++++++++++-------------------------
1 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/ModifyOperation.java b/opends/src/server/org/opends/server/core/ModifyOperation.java
index a76f837..bc0e246 100644
--- a/opends/src/server/org/opends/server/core/ModifyOperation.java
+++ b/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
{
--
Gitblit v1.10.0