Throw EngineClosedException if engine is closed
Currently we throw misleading exception in acquireSearcher if we try to acquire while we are failing the engine. We should throw an EngineClosedException instead. Relates to #5633
This commit is contained in:
parent
257eddd8f0
commit
2a5ffaafcb
|
@ -663,6 +663,7 @@ public class InternalEngine extends AbstractIndexShardComponent implements Engin
|
|||
return newSearcher(source, searcher, manager);
|
||||
} catch (Throwable ex) {
|
||||
logger.error("failed to acquire searcher, source {}", ex, source);
|
||||
ensureOpen(); // throw EngineCloseException here if we are already closed
|
||||
throw new EngineException(shardId, ex.getMessage());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue