Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-40513

BSONElementHasher does not convert its seed to little endian

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.11
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Minor Change
    • ALL
    • Query 2019-04-22
    • 50

      The 'seed' of the hash is a 4-byte number that gets used as the first four bytes of the md5sum input. These bytes are not converted to little endian, however, so on big endian (s390x in particular) platforms, the hash returns a different result unless the seed is 0 or some other value with endian-wise symmetry.

       

      Hashed indexes are hard-wired to use 0 as the seed, so this is not a data correctness problem.

            Assignee:
            justin.seyster@mongodb.com Justin Seyster
            Reporter:
            justin.seyster@mongodb.com Justin Seyster
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: