Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-9787

Clarify that each component of an ObjectID is big endian

    XMLWordPrintableJSON

Details

    Description

      While investigating how Timestamp types are structured and compared for DOCS-9384, we also looked at ObjectID, which is compared in byte order with memcmp().

      While the BSON spec states that "Each type must be serialized in little-endian format", it's clear that an ObjectID's components must actually be stored in big endian, with the most significant bytes appearing first in the byte sequence.

      The following pages should be updated to clarify this:

      Attachments

        Activity

          People

            andrew.feierabend@mongodb.com Andrew Feierabend (Inactive)
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              4 years, 11 weeks, 1 day ago