1
1
mirror of https://github.com/MarginaliaSearch/MarginaliaSearch.git synced 2025-10-05 21:22:39 +02:00

(index) Safeguard against arena-leaks during exceptions

The GC would catch these eventually, but it's nice to clean up ourselves in a timely manner.
This commit is contained in:
Viktor Lofgren
2025-08-14 19:28:31 +02:00
parent 4a98a3c711
commit aee262e5f6

View File

@@ -96,7 +96,7 @@ public class IndexResultRankingService {
this.termsForDocs = currentIndex.getTermMetadata(arena, budget, searchTerms.termIdsAll.array, resultIds);
this.documentSpans = currentIndex.getDocumentSpans(arena, budget, resultIds);
}
catch (TimeoutException ex) {
catch (TimeoutException|RuntimeException ex) {
arena.close();
throw ex;
}