drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben-Zvi <...@git.apache.org>
Subject [GitHub] drill pull request #585: DRILL-3898 : Sort spill was modified to catch all e...
Date Fri, 16 Sep 2016 23:43:23 GMT
Github user Ben-Zvi commented on a diff in the pull request:

    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java
    @@ -592,11 +592,14 @@ public BatchGroup mergeAndSpill(LinkedList<BatchGroup> batchGroups)
throws Schem
           injector.injectChecked(context.getExecutionControls(), INTERRUPTION_WHILE_SPILLING,
    -    } 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 */ }
    --- End diff --
    The root cause for the whole bug is in Hadoop's RawLocalFileSystem.java:
    package org.apache.hadoop.fs;
        public void write(byte[] b, int off, int len) throws IOException {
          try {
            fos.write(b, off, len);
          } catch (IOException e) {                // unexpected exception
            throw new FSError(e);                  // assume native fs error
    And FSError is not a subclass of IOException !!!  
    So the only common ancestor is Throwable .  And any part in the drill code that catches
only IOException will not catch !!

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message