[
https://issues.apache.org/jira/browse/KAFKA-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13738373#comment-13738373
]
Jay Kreps commented on KAFKA-1008:
----------------------------------
Hey Elizabeth, thanks for the patch!
Three follow-up items for us to take this:
1. If we refer to sun.nio.ch.DirectBuffer that introduces a build-time
dependency on Sun java. I think that is probably okay. But what is the behavior
of tryUnmap on a non-sun jvm at runtime (or if sun ever changes their
implementation)? My suspicion is that we would get a ClassNotFoundException for
sun.nio.ch.DirectBuffer right? I think we would be better off wrapping
everything inside tryUnmap inside a try/catch and trace logging if there is an
exception.
2. It looks like you added back in a call to flush which we removed as part of
another patch. Probably accidental, right?
3. I would like to understand the security issue on the Sun ticket for unmap
here: http://bugs.sun.com/view_bug.do?bug_id=4724038 If we don't understand
what the concern is then there is a possibility we are introducing a security
problem (though I don't think so...).
> Unmap before resizing
> ---------------------
>
> Key: KAFKA-1008
> URL: https://issues.apache.org/jira/browse/KAFKA-1008
> Project: Kafka
> Issue Type: Bug
> Components: core, log
> Affects Versions: 0.8
> Environment: Windows, Linux, Mac OS
> Reporter: Elizabeth Wei
> Assignee: Jay Kreps
> Labels: patch
> Fix For: 0.8
>
> Attachments: unmap-v1.patch
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> While I was studying how MappedByteBuffer works, I saw a sharing runtime
> exception on Windows. I applied what I learned to generate a patch which uses
> an internal open JDK API to solve this problem.
> Following Jay's advice, I made a helper method called tryUnmap().
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira