[CSHARP-1688] Support sending writeConcern for commands that write Created: 10/Jun/16  Updated: 19/Oct/16  Resolved: 29/Sep/16

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

Type: New Feature Priority: Major - P3
Reporter: Rathi Gnanasekaran Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by DRIVERS-290 Support sending writeConcern for comm... Closed
Epic Link: MongoDB 3.4

 Description   

When talking with server 3.4 or greater (maxWireVersion >=5), writeConcern should be a supported option for commands that write.
Helpers for the following commands therefore must be updated to support the option. The list is ordered according to likelihood that a driver has a helper for the command.

  • aggregate with $out
  • copydb
  • create
  • createIndexes
  • drop
  • dropDatabase
  • dropIndexes
  • mapReduce with $out
  • clone
  • cloneCollection
  • cloneCollectionAsCapped
  • collMod
  • convertToCapped
  • emptyCapped
  • renameCollection
  • appendoplognote
  • godInsert
  • capTrunc
  • reindex
    * mergechunk


Note:

When the writeConcern on a command that writes fails, the resulting document still comes back with ok: 1. Hence, to check for write concern and raise the appropriate error to your users, you will need to check the resulting document for a writeConcernError field. If it is present, then writeConcern failed.



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

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}

Message: CSHARP-1688: Remove WriteConcern from CreateIndexesUsingInsertOperation.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/e7a7e39da5f46b4eca28bea8986c658e72eccf7b

Comment by Githook User [ 29/Sep/16 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}

Message: CSHARP-1688: Handle writeConcernError in responses from server.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/1be980a8ac0f6d5f7b50007858aa749131421c48

Comment by Githook User [ 29/Sep/16 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}

Message: CSHARP-1688: Support sending WriteConcern for commands that write.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/13e6165b844cec25a70c4fcff8f3e2e1183c679e

Comment by Githook User [ 29/Sep/16 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}

Message: CSHARP-1688: Remove WriteConcern from CreateIndexesUsingInsertOperation.
Branch: v2.4.x
https://github.com/mongodb/mongo-csharp-driver/commit/e7a7e39da5f46b4eca28bea8986c658e72eccf7b

Comment by Githook User [ 29/Sep/16 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}

Message: CSHARP-1688: Handle writeConcernError in responses from server.
Branch: v2.4.x
https://github.com/mongodb/mongo-csharp-driver/commit/1be980a8ac0f6d5f7b50007858aa749131421c48

Comment by Githook User [ 29/Sep/16 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}

Message: CSHARP-1688: Support sending WriteConcern for commands that write.
Branch: v2.4.x
https://github.com/mongodb/mongo-csharp-driver/commit/13e6165b844cec25a70c4fcff8f3e2e1183c679e

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