Changes to RandomAccessFile in jdk9

Enrico Olivelli eolivelli at gmail.com
Sun Apr 22 19:13:54 UTC 2018


Il dom 22 apr 2018, 09:53 Alan Bateman <Alan.Bateman at oracle.com> ha scritto:

>
> I've re-read the discussion on this issue from 2016, both in
> JDK-8168628, and the mails here.
>
> Looking at it now, I don't think RanomAccessFile.setLength should have
> been changed. Instead, the changes should have been limited to
> FileChannel.map to force disk space for the desired mapped region to be
> allocated first (irrespective of whether the mapping causes the file to
> be extended or not). This will also fix other cases with FileChannel
> that were missed. I'll create a bug for this.
>
> Reading Ismael's mail then it will have no impact on the "memory mapped
> index file" case. If a sparse index file is memory mapped with
> FileChannel.map then the disk space for the mapped region will be
> allocated. If the "log segment files" are sparse then they will continue
> to be so unless they are memory-mapped.
>


Thank you Alan,
Do you think we can hope for a fix in Java 10.0.01 ?

Enrico

>
> -Alan
>
-- 


-- Enrico Olivelli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20180422/4540a9bf/attachment.html>


More information about the nio-dev mailing list