acquireSearcher should fail with state failure when not set/closed

also fixes #4232
This commit is contained in:
Shay Banon 2013-11-25 11:24:55 +01:00
parent 9648a53fd5
commit 2ba7c1d4a1
1 changed files with 1 additions and 1 deletions

View File

@ -690,7 +690,7 @@ public class RobinEngine extends AbstractIndexShardComponent implements Engine {
try { try {
IndexSearcher searcher = manager.acquire(); IndexSearcher searcher = manager.acquire();
return newSearcher(source, searcher, manager); return newSearcher(source, searcher, manager);
} catch (IOException ex) { } catch (Throwable ex) {
logger.error("failed to acquire searcher, source {}", ex, source); logger.error("failed to acquire searcher, source {}", ex, source);
throw new EngineException(shardId, ex.getMessage()); throw new EngineException(shardId, ex.getMessage());
} }