You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "juliuszsompolski (via GitHub)" <gi...@apache.org> on 2023/08/01 07:57:49 UTC

[GitHub] [spark] juliuszsompolski commented on pull request #42228: [SPARK-44421][SPARK-44423][CONNECT] Reattachable execution in Spark Connect

juliuszsompolski commented on PR #42228:
URL: https://github.com/apache/spark/pull/42228#issuecomment-1659769032

   We call hasNext above to assure that it's not empty at this point.
   
   On Tue, Aug 1, 2023, 09:36 Hyukjin Kwon ***@***.***> wrote:
   
   > ***@***.**** commented on this pull request.
   > ------------------------------
   >
   > In
   > connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/connect/client/ExecutePlanResponseReattachableIterator.scala
   > <https://github.com/apache/spark/pull/42228#discussion_r1280222878>:
   >
   > > +    // hasNext will trigger reattach in case the stream completed without responseComplete
   > +    if (!hasNext()) {
   > +      throw new java.util.NoSuchElementException()
   > +    }
   > +
   > +    // Get next response, possibly triggering reattach in case of stream error.
   > +    var firstTry = true
   > +    val ret = retry {
   > +      if (firstTry) {
   > +        // on first try, we use the existing iterator.
   > +        firstTry = false
   > +      } else {
   > +        // on retry, the iterator is borked, so we need a new one
   > +        iterator = rawBlockingStub.reattachExecute(createReattachExecuteRequest())
   > +      }
   > +      iterator.next()
   >
   > qq: can this iterator empty?
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/spark/pull/42228#pullrequestreview-1556345712>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/AF64GG7M7ZLJRJY53M6GDOLXTCWZPANCNFSM6AAAAAA25LFB6E>
   > .
   > You are receiving this because you were mentioned.Message ID:
   > ***@***.***>
   >
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org