-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
drivers-write-concern.txt
78 lines (57 loc) · 2.34 KB
/
drivers-write-concern.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
:orphan:
.. _driver-write-concern-change:
============================
Default Write Concern Change
============================
.. default-domain:: mongodb
.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol
These release notes outline a change to all driver interfaces released
in November 2012. See release notes for specific drivers for
additional information.
.. _write-concern-change-notes:
Changes
-------
As of the releases listed below, there are two major changes to all
drivers:
#. All drivers will add a new top-level connection class that will
increase consistency for all MongoDB client interfaces.
This change is non-backward breaking: existing connection classes
will remain in all drivers for a time, and will continue to operate
as expected. However, those previous connection classes are now
deprecated as of these releases, and will eventually be removed
from the driver interfaces.
The new top-level connection class is named ``MongoClient``, or
similar depending on how host languages handle namespacing.
#. The default write concern on the new ``MongoClient`` class will be
to acknowledge all write operations [#without-arguments]_. This
will allow your application to receive acknowledgment of all write
operations.
See the documentation of :ref:`Write Concern <write-concern>` for
more information about write concern in MongoDB.
Please migrate to the new ``MongoClient`` class expeditiously.
.. [#without-arguments] The drivers will call ``getLastError`` without
arguments, which is logically equivalent to the ``w: 1`` option.
However, this operation allows :term:`replica set` users to override
the default write concern with the
:rsconf:`settings.getLastErrorDefaults` setting in the
:doc:`/reference/replica-configuration`.
``getLastError`` is removed starting in MongoDB 5.1. See
:ref:`wc-specs` for alternatives.
.. _write-concern-change-releases:
Releases
--------
The following driver releases will include the changes outlined in
:ref:`write-concern-change-notes`. See each driver's release notes for
a full account of each release as well as other related
driver-specific changes.
- C#, version 1.7
- Java, version 2.10.0
- Node.js, version 1.2
- Perl, version 0.501.1
- Legacy PHP, version 1.4
- Python, version 2.4
- Ruby, version 1.8