fabriziofortino commented on code in PR #1217: URL: https://github.com/apache/jackrabbit-oak/pull/1217#discussion_r1397512475
########## oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/async/facets/ElasticInsecureFacetAsyncProvider.java: ########## @@ -45,8 +45,12 @@ class ElasticInsecureFacetAsyncProvider implements ElasticFacetProvider, Elastic public List<FulltextIndex.Facet> getFacets(int numberOfFacets, String columnName) { LOG.trace("Requested facets for {} - Latch count: {}", columnName, latch.getCount()); try { - latch.await(15, TimeUnit.SECONDS); + boolean completed = latch.await(15, TimeUnit.SECONDS); + if (!completed) { + throw new IllegalStateException("Timed out while waiting for facets"); + } } catch (InterruptedException e) { + Thread.currentThread().interrupt(); // restore interrupt status throw new IllegalStateException("Error while waiting for facets", e); } LOG.trace("Reading facets for {} from aggregations {}", columnName, aggregations); Review Comment: no need. See comment above. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@jackrabbit.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org