[CDRIVER-168] Update "w" description to be clear it includes the primary, so "(total) number of replicas" not "replicated to" Created: 29/Aug/12  Updated: 19/Oct/16  Resolved: 14/Nov/12

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

Type: Bug Priority: Major - P3
Reporter: Scott Hernandez (Inactive) Assignee: Gary Murakami
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible

 Description   

fix it here http://api.mongodb.org/c/current/api/structmongo__write__concern.html

int w
Number of nodes this write should be replicated to.



 Comments   
Comment by Gary Murakami [ 30/Aug/12 ]

I've made the change to the current code base to read:

Number of total replica write copies to complete including the primary.

However, given that BCON (BSON C Object Notation) initializers enable easy construction of BSON, I plan to revisit the C driver implementation of write concern.

My expectation is that write concern will become a bson* write-concern specifier with key-value elements to be added to getlasterror. An empty bson document is simple safe mode. A 0 (null) pointer value specifies the default, e.g., the higher-level connection default or fire-and-forget. This would also permit the full range of tagging which is not supported with the current implementation.

This would eliminate the struct mongo_write_concern, mongo_set_write_concern, mongo_write_concern_init, mongo_write_concern_finish, mongo_write_concern_destroy. The documentation would also be essentially standard, with clarification of C types where necessary.

Any feedback?

Comment by auto [ 30/Aug/12 ]

Author:

{u'date': u'2012-08-29T19:13:04-07:00', u'name': u'Gary Murakami', u'email': u'gary.murakami@10gen.com'}

Message: CDRIVER-168 - Update "w" description to be clear it includes the primary, so "(total) number of replicas" not "replicated to"
Now reads: Number of total replica write copies to complete including the primary.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/aee9ff2778d39a86fcca70e09752ea45d44c1e68

Comment by Graham Hargreaves [ 29/Aug/12 ]

should this be updated in the python docs too?:

http://api.mongodb.org/python/current/api/pymongo/replica_set_connection.html

w: (integer or string) If this is a replica set write operations won’t return until they have been replicated to the specified number or tagged set of servers. Implies safe=True.

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