kaijianding opened a new pull request #6178: trigger clean dir when unzip fails 
with IOException
URL: https://github.com/apache/incubator-druid/pull/6178
 
 
   SegmentManager, SegmentLoaderLocalCacheManager, and many pullers catch 
IOException and wrap IOException as SegmentLoadingException, and only clean dir 
when SegmentLoadingException happens.
   But the `unzip`  method will wrap all exceptions to RuntimeException, then 
the clean logic is not going to be triggered. `unzip` should try best to throw 
IOException instead of RuntimeException
   
        try {
           return RetryUtils.retry(
               () -> unzip(byteSource.openStream(), outDir),
               shouldRetry,
               DEFAULT_RETRY_COUNT
           );
         }
         catch (Exception e) {
           throw Throwables.propagate(e);// here, RuntimeException is not 
appropriate
         }
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to