mirror of
https://github.com/apache/lucene.git
synced 2025-02-23 02:35:02 +00:00
make default exception handler in ConcurrentMergeHandler pause for 250 msec after each exception, to prevent saturating CPU
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@769431 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ea90d1152d
commit
8c8500d1f8
@ -340,6 +340,13 @@ public class ConcurrentMergeScheduler extends MergeScheduler {
|
||||
/** Called when an exception is hit in a background merge
|
||||
* thread */
|
||||
protected void handleMergeException(Throwable exc) {
|
||||
try {
|
||||
Thread.sleep(250);
|
||||
} catch (InterruptedException ie) {
|
||||
Thread.currentThread().interrupt();
|
||||
// In 3.0 this will throw InterruptedException
|
||||
throw new RuntimeException(ie);
|
||||
}
|
||||
throw new MergePolicy.MergeException(exc, dir);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user