[DOCS-9787] Clarify that each component of an ObjectID is big endian Created: 17/Jan/17  Updated: 30/Oct/23  Resolved: 25/Nov/19

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Major - P3
Reporter: Jeremy Mikola Assignee: Andrew Feierabend (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to DOCS-9384 BSON spec conflicts with documentatio... Closed
is related to SERVER-6054 Improve uniqueness of ObjectIds Backlog
Participants:
Days since reply: 4 years, 11 weeks, 1 day ago
Epic Link: DOCSP-1769

 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:



 Comments   
Comment by Githook User [ 26/Nov/19 ]

Author:

{'name': 'Andrew Feierabend', 'username': 'andf-mongodb', 'email': 'andrew.feierabend@mongodb.com'}

Message: DOCS-9787 clarify big endian storage for ObjectId
Branch: v3.4
https://github.com/mongodb/docs/commit/854a2cc16c41df9cc8d1d7b2437775a168ef7057

Comment by Githook User [ 26/Nov/19 ]

Author:

{'email': 'andrew.feierabend@mongodb.com', 'name': 'Andrew Feierabend', 'username': 'andf-mongodb'}

Message: DOCS-9787 clarify big endian storage for ObjectId
Branch: v3.6
https://github.com/mongodb/docs/commit/47571750a5cb052d7bd72d898fcee806d57a0d7a

Comment by Githook User [ 26/Nov/19 ]

Author:

{'email': 'andrew.feierabend@mongodb.com', 'name': 'Andrew Feierabend', 'username': 'andf-mongodb'}

Message: DOCS-9787 clarify big endian storage for ObjectId
Branch: v4.0
https://github.com/mongodb/docs/commit/4e16fe6961c7647d4b4ad25ce0299abba399ea41

Comment by Githook User [ 26/Nov/19 ]

Author:

{'email': 'andrew.feierabend@mongodb.com', 'name': 'Andrew Feierabend', 'username': 'andf-mongodb'}

Message: DOCS-9787 clarify big endian storage for ObjectId
Branch: master
https://github.com/mongodb/docs/commit/1b8c5a21472cd8bab16d4c9cc76b22a865f6a295

Generated at Thu Feb 08 07:59:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.