mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Ludovic Poitou
09.24.2011 aba87ac47f81475c93ab6f439f247176334b1ef0
opends/src/server/org/opends/server/replication/server/DbHandler.java
@@ -654,8 +654,14 @@
  public int getCount(ChangeNumber from, ChangeNumber to)
  {
    int c=0;
    flush();
    c = db.count(from, to);
    // Now that we always keep the last ChangeNumber in the DB to avoid
    // expiring cookies to quickly, we need to check if the "to"
    // is older than the trim date.
    if ((to == null) || !to.older(new ChangeNumber(latestTrimDate, 0, 0)))
    {
      flush();
      c = db.count(from, to);
    }
    return c;
  }