Repository: drill
Updated Branches:
  refs/heads/master f3c26e34e -> 229571533


DRILL-3898 :  Sort spill was modified to catch all errors, ignore repeated 
errors while closing the new group and issue a more detailed error message.

close apache/drill#591


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/140304d4
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/140304d4
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/140304d4

Branch: refs/heads/master
Commit: 140304d47daf8b18c72a0ab8f39c67d9d8a3031d
Parents: f3c26e3
Author: Boaz Ben-Zvi <b...@mapr.com>
Authored: Fri Sep 9 16:36:03 2016 -0700
Committer: Aman Sinha <asi...@maprtech.com>
Committed: Mon Sep 19 18:18:42 2016 -0700

----------------------------------------------------------------------
 .../drill/exec/physical/impl/xsort/ExternalSortBatch.java     | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/140304d4/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java
 
b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java
index c88bd4b..54aa72d 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java
@@ -592,11 +592,14 @@ public class ExternalSortBatch extends 
AbstractRecordBatch<ExternalSort> {
       }
       injector.injectChecked(context.getExecutionControls(), 
INTERRUPTION_WHILE_SPILLING, IOException.class);
       newGroup.closeOutputStream();
-    } catch (Exception e) {
+    } catch (Throwable e) {
       // we only need to cleanup newGroup if spill failed
-      AutoCloseables.close(e, newGroup);
+      try {
+        AutoCloseables.close(e, newGroup);
+      } catch (Throwable t) { /* close() may hit the same IO issue; just 
ignore */ }
       throw UserException.resourceError(e)
         .message("External Sort encountered an error while spilling to disk")
+              .addContext(e.getMessage() /* more detail */)
         .build(logger);
     } finally {
       hyperBatch.clear();

Reply via email to