steveloughran commented on issue #1791: HADOOP-16785: wasb to raise IOE if 
write() invoked on a closed stream
URL: https://github.com/apache/hadoop/pull/1791#issuecomment-571175415
 
 
   
   I can't replicate that in the test -but can see how it does surface...it's 
in the close() of a try-with-resources
   
   * If a call like out.flush() raises an IOE, try-with-resources tries to 
close the stream
   * and an exception from close() is added to the first IOE via addSuppressed
   * which doesn't let you add the caught exception to itself.
   * So if the ABFS stream close() always rethrows the same exception, you get 
a failure.
   * This could happen if there had been some previous failure and 
maybeRethrowException() was throwing it - the final 
     flushInternal() call will throw the same exception, so addSuppressed will 
fail.
     
   I'm patching flushInternal() so that if it rethrows an exception in close, 
it wraps that with a covering IOE. (it still nests the inner, so there is a 
loop in the chain).
   

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to