ignore when flush can't be done

This commit is contained in:
kimchy 2010-06-14 13:25:18 +03:00
parent 0a1bc874c3
commit e0d20af743
1 changed files with 9 additions and 1 deletions

View File

@ -99,7 +99,15 @@ public class IndicesMemoryCleaner extends AbstractComponent {
for (IndexService indexService : indicesService) {
for (IndexShard indexShard : indexService) {
if (!shardsToIgnore.contains(indexShard.shardId())) {
indexShard.flush(new Engine.Flush().full(false));
try {
indexShard.flush(new Engine.Flush().full(false));
} 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);
}
}
}
}