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

Jean-Noel Rouvignac
04.25.2014 2a09adec857fd42ef4b9369f98d51343fda5ae56
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/ReplicationDB.java
@@ -187,10 +187,11 @@
   *
   * @param changes
   *          The list of changes to add to the underlying db.
   * @return the total size of all the changes
   * @throws ChangelogException
   *           If a database problem happened
   */
  public void addEntries(List<UpdateMsg> changes) throws ChangelogException
  public int addEntries(List<UpdateMsg> changes) throws ChangelogException
  {
    dbCloseLock.readLock().lock();
    try
@@ -198,9 +199,10 @@
      // If the DB has been closed then return immediately.
      if (isDBClosed())
      {
        return;
        return 0;
      }
      int totalSize = 0;
      for (UpdateMsg change : changes)
      {
        final DatabaseEntry key = createReplicationKey(change.getCSN());
@@ -209,7 +211,10 @@
        insertCounterRecordIfNeeded(change.getCSN());
        db.put(null, key, data);
        counterCurrValue++;
        totalSize += change.size();
      }
      return totalSize;
    }
    catch (DatabaseException e)
    {