From dd9090e630e82d58abdc1bfea933bbe02a3a2485 Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Thu, 03 Jan 2008 16:35:57 +0000
Subject: [PATCH]  fix for 2794 : Delete are sometimes not replayed when they immediately follow a moddn    When a delete is done on the new name of an entry immediately after renaming it, the dependencies between these 2 operations are not detected and the delete can therefore be replayed without waiting for the moddn to complete. This cause the delete to fail and not being replayed.

---
 opends/src/server/org/opends/server/replication/plugin/RemotePendingChanges.java |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/plugin/RemotePendingChanges.java b/opends/src/server/org/opends/server/replication/plugin/RemotePendingChanges.java
index 9e871da..9327406 100644
--- a/opends/src/server/org/opends/server/replication/plugin/RemotePendingChanges.java
+++ b/opends/src/server/org/opends/server/replication/plugin/RemotePendingChanges.java
@@ -22,7 +22,7 @@
  * CDDL HEADER END
  *
  *
- *      Portions Copyright 2007 Sun Microsystems, Inc.
+ *      Portions Copyright 2007-2008 Sun Microsystems, Inc.
  */
 package org.opends.server.replication.plugin;
 
@@ -451,11 +451,13 @@
           }
           else if (pendingMsg instanceof ModifyDNMsg)
           {
+            ModifyDNMsg pendingModDn = (ModifyDNMsg) pendingChange.getMsg();
             /*
              * Check if the operation to be run is an ModifyDNOperation
              * on a children of the current DeleteOperation
              */
-            if (pendingChange.getTargetDN().isDescendantOf(targetDn))
+            if ((pendingChange.getTargetDN().isDescendantOf(targetDn)) ||
+                (pendingModDn.newDNIsParent(targetDn)))
             {
               hasDependencies = true;
               addDependency(change, pendingChange);

--
Gitblit v1.10.0