-
Type:
Improvement
-
Resolution: Done
-
Priority:
Minor - P4
-
Affects Version/s: None
-
Component/s: Internal Client
-
None
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
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.