From 78ef95c1a79d8027bb8c12ce848f4853153937d1 Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Mon, 04 Jul 2011 20:09:22 +0000
Subject: [PATCH] Fix for OPENDJ-223. Modify operation isn't replayed on replica exactly as on original server. The conflict resolution code didn't consider the case where a single modify operation could contain multiple modifications on an attribute, especially a replace after adds or delete. All changeNumbers would then be equals. Replace always wins over all precedent operations on the attribute, as Modifications are ordered (Sequence of).
---
opends/src/server/org/opends/server/replication/plugin/AttrHistoricalMultiple.java | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/plugin/AttrHistoricalMultiple.java b/opends/src/server/org/opends/server/replication/plugin/AttrHistoricalMultiple.java
index 06b0ed0..e406df3 100644
--- a/opends/src/server/org/opends/server/replication/plugin/AttrHistoricalMultiple.java
+++ b/opends/src/server/org/opends/server/replication/plugin/AttrHistoricalMultiple.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2006-2010 Sun Microsystems, Inc.
+ * Portions Copyright 2011 ForgeRock AS
*/
package org.opends.server.replication.plugin;
@@ -244,10 +245,9 @@
{
// We are replaying an operation that was already done
// on another master server and this operation has a potential
- // conflict
- // with some more recent operations on this same entry
+ // conflict with some more recent operations on this same entry
// we need to take the more complex path to solve them
- if ((ChangeNumber.compare(changeNumber, getLastUpdateTime()) <= 0) ||
+ if ((ChangeNumber.compare(changeNumber, getLastUpdateTime()) < 0) ||
(m.getModificationType() != ModificationType.REPLACE))
{
// the attribute was modified after this change -> conflict
--
Gitblit v1.10.0