ignore state exceptions when trying to flush

This commit is contained in:
kimchy 2010-06-22 10:26:44 +03:00
parent 0c6b82aeca
commit 7c931f34fa

View File

@ -90,7 +90,15 @@ public class IndicesMemoryCleaner extends AbstractComponent {
public void fullMemoryClean() {
for (IndexService indexService : indicesService) {
for (IndexShard indexShard : indexService) {
indexShard.flush(new Engine.Flush().full(true));
try {
indexShard.flush(new Engine.Flush().full(true));
} catch (FlushNotAllowedEngineException e) {
// ignore this one, its temporal
} catch (IllegalIndexShardStateException e) {
// ignore this one as well
} catch (Exception e) {
logger.warn(indexShard.shardId() + ": Failed to force flush in order to clean memory", e);
}
}
}
}