gortiz commented on code in PR #10847: URL: https://github.com/apache/pinot/pull/10847#discussion_r1218737763
########## pinot-core/src/main/java/org/apache/pinot/core/segment/processing/framework/SegmentProcessorFramework.java: ########## @@ -91,33 +92,51 @@ public SegmentProcessorFramework(List<RecordReader> recordReaders, SegmentProces */ public List<File> process() throws Exception { + try { + return doProcess(); + } catch (Exception e) { + if (_partitionToFileManagerMap != null) { + for (GenericRowFileManager fileManager : _partitionToFileManagerMap.values()) { + fileManager.cleanUp(); + } + } + throw new RuntimeException("Failed to complete process", e); Review Comment: I don't know. I would prefer to get the specific exception why that fail instead of a generic runtime exception and having to check the cause. But it is not a blocker, if you think that it is better to throw the runtime, it is ok to me. -- 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