[DOCS-10063] Documentation for ObjectId generation does not match server behavior Created: 29/Mar/17  Updated: 30/Oct/23

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

Type: Bug Priority: Major - P3
Reporter: Bernie Hackett Assignee: Kay Kim (Inactive)
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 1 year, 14 weeks, 2 days ago
Epic Link: DOCSP-1769

 Description   

This documentation is incorrect for the server:

https://docs.mongodb.com/manual/reference/method/ObjectId/

The server uses 5 random bytes for the "machine id" + "process id".

https://github.com/mongodb/mongo/blob/v3.4/src/mongo/bson/oid.h#L61-L62
https://github.com/mongodb/mongo/blob/v3.4/src/mongo/bson/oid.cpp#L97-L100



 Comments   
Comment by Education Bot [ 31/Oct/22 ]

Hello! This ticket has been closed due to inactivity. If you believe this ticket is still important, please reopen it and leave a comment to explain why. Thank you!

Comment by Bernie Hackett [ 29/Mar/17 ]

It looks like it might have changed in 3.0:

https://github.com/mongodb/mongo/commit/78c5f9dd5ac65eae251df3e87175a0af076d90d9

Comment by Andy Schwerin [ 29/Mar/17 ]

I don't recall the version where it changed. 2.2? Someone will have to
look, if we care.

I'm not really sure if it matters.

On Wed, Mar 29, 2017, 2:32 PM Bernie Hackett (JIRA) <jira@mongodb.org>

Comment by Githook User [ 29/Mar/17 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: Revert "DOCS-10063 fix objectid construction"

This reverts commit d947af4fc8f0b9f6f9c22640098f8cf417816092.
Branch: master
https://github.com/mongodb/docs/commit/7cae09872c348f04f62a6a7af0a446d54e58b202

Comment by Bernie Hackett [ 29/Mar/17 ]

Oops. kay.kim, the docs were correct for everything other than the server.

Comment by Bernie Hackett [ 29/Mar/17 ]

I guess the ask here is to document the server behavior, while keeping the existing docs which should be correct for all drivers. I'm not sure what server version changed the behavior. schwerin might know.

Comment by Githook User [ 29/Mar/17 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-10063 fix objectid construction
Branch: master
https://github.com/mongodb/docs/commit/d947af4fc8f0b9f6f9c22640098f8cf417816092

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