Skip to content

Commit

Permalink
add sleep in ConcurrentQueryPhaseSearcher to prevent memory leak
Browse files Browse the repository at this point in the history
Signed-off-by: Neetika Singhal <neetiks@amazon.com>
  • Loading branch information
neetikasinghal committed Dec 29, 2023
1 parent 60b2265 commit f38531a
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ private static boolean searchWithCollectorManager(
final ReduceableSearchResult result = searcher.search(query, collectorManager);
result.reduce(queryResult);
} catch (RuntimeException re) {
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
rethrowCauseIfPossible(re, searchContext);
}
if (searchContext.isSearchTimedOut()) {
Expand Down

0 comments on commit f38531a

Please sign in to comment.