Skip to content

Commit b8c442d

Browse files
committed
CDRIVER-506 update write concern docs
1 parent 5b203ef commit b8c442d

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

doc/mongoc_write_concern_set_fsync.page

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,9 @@ mongoc_write_concern_set_fsync (mongoc_write_concern_t *write_concern,
3232
<p>Sets if a fsync must be performed before indicating write success.</p>
3333
</section>
3434

35+
<section id="Deprecated">
36+
<title>Deprecated</title>
37+
<note style="warning"><p>The <code>fsync</code> write concern is deprecated.</p></note>
38+
<p>Please use <link xref="mongoc_write_concern_set_journal">mongoc_write_concern_set_journal()</link> instead.</p>
39+
</section>
3540
</page>

doc/mongoc_write_concern_t.page

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
<subtitle>Write Concern abstraction</subtitle>
1313
<section id="description">
1414
<title>Synopsis</title>
15-
<p><code>mongoc_write_concern_t</code> provides an abstraction on top of the MongoDB connection write concern. It allows for hinting to the driver how durable writes should be, both in replication as well as on a per node basis.</p>
16-
<p>You can specify a read preference mode on connection objects, database objects, collection objects, or per-operation.</p>
15+
<p><code>mongoc_write_concern_t</code> tells the driver what level of acknowledgment to await from the server. The default, MONGOC_WRITE_CONCERN_W_DEFAULT, is right for the great majority of applications.</p>
16+
<p>You can specify a write concern on connection objects, database objects, collection objects, or per-operation.</p>
17+
<p>See <link href="http://docs.mongodb.org/manual/core/write-concern/">Write Concern</link> on the MongoDB website for more information.</p>
1718
</section>
1819

1920
<section id="levels">
@@ -22,34 +23,30 @@
2223
<title>Network Related</title>
2324
<tr>
2425
<td><p>MONGOC_WRITE_CONCERN_W_DEFAULT (1)</p></td>
25-
<td><p>With a receipt acknowledged write concern, the mongod confirms the receipt of the write operation. Acknowledged write concern allows clients to catch network, duplicate key, and other errors.</p></td>
26+
<td><p>By default, writes block awaiting acknowledgment from MongoDB. Acknowledged write concern allows clients to catch network, duplicate key, and other errors.</p></td>
2627
</tr>
2728
<tr>
2829
<td><p>MONGOC_WRITE_CONCERN_W_ERRORS_IGNORED (-1)</p></td>
29-
<td><p>With an errors ignored write concern, MongoDB does not acknowledge write operations. With this level of write concern, the client cannot detect failed write operations. These errors include connection errors and mongod exceptions such as duplicate key exceptions for unique indexes. Although the errors ignored write concern provides fast performance, this performance gain comes at the cost of significant risks for data persistence and durability.</p></td>
30+
<td><p>With this write concern, MongoDB does not acknowledge write operations. The client cannot detect failed write operations due to connection errors, or server errors such as duplicate key exceptions for unique indexes. This write concern provides fast performance at the cost of significant risks for data persistence and durability.</p></td>
3031
</tr>
3132
<tr>
3233
<td><p>MONGOC_WRITE_CONCERN_W_UNACKNOWLEDGED (0)</p></td>
33-
<td><p>With an unacknowledged write concern, MongoDB does not acknowledge the receipt of write operation. Unacknowledged is similar to errors ignored; however, mongoc attempts to receive and handle network errors when possible.</p></td>
34+
<td><p>With this write concern, MongoDB does not acknowledge the receipt of write operation. Unacknowledged is similar to errors ignored; however, mongoc attempts to receive and handle network errors when possible.</p></td>
3435
</tr>
3536
<tr>
3637
<td><p>MONGOC_WRITE_CONCERN_W_MAJORITY (majority)</p></td>
37-
<td><p>Require that a write has been propagated to a majority of the nodes in the replica set.</p></td>
38+
<td><p>Block until a write has been propagated to a majority of the nodes in the replica set.</p></td>
3839
</tr>
3940
<tr>
4041
<td><p>n</p></td>
41-
<td><p>Require that a write has been propagated to at least <code>n</code> nodes in the replica set.</p></td>
42+
<td><p>Block until a write has been propagated to at least <code>n</code> nodes in the replica set.</p></td>
4243
</tr>
4344
</table>
4445
<table>
4546
<title>Node Persistence</title>
46-
<tr>
47-
<td><p>fsync</p></td>
48-
<td><p>Force a full <code>fsync()</code> on the node receiving the write.</p></td>
49-
</tr>
5047
<tr>
5148
<td><p>journal</p></td>
52-
<td><p>Force a flush to the journal on the node receiving the write.</p></td>
49+
<td><p>Block until the node receiving the write has committed the journal.</p></td>
5350
</tr>
5451
</table>
5552
</section>

0 commit comments

Comments
 (0)