From 36191b70a96c298ad07cf9a9384cc42764ea957e Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Wed, 22 Apr 2009 06:22:39 +0000
Subject: [PATCH] The replication publish information about the whole topology in cn=monitor When cn=monitor is searched, the replication therefore asks informations about the replication state to all Replication Servers. This should always be fast unless a server is hanged. In such case the replication waits for 5 seconds then issue an error message and goes on with the information it has received at this time.

---
 opends/src/server/org/opends/server/replication/server/MonitorData.java |   31 ++++---------------------------
 1 files changed, 4 insertions(+), 27 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/server/MonitorData.java b/opends/src/server/org/opends/server/replication/server/MonitorData.java
index 0c96b2e..59f5e09 100644
--- a/opends/src/server/org/opends/server/replication/server/MonitorData.java
+++ b/opends/src/server/org/opends/server/replication/server/MonitorData.java
@@ -62,8 +62,6 @@
    *   date of the first missing change.
    */
 
-  /* The date of the last time they have been elaborated */
-  private long buildDate = 0;
 
   // For each LDAP server, its server state
   private ConcurrentHashMap<Short, ServerState> LDAPStates =
@@ -103,7 +101,7 @@
   {
     Long afmd = fmd.get(serverId);
     if ((afmd != null) && (afmd>0))
-      return ((this.getBuildDate() - afmd)/1000);
+      return (TimeThread.getTime() - afmd)/1000;
     else
       return 0;
   }
@@ -243,7 +241,6 @@
         TRACER.debugInfo(
           "Complete monitor data : Missing changes ("+ lsiSid +")=" + mds);
     }
-    this.setBuildDate(TimeThread.getTime());
     }
 
   /**
@@ -255,7 +252,6 @@
   {
     String mds = "Monitor data=\n";
 
-    mds+= "Build date=" + this.getBuildDate();
     // RS data
     Iterator<Short> rsite = fmRSDate.keySet().iterator();
     while (rsite.hasNext())
@@ -281,10 +277,9 @@
       ServerState ss = LDAPStates.get(sid);
       mds += "\nLSData(" + sid + ")=\t" + "state=[" + ss.toString()
       + "] afmd=" + this.getApproxFirstMissingDate(sid);
-      if (getBuildDate()>0)
-      {
-        mds += " missingDelay=" + this.getApproxDelay(sid);
-      }
+
+      mds += " missingDelay=" + this.getApproxDelay(sid);
+
       mds +=" missingCount=" + missingChanges.get(sid);
     }
 
@@ -304,24 +299,6 @@
   }
 
   /**
-   * Sets the build date of the data.
-   * @param buildDate The date.
-   */
-  public void setBuildDate(long buildDate)
-  {
-    this.buildDate = buildDate;
-  }
-
-  /**
-   * Returns the build date of the data.
-   * @return The date.
-   */
-  public long getBuildDate()
-  {
-    return buildDate;
-  }
-
-  /**
    * From a provided state, sets the max CN of the monitor data.
    * @param state the provided state.
    */

--
Gitblit v1.10.0