You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Alex Parvulescu (JIRA)" <ji...@apache.org> on 2014/10/21 12:39:33 UTC

[jira] [Comment Edited] (OAK-2222) Clarify the OakIndexFile input and output contracts

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

Alex Parvulescu edited comment on OAK-2222 at 10/21/14 10:39 AM:
-----------------------------------------------------------------

bq. Should we also add like ensureOpen() in other calls?
Interesting, didn't think about that, it would be worth adding some checks.

bq. Current each byte access is implemented in bit expensive way using the buffered variant would avoid that
I'm not sure I follow this, we're already using the buffer to optimize reading bytes, when you reach the end you might pay the price of having to refill the buffer, but this can happen in both cases anyway.

About using the buffered variants, I'm not sure what gain we might get from this, the code is already doing much of the work. If we look at it from a simplification of the existing code perspective, then maybe, otherwise I'm not convinced.


was (Author: alex.parvulescu):
bq. Should we also add like ensureOpen() in other calls?
Interesting, didn't think about that, it would be worth adding some checks.

bq. Current each byte access is implemented in bit expensive way using the buffered variant would avoid that
I'm not I follow this, we're already using the buffer to optimize reading bytes, when you reach the end you might pay the price of having to refill the buffer, but this can happen in both cases anyway.

About using the buffered variants, I'm not sure what gain we might get from this, the code is already doing much of the work. If we look at it from a simplification of the existing code perspective, then maybe, otherwise I'm not convinced.

> Clarify the OakIndexFile input and output contracts
> ---------------------------------------------------
>
>                 Key: OAK-2222
>                 URL: https://issues.apache.org/jira/browse/OAK-2222
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: oak-lucene
>            Reporter: Alex Parvulescu
>            Assignee: Alex Parvulescu
>            Priority: Minor
>             Fix For: 1.1.2
>
>         Attachments: lucene-directory.patch
>
>
> This is just a minor refactoring of the current code to clarify that the _OakIndexInput_ is in fact a read-only view.



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