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

Jean-Noel Rouvignac
09.35.2013 bcd9325b7d47b6932d140a15ee761252e130ab7e
opends/src/server/org/opends/server/replication/server/changelog/je/JEChangeNumberIndexDB.java
@@ -375,14 +375,15 @@
            continue;
          }
          // Purge up to wherever the other DBs have been purged to.
          // FIXME there is an opportunity for a phantom record in the current
          // DB if the replicaDB gets purged after the next if statement.
          // FIXME there is an opportunity for a phantom record in the CNIndexDB
          // if the replicaDB gets purged after call to domain.getOldestState().
          final CSN csn = record.getCSN();
          final ServerState startState = domain.getStartState();
          final CSN fcsn = startState.getCSN(csn.getServerId());
          final ServerState oldestState = domain.getOldestState();
          final CSN fcsn = oldestState.getCSN(csn.getServerId());
          if (csn.isOlderThan(fcsn))
          {
            // This change which has already been purged from the corresponding
            // replicaDB => purge it from CNIndexDB
            cursor.delete();
            continue;
          }
@@ -397,7 +398,7 @@
            if (debugEnabled())
              TRACER.debugInfo("JEChangeNumberIndexDB:clear() - ChangeVector:"
                  + csnVector + " -- StartState:" + startState);
                  + csnVector + " -- StartState:" + oldestState);
          }
          catch(Exception e)
          {
@@ -409,7 +410,7 @@
          if (csnVector == null
              || (csnVector.getCSN(csn.getServerId()) != null
                    && !csnVector.cover(startState)))
                    && !csnVector.cover(oldestState)))
          {
            cursor.delete();
            if (debugEnabled())