Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1678#discussion_r157950581
  
    --- Diff: 
processing/src/main/java/org/apache/carbondata/processing/merger/CompactionResultSortProcessor.java
 ---
    @@ -298,8 +298,7 @@ private void readAndLoadDataFromSortTempFiles() throws 
Exception {
             try {
               dataHandler.closeHandler();
             } catch (CarbonDataWriterException e) {
    -          LOGGER.error(e);
    -          throw new Exception("Problem loading data during compaction: " + 
e.getMessage());
    +          LOGGER.error(e, "Error in close data handler");
    --- End diff --
    
    I think it is better not to hide the exception even in finally block, there 
are multiple operations inside dataHandler.closeHandler(), let it throw 
exception to caller then we can know which operation cause the exception.
    In line 292, 295, 301, please modify to use `new Exception(msg, e) to 
include the original exception in the new exception.


---

Reply via email to