Github user icexelloss commented on a diff in the pull request: https://github.com/apache/spark/pull/21397#discussion_r189996870 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/python/ArrowPythonRunner.scala --- @@ -94,8 +88,18 @@ class ArrowPythonRunner( writer.writeBatch() arrowWriter.reset() } - } { writer.end() --- End diff -- The routine in `TaskCompletionListener` is not really a safe belt, it actually causes the race condition. But you are right, I believe putting the cleanup routine in finally block is enough.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org