1MONGOC_WRITE_CONCERN_SET_WMAJORIMToYn(g3o)DB C DMrOiNvGeOrC_WRITE_CONCERN_SET_WMAJORITY(3)
2
3
4
6 mongoc_write_concern_set_wmajority - mongoc_write_concern_set_wmajor‐
7 ity()
8
10 void
11 mongoc_write_concern_set_wmajority (mongoc_write_concern_t *write_concern,
12 int32_t wtimeout_msec);
13
15 · write_concern: A mongoc_write_concern_t.
16
17 · wtimeout_msec: A positive int32_t or zero.
18
20 Sets if the write must have been propagated to a majority of nodes
21 before indicating write success.
22
23 The timeout specifies how long, in milliseconds, the server should wait
24 before indicating that the write has failed. This is not the same as a
25 socket timeout. A value of zero may be used to indicate no timeout.
26
27 Beginning in version 1.9.0, this function can now alter the write con‐
28 cern after it has been used in an operation. Previously, using the
29 struct with an operation would mark it as "frozen" and calling this
30 function would log a warning instead instead of altering the write con‐
31 cern.
32
34 MongoDB, Inc
35
37 2017-present, MongoDB, Inc
38
39
40
41
421.14.0 Feb 22, 2M0O1N9GOC_WRITE_CONCERN_SET_WMAJORITY(3)