Jukka Zitting created OAK-1017:
----------------------------------

             Summary: Unstable hashes in MicroKernelImpl
                 Key: OAK-1017
                 URL: https://issues.apache.org/jira/browse/OAK-1017
             Project: Jackrabbit Oak
          Issue Type: Bug
          Components: it
         Environment: Apache Maven 3.1.0 
(893ca28a1da9d5f51ac03827af98bb730128f9f2; 2013-06-27 22:15:32-0400)
Maven home: c:\Program Files\apache-maven-3.1.0
Java version: 1.7.0_40, vendor: Oracle Corporation
Java home: c:\Program Files\Java\jdk1.7.0_40\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
            Reporter: Jukka Zitting
            Assignee: Jukka Zitting
            Priority: Minor


I'm seeing {{MicroKernelIT.getNodesHash()}} test failures on the environment 
described above.

The problem seems to be caused by the way {{AbstractNode}} uses a hash map for 
properties and doesn't sort the keys before serialization. Since the ordering 
of properties in a hashmap is undefined and can change for implementation 
reasons, it's possible for two serializations of the same node to be different.

To avoid this problem {{AbstractNode}} should either use a sorted map like 
{{TreeMap}} for properties, or explicitly sort the properties during 
serialization.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to