remove dead code (exceptions list) from ConcurrentMergeScheduler; add comment to the 250 msec sleep

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@769533 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2009-04-28 20:59:44 +00:00
parent 72d1873533
commit e4d9711c97
1 changed files with 6 additions and 5 deletions

View File

@ -41,7 +41,6 @@ public class ConcurrentMergeScheduler extends MergeScheduler {
// Max number of threads allowed to be merging at once
private int maxThreadCount = 3;
private List exceptions = new ArrayList();
protected Directory dir;
private boolean closed;
@ -309,10 +308,6 @@ public class ConcurrentMergeScheduler extends MergeScheduler {
// Ignore the exception if it was due to abort:
if (!(exc instanceof MergePolicy.MergeAbortedException)) {
synchronized(ConcurrentMergeScheduler.this) {
exceptions.add(exc);
}
if (!suppressExceptions) {
// suppressExceptions is normally only set during
// testing.
@ -341,6 +336,12 @@ public class ConcurrentMergeScheduler extends MergeScheduler {
* thread */
protected void handleMergeException(Throwable exc) {
try {
// When an exception is hit during merge, IndexWriter
// removes any partial files and then allows another
// merge to run. If whatever caused the error is not
// transient then the exception will keep happening,
// so, we sleep here to avoid saturating CPU in such
// cases:
Thread.sleep(250);
} catch (InterruptedException ie) {
Thread.currentThread().interrupt();