From 9381f1aa6dac9731fa688dfbebdfdf4955abc317 Mon Sep 17 00:00:00 2001
From: fdorson <fdorson@localhost>
Date: Fri, 13 Jun 2008 12:41:33 +0000
Subject: [PATCH] fix for issue #3310 : It could take up to 6 minutes to restart a master.
---
opends/src/server/org/opends/server/replication/plugin/HistoricalCsnOrderingMatchingRule.java | 13 ++++++++++++-
1 files changed, 12 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 23bf463..8cea779 100644
--- a/opends/src/server/org/opends/server/replication/plugin/HistoricalCsnOrderingMatchingRule.java
+++ b/opends/src/server/org/opends/server/replication/plugin/HistoricalCsnOrderingMatchingRule.java
@@ -133,7 +133,18 @@
public ByteString normalizeValue(ByteString value)
{
String[] token = value.stringValue().split(":", 3);
- return new ASN1OctetString(token[1]);
+
+ /* Change the format of the value to index and start
+ * with the serverId. In that manner, the search response
+ * time is optimised for a particulare serverId.
+ * The format of the key is now :
+ * serverId + timestamp + seqNum
+ */
+ String timestamp = token[1].substring(0,16);
+ String serverId = token[1].substring(16,20);
+ String seqNumber = token[1].substring(20, 28);
+
+ return new ASN1OctetString(serverId + timestamp + seqNumber);
}
/**
--
Gitblit v1.10.0