Github user juliuszsompolski commented on a diff in the pull request:
    --- Diff: core/src/main/java/org/apache/spark/io/ 
    @@ -232,7 +229,9 @@ private void waitForAsyncReadComplete() throws 
IOException {
         try {
           while (readInProgress) {
    +        isWaiting.set(true);
    +        isWaiting.set(false);
    --- End diff --
    Good catch, I added `isWaiting.set(false)` to the finally branch.
    Actually, since the whole implementation assumes that there is only one 
reader, I removed the while() loop, since there is no other reader to race with 
us to trigger another read.
    In practice I think not updating `isWaiting` it would have been benign, as 
after the exception the query will be going down with an 
`InterruptedException`, or elsewise anyone upstream handling that exception 
would most probably declare that stream as unusable afterwards anyway.


To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to