From ce4cab797b8470661bf77b9fdcf20a95586fd9c5 Mon Sep 17 00:00:00 2001
From: mrossign <mrossign@localhost>
Date: Fri, 30 Jan 2009 13:43:02 +0000
Subject: [PATCH] Entry lock may not be released in some cases

---
 opendj-sdk/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java |   36 ++++++++++++++++++------------------
 1 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java b/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java
index fa6cf27..ff2a806 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java
@@ -898,6 +898,24 @@
       {
         this.saveGenerationId(generationId);
       }
+
+      if (!op.isSynchronizationOperation())
+      {
+        // If assured replication is enabled, this will wait for the matching
+        // ack or time out. If assured replication is disabled, this returns
+        // immediately
+        try
+        {
+          waitForAckIfAssuredEnabled(msg);
+        } catch (TimeoutException ex)
+        {
+          // This exception may only be raised if assured replication is
+          // enabled
+          Message errorMsg = NOTE_DS_ACK_TIMEOUT.get(getServiceID(),
+            Long.toString(getAssuredTimeout()), msg.toString());
+          logError(errorMsg);
+        }
+      }
     }
     else if (!op.isSynchronizationOperation())
     {
@@ -909,24 +927,6 @@
         pendingChanges.pushCommittedChanges();
       }
     }
-
-    if (!op.isSynchronizationOperation())
-    {
-      // If assured replication is enabled, this will wait for the matching
-      // ack or time out. If assured replication is disabled, this returns
-      // immediately
-      try
-      {
-        waitForAckIfAssuredEnabled(msg);
-      } catch (TimeoutException ex)
-      {
-        // This exception may only be raised if assured replication is
-        // enabled
-        Message errorMsg = NOTE_DS_ACK_TIMEOUT.get(getServiceID(),
-          Long.toString(getAssuredTimeout()), msg.toString());
-        logError(errorMsg);
-      }
-    }
   }
 
   /**

--
Gitblit v1.10.0