From cb912de2551c9aa8e91a6e03bbaecd54d4a415df Mon Sep 17 00:00:00 2001 From: kimchy Date: Sat, 5 Mar 2011 10:46:00 +0200 Subject: [PATCH] ignore engine closed exception as well --- .../elasticsearch/index/shard/service/InternalIndexShard.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/service/InternalIndexShard.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/service/InternalIndexShard.java index 6f0d7398cb7..fe5c4a82fea 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/service/InternalIndexShard.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/service/InternalIndexShard.java @@ -629,7 +629,9 @@ public class InternalIndexShard extends AbstractIndexShardComponent implements I } catch (EngineClosedException e) { // we are being closed, ignore } catch (OptimizeFailedEngineException e) { - if (e.getCause() instanceof InterruptedException) { + if (e.getCause() instanceof EngineClosedException) { + // ignore, we are being shutdown + } else if (e.getCause() instanceof InterruptedException) { // ignore, we are being shutdown } else if (e.getCause() instanceof ClosedByInterruptException) { // ignore, we are being shutdown