[CDRIVER-648] nInserted incremented despite error Created: 14/May/15  Updated: 03/May/17  Resolved: 19/Jun/15

Status: Closed
Project: C Driver
Component/s: Bulk API, libmongoc
Affects Version/s: 0.94.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Starting at this commit:

https://github.com/mongodb/mongo-c-driver/commit/48a859952204acd3ad9d057e2b36ecd01218c529#diff-37eb77aadf1acdb5086324d8a2056e7eR308

the nInserted number reported for a batch OP_INSERT is incremented, even for documents the server rejects. Observed in mongoc_bulk_operation_insert, may be the same for all insert APIs.



 Comments   
Comment by Githook User [ 19/Jun/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-648 nInserted incremented despite error

Starting at commit 48a85995 the nInserted number reported for a batch OP_INSERT
was incremented, even for documents the server rejects.
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/952d8031ac05f8019128efb556d5b41e844b9153

Comment by Githook User [ 16/Jun/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: refactor write commands

Send insert, update, and delete commands with the same function.

CDRIVER-648, CDRIVER-654, and CDRIVER-656 are resolved in this commit
or recent commits.
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/45cb98a160e17cbec4bb7a5a31a46722a87641e6

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