log shard close failure when closing an index

This commit is contained in:
kimchy 2010-07-06 22:50:40 +03:00
parent 6aa9be238c
commit b2bdb149f9
1 changed files with 5 additions and 1 deletions

View File

@ -196,7 +196,11 @@ public class InternalIndexService extends AbstractIndexComponent implements Inde
@Override public synchronized void close(boolean delete) {
try {
for (int shardId : shardIds()) {
deleteShard(shardId, delete, delete);
try {
deleteShard(shardId, delete, delete);
} catch (Exception e) {
logger.warn("failed to close shard, delete [{}]", e, delete);
}
}
} finally {
indicesLifecycle.removeListener(cleanCacheOnIndicesLifecycleListener);