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

Jean-Noel Rouvignac
04.47.2013 513eb83896bf4654aa0e3628c2666e307712a8cc
opends/src/server/org/opends/server/replication/server/changelog/je/ChangeNumberIndexer.java
@@ -365,6 +365,7 @@
          if (doClear.get())
          {
            removeAllCursors();
            resetNextChangeForInsertDBCursor();
            // No need to use CAS here because it is only for unit tests and at
            // this point all will have been cleaned up anyway.
            doClear.set(false);
@@ -434,7 +435,6 @@
          Thread.currentThread().interrupt();
        }
      }
      removeAllCursors();
    }
    catch (ChangelogException e)
    {
@@ -448,6 +448,10 @@
        TRACER.debugCaught(DebugLogLevel.ERROR, e);
      // TODO JNR error message i18n
    }
    finally
    {
      removeAllCursors();
    }
  }
  private void moveForwardMediumConsistencyPoint(final CSN csn, final DN baseDN)
@@ -467,15 +471,19 @@
    }
  }
  private void removeAllCursors() throws ChangelogException
  private void removeAllCursors()
  {
    if (nextChangeForInsertDBCursor != null)
    {
      nextChangeForInsertDBCursor.close();
      nextChangeForInsertDBCursor = null;
    }
    for (Map<Integer, DBCursor<UpdateMsg>> map : allCursors.values())
    {
      StaticUtils.close(map.values());
    }
    allCursors.clear();
    newCursors.clear();
    resetNextChangeForInsertDBCursor();
  }
  private void removeCursor(final DN baseDN, final CSN csn)