Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-1017

Unstable hashes in MicroKernelImpl

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.9
    • mk
    • None

    Description

      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.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jukkaz Jukka Zitting
            jukkaz Jukka Zitting
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment