From 4594bba26216d84018569a042f6517d966bf106f Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Mon, 10 Aug 2009 08:29:48 +0000
Subject: [PATCH] Fix for 4169 : Ability to disable generation of historical information and 4170 : Replication should not generate HistoricalCsnOrdering index for replayed operation
---
opends/src/server/org/opends/server/replication/plugin/HistoricalCsnOrderingMatchingRule.java | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/plugin/HistoricalCsnOrderingMatchingRule.java b/opends/src/server/org/opends/server/replication/plugin/HistoricalCsnOrderingMatchingRule.java
index cdad536..0fd77ee 100644
--- a/opends/src/server/org/opends/server/replication/plugin/HistoricalCsnOrderingMatchingRule.java
+++ b/opends/src/server/org/opends/server/replication/plugin/HistoricalCsnOrderingMatchingRule.java
@@ -136,6 +136,7 @@
@Override
public ByteString normalizeValue(ByteSequence value)
{
+
String[] token = value.toString().split(":", 3);
/* Change the format of the value to index and start
@@ -148,7 +149,10 @@
String serverId = token[1].substring(16,20);
String seqNumber = token[1].substring(20, 28);
- return ByteString.valueOf(serverId + timestamp + seqNumber);
+ if (MultimasterReplication.isLocalServerId(Short.parseShort(serverId, 16)))
+ return ByteString.valueOf(serverId + timestamp + seqNumber);
+ else
+ return (ByteString.valueOf("0"));
}
/**
--
Gitblit v1.10.0