You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Amelchev Nikita (JIRA)" <ji...@apache.org> on 2018/04/02 08:13:00 UTC

[jira] [Assigned] (IGNITE-6128) Binary: offsets might be skipped for constant-length fields

     [ https://issues.apache.org/jira/browse/IGNITE-6128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amelchev Nikita reassigned IGNITE-6128:
---------------------------------------

    Assignee:     (was: Amelchev Nikita)

> Binary: offsets might be skipped for constant-length fields
> -----------------------------------------------------------
>
>                 Key: IGNITE-6128
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6128
>             Project: Ignite
>          Issue Type: Task
>          Components: binary
>    Affects Versions: 2.1
>            Reporter: Vladimir Ozerov
>            Priority: Major
>              Labels: iep-2, performance
>
> Currently we write offsets for every field. It could take 1, 2 or 4 bytes depending on the data length of the object. Now suppose we have the following class:
> {code}
> class MyClass {
>     int a;
>     String c;
>     long b;
>     int d;
>     int e;
> }
> {code}
> Fields are always sorted in alphabetical order, so we will write them as follows {{[a, b, c, d, e]}}, and their offsets would always be {{[0, 5, 14, X, X+5]}}. As you see, instead of writing 5 offsets, it is enough to write only one offset of a field, which follows another variable-length field. The rest offsets could be saved to metadata.



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