Fail the engine/shard when refresh failed

When refresh failed, it would fail due to a serious issue in the shard (mainly corrupted index). Fail the engine in that cause, which will cause the shard to fail. The reason why its not only on CorruptedIndex failed is that any type of failure seems to be relevant here to fail the shard
closes #5633
This commit is contained in:
Shay Banon 2014-04-01 01:25:13 +02:00
parent d13850814e
commit c83c72b165
1 changed files with 1 additions and 0 deletions

View File

@ -730,6 +730,7 @@ public class InternalEngine extends AbstractIndexShardComponent implements Engin
} else if (currentWriter != indexWriter) {
// an index writer got replaced on us, ignore
} else {
failEngine(e);
throw new RefreshFailedEngineException(shardId, e);
}
}