Github user denalex commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/1334#discussion_r164913643 --- Diff: pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/rest/WritableResource.java --- @@ -159,20 +159,16 @@ private static Response writeResponse(Bridge bridge, ++totalWritten; } } catch (ClientAbortException e) { - LOG.debug("Remote connection closed by HAWQ", e); + LOG.error("Remote connection closed by HAWQ", e); } catch (Exception ex) { - LOG.debug("totalWritten so far " + totalWritten + " to " + path); + LOG.error("totalWritten so far " + totalWritten + " to " + path); throw ex; } finally { - try { - bridge.endIteration(); - } catch (Exception e) { - // ignore ... any significant errors should already have been handled - } + bridge.endIteration(); --- End diff -- if Exception happened in try and is rethrown by catch and also endIteration throws an exception, then the original one will be forgotten and the latest one form endIteration will be thrown. If this is ok, we should at least log at error level the original one in catch block. Alternatively, have an error flag set by catch and then ignore exception here only if the flag is set to have the original one propagate to the client.
---