mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 18:35:25 +00:00
Enrich exception message if searcher can not be aquired
This commit also moves the log message after the ensureOpen() call to only log an error if it's really an erro condition.
This commit is contained in:
parent
2a5ffaafcb
commit
1f4de9cfb5
@ -662,9 +662,9 @@ public class InternalEngine extends AbstractIndexShardComponent implements Engin
|
||||
IndexSearcher searcher = manager.acquire();
|
||||
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());
|
||||
logger.error("failed to acquire searcher, source {}", ex, source);
|
||||
throw new EngineException(shardId, "failed to acquire searcher, source " + source, ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user