[SERVER-2412] improve object id generation in c++ driver for OS X Created: 26/Jan/11  Updated: 12/Jul/16  Resolved: 23/Sep/11

Status: Closed
Project: Core Server
Component/s: Internal Client
Affects Version/s: None
Fix Version/s: 2.1.0

Type: Improvement Priority: Minor - P4
Reporter: Dwight Merriman Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

see comment on http://www.mongodb.org/pages/viewpage.action?pageId=133409#comment-134885855 :

Looks like C++ driver for neither mongodb 1.6 nor 1.7 use pid to generate new OIDs under MacOS X, it creates problems for multi-process programs. As a simple workaround I suggest calling srandomdev() right after forking and before calling mongo::OID::newState() or mongo::OID::justForked()

before closing, please also investigate srandomdev() or alternatives on init of mongod and mongos so that getNonce is as good as possible.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 23/Sep/11 ]

this was actually done before

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