vanzin commented on issue #26609: [SPARK-29971] Fix multiple possible buffer leaks in `TransportFrameDecoder/TransportCipher` URL: https://github.com/apache/spark/pull/26609#issuecomment-556444032 > you transfer ownership of the ByteBuf to ByteArrayReadableChannel As I mentioned that's a weird class. It's meant to be fed the buffer, and the caller is expected to consume all the data right away, as `TransportCipher` does. So technically `TransportCipher` never loses ownership of that buffer, and this class is just an optimization to avoid instantiating a new one every time data arrives. If you're really so worried about all this you could make this class a private static class inside `TransportCipher` which is the only place where it's used.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
