[CDRIVER-407] getlasterror: 1 passed to 2.6+ mongod as writeConcern Created: 14/Aug/14  Updated: 19/Oct/16  Resolved: 29/Sep/14

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

Type: Bug Priority: Trivial - P5
Reporter: Hannes Magnusson Assignee: Tyler Brock
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The "new Write API" takes a writeConcern document similar to the old GLE command.

This document does however not include the key->value pair "getlasterror: 1".

This is however sent as a writeConcern to 2.6+ servers:

{
    "insert": "collectionname",
    "writeConcern": {
        "getlasterror": 1
    },
    "ordered": true,
    "documents": [
        {
            "_id": {
                "$oid": "53ed19cd0640fd674b00e841"
            },
            "my": "value"
        }
    ]
}



 Comments   
Comment by Githook User [ 29/Sep/14 ]

Author:

{u'username': u'TylerBrock', u'name': u'Tyler Brock', u'email': u'tyler.brock@gmail.com'}

Message: CDRIVER-407 only include GLE in write concern when needed
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/7e2c32ac3ce6f7a42bb7e1a1bf9ae32a934ce059

Comment by Tyler Brock [ 22/Sep/14 ]

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

Comment by Christian Hergert [ 21/Aug/14 ]

This isn't a bug at the moment, but it is less than ideal.

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