Skip to content

Commit

Permalink
Throw EngineClosedException if engine is closed
Browse files Browse the repository at this point in the history
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
  • Loading branch information
s1monw committed Apr 1, 2014
1 parent d039af7 commit 768878e
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -663,6 +663,7 @@ public final Searcher acquireSearcher(String source) throws EngineException {
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());
}
}
Expand Down

0 comments on commit 768878e

Please sign in to comment.