You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2018/08/15 03:39:50 UTC

[GitHub] kaijianding opened a new pull request #6178: trigger clean dir when unzip fails with IOException

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:
users@infra.apache.org


With regards,
Apache Git Services

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