[CXX-926] Support sending writeConcern for commands that write Created: 10/Jun/16  Updated: 28/Feb/18  Resolved: 19/Oct/16

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

Type: New Feature Priority: Major - P3
Reporter: Rathi Gnanasekaran Assignee: Backlog - CXX Driver Team
Resolution: Won't Fix Votes: 0
Labels: legacy-cxx
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: Legacy C++ Driver MongoDB 3.4 Support

 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 David Golden [ 19/Oct/16 ]

We don't plan to allocate resources to this work for the legacy C++ driver. Closing as "won't fix".

Generated at Wed Feb 07 22:00:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.