Github user industrial-sloth commented on the pull request:
https://github.com/apache/spark/pull/3093#issuecomment-61693766
FWIW, we got bit by this over in the Thunder project, where we'd been using
this class before Jeremy contributed it into Spark. The circumstance where it
came up was doing big reads from S3, where the underlying buffer size was
something like 16kb? I forget exactly... anyway, when the records didn't align
with this buffer, badness happened.
Here's the equivalent change I made over there:
https://github.com/freeman-lab/thunder/commit/7ea31c8de5a652e9c6395767fc178f7058a33d54
The previous version on that patch shows my previous fix, which does check
the number of bytes returned, before I realized that readFully() was a thing.
Both that fix and the one here do resolve the original problem we encountered,
though I'm having some trouble coming up with a clean unit test for it...
---
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]