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

boli
20.27.2007 fceec4773fdc91fa7e11334a56f0403fd69292ed
opendj-sdk/opends/src/server/org/opends/server/backends/jeb/RebuildJob.java
@@ -469,6 +469,27 @@
        timer.scheduleAtFixedRate(progressTask, progressInterval,
                                  progressInterval);
        entryContainer.exclusiveLock.lock();
        try
        {
          for(IndexRebuildThread thread : waitingThreads)
          {
            thread.clearDatabase();
          }
        }
        finally
        {
          if(!rebuildConfig.includesSystemIndex())
          {
            entryContainer.exclusiveLock.unlock();
          }
        }
        if(!rebuildConfig.includesSystemIndex())
        {
          entryContainer.sharedLock.lock();
        }
        try
        {
          while(!waitingThreads.isEmpty())
@@ -480,6 +501,14 @@
        finally
        {
          timer.cancel();
          if(rebuildConfig.includesSystemIndex())
          {
            entryContainer.exclusiveLock.unlock();
          }
          else
          {
            entryContainer.sharedLock.unlock();
          }
        }
        long totalProcessed = 0;
@@ -528,7 +557,7 @@
  /**
   * Dispatch a set of threads based on their dependency and ordering.
   */
  private void dispatchThreads()
  private void dispatchThreads() throws DatabaseException
  {
    for(IndexRebuildThread t : waitingThreads)
    {