[ 
https://issues.apache.org/jira/browse/CASSANDRA-11867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15297518#comment-15297518
 ] 

Stefania commented on CASSANDRA-11867:
--------------------------------------

+1 but the [trunk 
patch|https://github.com/apache/cassandra/compare/cassandra-trunk...snazy:11867-niois-clearbuf-trunk]
 seems missing.

We'll get NPEs if erroneously using a closed NIODataInputStream, but the 
alternative is to access invalid direct memory and that is definitely worse; 
slowing everything down with assertions to check that the buffer is not null is 
also not an option since we encourage people to leave assertions on. So if we 
erroneously use a closed input stream we'll get NPEs rather than assertion 
errors, I guess we have to live with this.

> Possible memory leak in NIODataInputStream
> ------------------------------------------
>
>                 Key: CASSANDRA-11867
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11867
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Robert Stupp
>            Assignee: Robert Stupp
>            Priority: Minor
>             Fix For: 2.2.x, 3.0.x
>
>
> {{NIODataInputStream}} allocates direct memory but does not clean it on 
> close. Proposed patch adds a call to {{FileUtils.clean()}} for this direct 
> memory buffer.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to