grundprinzip commented on PR #46060:
URL: https://github.com/apache/spark/pull/46060#issuecomment-2058171185

   > LGTM - pending tests.
   
   In my manual testing, the issue arises simply when running our existing 
tests and the tests will fail in the python client code in `reattach.py` that 
the `result_complete` method is not the last one in the stream.
   
   This behavior is fixed by 
   
   ```
   /**
      * Atomically submits a response and marks the stream as completed.
      */
     def onNextComplete(r: T): Unit = responseLock.synchronized {
       if (!tryOnNext(r)) {
         throw new IllegalStateException("Stream onNext can't be called after 
stream completed")
       }
       onCompleted()
     }
   ```
   
   Previously, these were two calls that are individually guarded, but now 
they're guarded together.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to