[CDRIVER-229] write_concern majority is not affected Created: 07/Aug/13  Updated: 11/Nov/13  Resolved: 11/Nov/13

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

Type: Bug Priority: Major - P3
Reporter: H K Baek Assignee: Gary Murakami
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

First, mongo_write_concern_init() set structure to 0 all.
After I set write_concern->mode to "majority", call mongo_insert().

In mongo_insert(), call mongo_choose_write_concern().
In mongo_choose_write_concern()...

...
*write_concern = custom_write_concern;
...
if ( *write_concern && (*write_concern)->w < 1 ) {
write_concern = 0; / do not generate getLastError request */
}

so, write_concern set to NULL.

Check this please.



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

The new C driver[1] supports the majority write concern, in addition to many, many other things.

[1] https://github.com/chergert/libmongoc/

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