You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2013/09/13 17:39:07 UTC
[jira] [Created] (OAK-1017) Unstable hashes in MicroKernelImpl
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