ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Ozerov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-3191) BinaryObjectBuilder: binary schema id depends on the order of fields addition
Date Thu, 15 Sep 2016 11:51:21 GMT

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

Vladimir Ozerov commented on IGNITE-3191:
-----------------------------------------

In general changes looks fine in terms that they should not break logic and performance. But
this appears to be a partial fix to me. We have the same issue with {{Binarilyzable}}. Pseudo
code:
{code}
class MyClass {
    writeBinary(Writer w) {
        w.write("B", b);
        w.write("A", a);
    }
}
{code}
And then:
{code}
BinaryObject obj1 = toBinary(new MyClass(a, b)); // Not sorted
BinaryObject obj2 = builder("MyClass").setField("B", b).setField("A", a).build(); // Sorted

assertEquals(obj1, obj2); // Returns "false".
{code}

> BinaryObjectBuilder: binary schema id depends on the order of fields addition
> -----------------------------------------------------------------------------
>
>                 Key: IGNITE-3191
>                 URL: https://issues.apache.org/jira/browse/IGNITE-3191
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Denis Magda
>            Assignee: Valentin Kulichenko
>            Priority: Critical
>             Fix For: 1.8
>
>
> Presently if an object is created using BinaryObjectBuilder then several BinarySchemes
can be generated for the same set of fields in case when fields are added in a different order.
> This happens because {{LinkedHashMap}} is used underneath. However we should rely on
order-free structure like {{TreeMap}}.



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

Mime
View raw message