lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Radim Kolar <...@filez.com>
Subject concurrentmergescheduller
Date Mon, 05 Nov 2012 18:42:08 GMT
i suspect that this code is broken. Lines 331 - 343 in 
org.apache.lucene.index.ConcurrentMergeScheduler.merge(IndexWriter)

mergeThreadCount() are currently active merges, they can be at most 
maxThreadCount, maxMergeCount is number of queued merges defaulted with 
maxThreadCount+2 and it can never be lower then maxThreadCount, which 
means that condition in while can never become true.

       synchronized(this) {
         long startStallTime = 0;
         while (mergeThreadCount() >= 1+maxMergeCount) {
           startStallTime = System.currentTimeMillis();
           if (verbose()) {
             message("    too many merges; stalling...");
           }
           try {
             wait();
           } catch (InterruptedException ie) {
             throw new ThreadInterruptedException(ie);
           }
         }



maxThreadCount+2;

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message