Github user JoshRosen commented on the pull request:
https://github.com/apache/spark/pull/2838#issuecomment-60328732
Since this approach seems to be technically correct given our current code,
and since it fixes an urgent blocker, I'm going to merge this. We can revisit
other solutions later, such as out-of-band control or checksumming of our
streams.
If the assumptions in this patch are violated, the worst-case outcomes
aren't any worse than what happens now:
- If the Python worker has shut down but the JVM doesn't realize this, then
subsequent tasks scheduled for that worker will crash and Java will detect the
shutdown at that point.
- If the Python worker does not realize that extra data was left in the
stream, then it will read this extra data and probably crash while
deserializing random data as a Python UDF.
So, in either case we crash the worker, causing a fresh one to be launched.
This shouldn't happen, since this patch seems okay, but it's good to know that
the likely worst-case outcome is a few extra crash failures and not data
corruption.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]