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-3965) SegmentPropertyState external binary property reports unusual size
Date Tue, 02 Feb 2016 08:56:40 GMT

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

Francesco Mari commented on OAK-3965:

[~alex.parvulescu] it seems that {{SegmentPropertyState#size()}} reads the size of the property
value assuming that the property value is always a string. External binary IDs, instead, are
written in a different way than strings. For the writing part, see {{RecordWriters.LargeBlobIdWriter}}
and {{RecordWriters.SmallBlobIdWriter}}, where a different encoding of the length is used
if the external binary ID is too large. For the reading part, the correct implementation is
{{SegmentBlob#length()}}. Can {{SegmentPropertyState#size()}} delegate to {{SegmentBlob#length()}}}
in case of a binary property state?

> SegmentPropertyState external binary property reports unusual size
> ------------------------------------------------------------------
>                 Key: OAK-3965
>                 URL: https://issues.apache.org/jira/browse/OAK-3965
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: segmentmk
>            Reporter: Alex Parvulescu
>            Assignee: Alex Parvulescu
>            Priority: Minor
>         Attachments: ExternalBlobIT.java.patch
> Calling getSize on an external binary reports a very unusual size:
> {code}
> world = {2318898817333174704 bytes}
> {code}
> the binary is actually around 17k in size.
> I think this happens because of how the size is computed, a sort of a read overflow,
and it also affects the toString method [0].
> [0] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-segment/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentPropertyState.java#L202

This message was sent by Atlassian JIRA

View raw message