ignore load failures on a closed reader
This commit is contained in:
parent
b3ef0a3d7f
commit
2d1a645231
|
@ -41,7 +41,6 @@ import org.elasticsearch.index.cache.bloom.BloomCache;
|
||||||
import org.elasticsearch.index.settings.IndexSettings;
|
import org.elasticsearch.index.settings.IndexSettings;
|
||||||
import org.elasticsearch.threadpool.ThreadPool;
|
import org.elasticsearch.threadpool.ThreadPool;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.nio.channels.ClosedChannelException;
|
import java.nio.channels.ClosedChannelException;
|
||||||
import java.util.concurrent.ConcurrentMap;
|
import java.util.concurrent.ConcurrentMap;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
@ -206,20 +205,23 @@ public class SimpleBloomCache extends AbstractIndexComponent implements BloomCac
|
||||||
} catch (ClosedChannelException e) {
|
} catch (ClosedChannelException e) {
|
||||||
// ignore, we are getting closed
|
// ignore, we are getting closed
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
// ignore failures that result from a closed reader...
|
||||||
|
if (reader.getRefCount() > 0) {
|
||||||
logger.warn("failed to load bloom filter for [{}]", e, field);
|
logger.warn("failed to load bloom filter for [{}]", e, field);
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
if (termDocs != null) {
|
if (termDocs != null) {
|
||||||
termDocs.close();
|
termDocs.close();
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (Exception e) {
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (termEnum != null) {
|
if (termEnum != null) {
|
||||||
termEnum.close();
|
termEnum.close();
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (Exception e) {
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue