From 4497ef71d990f2bdc879b57c08b69f4bf79960bc Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Tue, 27 Nov 2007 07:52:20 +0000
Subject: [PATCH] Fix for 2565 Java Exception during conflict resolution In this particular case of conflict resolution, the newSuperior was null and this was causing some Exception. The solution is simply to test for this condition and generate a conflict. Also added a unit test for this particular case.
---
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java b/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java
index 1422ef8..c7d71d1 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java
@@ -1772,6 +1772,18 @@
return true;
}
+ // If we could not find the new parent entry, we missed this entry
+ // earlier or it has disappeared from the database
+ // Log this information for the repair tool and mark the entry
+ // as conflicting.
+ // stop the processing.
+ if (newSuperior == null)
+ {
+ markConflictEntry(op, currentDN, newDN);
+ numUnresolvedNamingConflicts.incrementAndGet();
+ return true;
+ }
+
if ((result == ResultCode.NO_SUCH_OBJECT) ||
(result == ResultCode.OBJECTCLASS_VIOLATION))
{
--
Gitblit v1.10.0