Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2217#discussion_r183630498
--- Diff:
processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionExecutor.java
---
@@ -176,13 +176,20 @@ private SegmentProperties
getSourceSegmentProperties(List<DataFileFooter> listMe
* Below method will be used
* for cleanup
*/
- public void finish() {
+ public void close(List<RawResultIterator> rawResultIteratorList) {
try {
+ // close all the iterators. Iterators might not closed in case of
compaction failure
+ // or if process is killed
+ if (null != rawResultIteratorList) {
+ for (RawResultIterator rawResultIterator : rawResultIteratorList) {
+ rawResultIterator.close();
+ }
+ }
for (QueryExecutor queryExecutor : queryExecutorList) {
queryExecutor.finish();
}
} catch (QueryExecutionException e) {
- LOGGER.error(e, "Problem while finish: ");
+ LOGGER.error(e, "Problem while close: ");
--- End diff --
please add `ignoring the exception` to the log message
---