1MongoDB::WriteConcern(3U)ser Contributed Perl DocumentatiMoonngoDB::WriteConcern(3)
2
3
4
6 MongoDB::WriteConcern - Encapsulate and validate a write concern
7
9 version v2.2.2
10
12 $rp = MongoDB::WriteConcern->new(); # w:1, wtimeout: 1000
13
14 $rp = MongoDB::WriteConcern->new(
15 w => 'majority',
16 wtimeout => 10000, # milliseconds
17 );
18
20 A write concern describes the guarantee that MongoDB provides when
21 reporting on the success of a write operation.
22
23 For core documentation on read preference see
24 <http://docs.mongodb.org/manual/core/read-preference/>.
25
27 w
28 Specifies the desired acknowledgement level. If not set, the server
29 default will be used, which is usually "1".
30
31 wtimeout
32 Specifies how long to wait for the write concern to be satisfied (in
33 milliseconds). Defaults to 1000. If you set this to undef, it could
34 block indefinitely (or until socket timeout is reached).
35
36 j
37 The j option confirms that the mongod instance has written the data to
38 the on-disk journal. Defaults to false.
39
40 Note: specifying a write concern that set j to a true value may result
41 in an error with a mongod or mongos running with --nojournal option now
42 errors.
43
45 • David Golden <david@mongodb.com>
46
47 • Rassi <rassi@mongodb.com>
48
49 • Mike Friedman <friedo@friedo.com>
50
51 • Kristina Chodorow <k.chodorow@gmail.com>
52
53 • Florian Ragwitz <rafl@debian.org>
54
56 This software is Copyright (c) 2020 by MongoDB, Inc.
57
58 This is free software, licensed under:
59
60 The Apache License, Version 2.0, January 2004
61
62
63
64perl v5.36.0 2023-01-20 MongoDB::WriteConcern(3)