Github user vanzin commented on the pull request:
https://github.com/apache/spark/pull/5377#issuecomment-96842148
I made the changes to report non-zero written bytes
(https://github.com/vanzin/spark/commit/346f8291a91b0b73742263d7a23ee4027d76adb9).
But after writing and testing it, I kinda started questioning whether it will
improve anything...
`0` or `1` are basically returned in the same situation: the underlying
channel does not have enough buffer. So returning non-zero would cause netty to
"busy loop" and call `transferTo` again, which would fail to write anything and
thus would now return 0.
But I guess this makes the code behave more like it would with other
non-hacky `FileRegion` implementations.
---
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]