jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Francesco Mari (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-7760) Use NIO in the implementation of FileAccess.Mapped#read
Date Tue, 18 Sep 2018 08:12:00 GMT

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

Francesco Mari commented on OAK-7760:
-------------------------------------

[~mduerig], I think that {{readFully}} should return early from the loop only when {{count
< 0}}. If {{count == 0}} the resource might just be busy and not returning any data.

> Use NIO in the implementation of FileAccess.Mapped#read
> -------------------------------------------------------
>
>                 Key: OAK-7760
>                 URL: https://issues.apache.org/jira/browse/OAK-7760
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: segment-tar
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>            Priority: Major
>             Fix For: 1.10
>
>
> {{FileAccess.Random#read}} currently uses {{RandomAccessFile#readFully()}} to read a
segment from a tar file. That method requires a byte array and does not work with {{ByteBuffer}}
instances directly. To make this method more universal (e.g. to work also for off heap byte
buffers) I would like to change it to use {{FileChannel#read}} instead.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message