Skip to content

Commit ad5fe76

Browse files
committed
update comment
1 parent 8dfcaaf commit ad5fe76

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/src/main/java/org/elasticsearch/search/SearchService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,8 +708,9 @@ private DefaultSearchContext createSearchContext(SearchRewriteContext rewriteCon
708708
return searchContext;
709709
} finally {
710710
if (success == false) {
711-
// we handle the case where the DefaultSearchContext constructor throws an exception since we would otherwise
712-
// leak a searcher and this can have severe implications (unable to obtain shard lock exceptions).
711+
// we handle the case where `IndicesService#indexServiceSafe`or `IndexService#getShard`, or the DefaultSearchContext
712+
// constructor throws an exception since we would otherwise leak a searcher and this can have severe implications
713+
// (unable to obtain shard lock exceptions).
713714
IOUtils.closeWhileHandlingException(rewriteContext.searcher);
714715
}
715716
}

0 commit comments

Comments
 (0)