[ https://issues.apache.org/jira/browse/IGNITE-10396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16698863#comment-16698863 ]
PetrovMikhail commented on IGNITE-10396: ---------------------------------------- The problem can be in HashMap field initialization via {code:java} HashMap(Map<? extends K, ? extends V> m) {code} constructor. The way how initial map size is setted in HashMap#putMapEntries is different from the approach in IgniteUtils#capacity method,which is used during deserialization. It can cause the differences in keys' hashcode calculation and leads to different entries order. > Serialization issue of class with HashMap field > ----------------------------------------------- > > Key: IGNITE-10396 > URL: https://issues.apache.org/jira/browse/IGNITE-10396 > Project: Ignite > Issue Type: Bug > Reporter: PetrovMikhail > Assignee: Dmitriy Govorukhin > Priority: Major > Fix For: 2.8 > > Attachments: SerializationTest.java > > > If class which cointains HashMap field be serialized to BinaryObject, > deserialized and serialized again, hash codes of first and second > BinaryObjects will be different. > That can case the following situation. > IgniteCache#containsKey or IgniteCache#remove methods return false when in > their parameters passed instance of key class produced via cache iterator. > Even in so situation when IgniteCache.Entry with such key is existing. -- This message was sent by Atlassian JIRA (v7.6.3#76005)