Github user JoshRosen commented on the pull request:
https://github.com/apache/spark/pull/11193#issuecomment-184509228
Thanks for the careful review, @zsxwing. I agree with your feedback and
also think that it makes a lot more sense to have `convertToNetty()` increment
the reference count. I've gone ahead and updated the patch to do this and have
rolled back a confusing `retain()` call in the test code (which you pointed out
earlier).
Take a look at the `refCnt()` assertions that I added in the test suites to
see whether they match up with what you had in mind.
Note that as of today `convertToNetty` is only called in one place in
`MessageEncoder` and the result of this is passed to `MessageWithHeader`
alongside the message that the buffer came from, so it should be verify that
`MessageWithHeader.deallocate()` will free all of the references.
---
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]