[CDRIVER-176] data loss while writing concurrently Created: 31/Oct/12  Updated: 21/Nov/13  Resolved: 21/Nov/13

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: 0.6
Fix Version/s: 0.90.0

Type: Bug Priority: Blocker - P1
Reporter: shun.zhang Assignee: Christian Hergert
Resolution: Done Votes: 1
Labels: cdriver,, gridfs
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

#uname -a
Linux shun.zhang-centos6-x64 2.6.32-71.29.1.el6.x86_64 #1 SMP Mon Jun 27 19:49:27 BST 2011 x86_64 x86_64 x86_64 GNU/Linux

#lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS Linux release 6.0 (Final)
Release: 6.0
Codename: Final



 Description   

this is my testcase - https://gist.github.com/3987628

while one process, it works all right
while two process, it will lose half the data



 Comments   
Comment by Christian Hergert [ 21/Nov/13 ]

This is fixed in the new C driver, which will be released very soon. The new C driver uses libbson[1], which does not suffer from this deficiency.

If you would like to try the new C driver ahead of the release, you can check out my tree here[2].

[1] https://github.com/mongodb/libbson
[2] https://github.com/chergert/libmongoc

Comment by bishwa shrestha [ 27/Feb/13 ]

we are also using mongodb-c-driver v0.6. would be nice to have this fix in.

Thanks

Comment by shun.zhang [ 01/Nov/12 ]

here is pull request

https://github.com/mongodb/mongo-c-driver/pull/55/files

Comment by shun.zhang [ 01/Nov/12 ]

I found the reason, that's an ugly implemtation of "ObjectId generator" which does not match the specification http://www.mongodb.org/display/DOCS/ObjectId

I'll commit a patch to fix the bug.

Comment by shun.zhang [ 01/Nov/12 ]

mongo-python-driver works well, https://gist.github.com/3992535

Generated at Wed Feb 07 21:08:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.