gortiz commented on code in PR #13818: URL: https://github.com/apache/pinot/pull/13818#discussion_r1716728448
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/startree/v2/builder/BaseSingleTreeBuilder.java: ########## @@ -520,11 +520,22 @@ private void createForwardIndexes() } } } finally { - for (SingleValueUnsortedForwardIndexCreator dimensionIndexCreator : dimensionIndexCreators) { - dimensionIndexCreator.close(); + for (int i = 0; i < dimensionIndexCreators.length; i++) { + try { + dimensionIndexCreators[i].close(); + } catch (Throwable e) { + LOGGER.warn("Caught throwable while closing dimension index creator for dimension: {}", + _dimensionsSplitOrder[i], e); + throw e; Review Comment: throwing inside a finally section is an anti-pattern, but in fact we were already doing that before this change. -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org