Skip to content

Commit e3878bb

Browse files
v6.0 Compatibility changes refactor (#952)
* add links to rapid release notes * re-add rapid release note sub-pages * add more context to intro * wording * v6.0 Compatibility changes * reordering
1 parent 7742c87 commit e3878bb

File tree

6 files changed

+279
-26
lines changed

6 files changed

+279
-26
lines changed

snooty.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ bi = "MongoDB Connector for BI"
199199
compass = "MongoDB Compass"
200200
copy = "©"
201201
ent-build = "MongoDB Enterprise"
202+
lts = "Major"
202203
mdb-shell = "MongoDB Shell"
203204
sbe = "slot-based query execution engine"
204205
sbe-short = "slot-based engine"

source/reference/versioning.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
MongoDB Versioning
55
==================
66

7-
.. |lts| replace:: Major
8-
97
.. contents:: On this page
108
:local:
119
:backlinks: none
@@ -28,6 +26,8 @@ series:
2826
For MongoDB 4.4 and previous, MongoDB used a Production / Development
2927
versioning system. See :ref:`historical-releases`.
3028

29+
.. _major-releases:
30+
3131
|lts| Releases
3232
--------------
3333

source/release-notes.txt

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Upcoming Stable Release
1414

1515
(*6.0-series*)
1616

17-
:doc:`/release-notes/6.0`
17+
:ref:`release-notes-6.0`
1818

1919
.. include:: /includes/in-dev.rst
2020

@@ -24,19 +24,12 @@ Upcoming Stable Release
2424

2525
/release-notes/6.0
2626

27-
Previous Rapid Releases
28-
~~~~~~~~~~~~~~~~~~~~~~~
29-
30-
.. important::
31-
32-
Rapid releases are only supported for MongoDB Atlas. Rapid releases
33-
are not supported for use on-premises. For more information, see
34-
:ref:`release-version-numbers`.
35-
27+
Previous Atlas Rapid Releases
28+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3629

37-
- :doc:`/release-notes/5.3`
38-
- :doc:`/release-notes/5.2`
39-
- :doc:`/release-notes/5.1`
30+
- :ref:`release-notes-5.3`
31+
- :ref:`release-notes-5.2`
32+
- :ref:`release-notes-5.1`
4033

4134
.. toctree::
4235
:maxdepth: 1

source/release-notes/5.1-compatibility.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,3 @@ Community Edition
197197
~~~~~~~~~~~~~~~~~
198198

199199
- :abbr:`RHEL (Red Hat Enterprise Linux)`-72-s390x
200-
201-
.. _5.1-compatibility-enabled:
202-
203-
5.1 Feature Compatibility
204-
-------------------------
205-
206-
Some features in 5.1 require the 5.1 binaries and the
207-
:ref:`featureCompatibilityVersion <view-fcv>` (fCV) must also be set to
208-
5.1. These features include:

source/release-notes/6.0-compatibility.txt

Lines changed: 253 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,175 @@ Compatibility Changes in MongoDB 6.0 (Release Candidate)
1212

1313
.. include:: /includes/in-dev.rst
1414

15-
The following 6.0 changes can affect compatibility with older
16-
versions of MongoDB.
15+
This page describes changes introduced in MongoDB 6.0 that can affect
16+
compatibility with older versions of MongoDB.
17+
18+
MongoDB 6.0 is a |lts| Release, which means that it is supported for
19+
both MongoDB Atlas and on-premises deployments. MongoDB 6.0 encompasses
20+
changes introduced in MongoDB Rapid Releases 5.1, 5.2, and 5.3. This
21+
page describes compatibility changes introduced in those Rapid Releases
22+
and MongoDB 6.0.
23+
24+
To learn more about the differences between |lts| and Rapid releases,
25+
see :ref:`release-version-numbers`.
26+
27+
Aggregation
28+
-----------
29+
30+
``$setWindowFields`` Transactions and Snapshot Read Concern
31+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32+
33+
.. include:: /includes/fact-5.1-setWindowFields-snapshot-restriction.rst
34+
35+
36+
Change Streams
37+
--------------
38+
39+
.. include:: /includes/change-streams-and-orphans.rst
40+
41+
Indexes
42+
-------
43+
44+
Existing Indexes Can Be Dropped During an Index Build
45+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46+
47+
Starting in MongoDB 5.2, you can use :dbcommand:`dropIndexes` or
48+
:method:`db.collection.dropIndexes()` to drop existing indexes on the
49+
same collection even if there is an index build in progress. In earlier
50+
versions, attempting to drop a different index during an in-progress
51+
index build results in a ``BackgroundOperationInProgressForNamespace``
52+
error.
53+
54+
2dsphere Document Index Keys
55+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56+
57+
To prevent out of memory errors,
58+
:parameter:`indexMaxNumGeneratedKeysPerDocument` limits the maximum
59+
number of :ref:`2dsphere index keys <geo-2dsphere>` generated for a
60+
single document.
61+
62+
See :parameter:`indexMaxNumGeneratedKeysPerDocument`.
63+
64+
Platform Support
65+
----------------
66+
67+
Starting in MongoDB 5.1.2 the following platforms are no longer
68+
supported:
69+
70+
Community Edition
71+
~~~~~~~~~~~~~~~~~
72+
73+
- :abbr:`RHEL (Red Hat Enterprise Linux)`-72-s390x
74+
75+
Removed Operators
76+
-----------------
77+
78+
Starting in MongoDB 5.1, these operators are removed:
79+
80+
.. list-table::
81+
:header-rows: 1
82+
83+
* - Removed Operator
84+
- Alternative
85+
* - $comment
86+
- :method:`cursor.comment()`
87+
* - $explain
88+
- :method:`cursor.explain()`
89+
* - $hint
90+
- :method:`cursor.hint()`
91+
* - $max
92+
- :method:`cursor.max()`
93+
* - $maxTimeMS
94+
- :method:`cursor.maxTimeMS()`
95+
* - $min
96+
- :method:`cursor.min()`
97+
* - $orderby
98+
- :method:`cursor.sort()`
99+
* - $query
100+
- See :ref:`doc-cursor-methods`
101+
* - $returnKey
102+
- :method:`cursor.returnKey()`
103+
* - $showDiskLoc
104+
- :method:`cursor.showRecordId()`
105+
* - ``db.getLastError()``
106+
- See :ref:`legacy-op-codes-removed`
107+
* - ``db.getLastErrorObj()``
108+
- See :ref:`legacy-op-codes-removed`
109+
* - ``getLastError``
110+
- See :ref:`legacy-op-codes-removed`
111+
112+
Removed Options
113+
---------------
114+
115+
MongoDB 6.0 removes the ``--cpu`` :binary:`~bin.mongod` option.
116+
117+
Removed Parameters
118+
------------------
119+
120+
MongoDB 6.0 removes the following server parameters:
121+
122+
.. list-table::
123+
:header-rows: 1
124+
:widths: 25 75
125+
126+
* - Removed Parameter
127+
- Description
128+
129+
* - :option:`--tlsFIPSMode <mongod --tlsFIPSMode>`
130+
- This option is removed from the MongoDB Community Edition. It
131+
is available in MongoDB Enterprise edition.
132+
133+
FIPS was not a supported feature in MongoDB Community Edition.
134+
If your installation made use of FIPS anyway, you will need to
135+
:doc:`reconfigure your TLS/SSL connections </tutorial/configure-ssl>`
136+
before upgrading.
137+
138+
Replica Sets
139+
------------
140+
141+
Assert Cluster Wide Write Concern is Set When Starting or Adding Shard
142+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
143+
144+
.. include:: /includes/fact-5.1-fassert-shard-restart-add-CWWC.rst
145+
146+
``rs.reconfig`` Cluster Wide Write Concern Validation
147+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
148+
149+
.. include:: /includes/fact-5.1-reconfig-CWWC-validation.rst
150+
151+
Arbiters
152+
~~~~~~~~
153+
154+
.. include:: /includes/5.1/fact-do-not-use-with-quarterlies.rst
155+
156+
Security
157+
--------
158+
159+
Intra-Cluster Authentication
160+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
161+
162+
.. include:: /includes/intra-cluster-authentication.rst
163+
164+
FIPS Mode Defaults SCRAM-SHA-1 Authentication to Off
165+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
166+
167+
.. include:: /includes/fact-5.1-scram-sha-1-fips-default.rst
17168

18169
Time Series Collections
19170
-----------------------
20171

172+
.. warning::
173+
174+
If you create a sharded :ref:`time series collection
175+
<manual-timeseries-collection>` in MongoDB 5.1 or greater, downgrading
176+
to a version older than MongoDB 5.0.4 will result in data loss.
177+
178+
Before downgrading to a version older than 5.0.4, drop all sharded
179+
time series collections.
180+
181+
Secondary Indexes on Time Series Collections
182+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
183+
21184
.. include:: /includes/time-series-secondary-indexes-downgrade-FCV.rst
22185

23186
General Changes
@@ -42,3 +205,91 @@ Deprecations
42205
* - :dbcommand:`reIndex`
43206

44207
- The :dbcommand:`reIndex` command is deprecated in MongoDB v6.0.
208+
209+
``$regex`` Find Queries No Longer Ignore Invalid Regex
210+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
211+
212+
.. include:: /includes/fact-5.1-regex-find-functionality.rst
213+
214+
``$regex`` Schema Validation Error Behavior
215+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
216+
217+
.. include:: /includes/fact-5.1-regex-document-schema-validation.rst
218+
219+
``$mod`` Error Behavior
220+
~~~~~~~~~~~~~~~~~~~~~~~
221+
222+
Starting in MongoDB 5.1 (and 5.0.4 and 4.4.10), the :query:`$mod`
223+
operator returns an error if the ``divisor`` or ``remainder`` values
224+
evaluate to certain values. See :ref:`$mod behavior <mod-behavior>`.
225+
226+
.. _legacy-op-codes-removed:
227+
228+
Legacy Opcodes Removed
229+
~~~~~~~~~~~~~~~~~~~~~~
230+
231+
MongoDB drivers have used :ref:`OP_MSG <wire-op-msg>` instead of
232+
:ref:`OP_QUERY <wire-op-query>` and the other legacy opcodes since
233+
MongoDB v3.6.
234+
235+
This release removes support for the following legacy opcodes:
236+
237+
- :ref:`OP_INSERT <wire-op-insert>`
238+
- :ref:`OP_DELETE <wire-op-delete>`
239+
- :ref:`OP_UPDATE <wire-op-update>`
240+
- :ref:`OP_KILL_CURSORS <wire-op-kill-cursors>`
241+
- :ref:`OP_GET_MORE <wire-op-get-more>`
242+
- :ref:`OP_QUERY <wire-op-query>`
243+
244+
To avoid disruption due to the removal of these op codes, please
245+
upgrade your driver to the latest version.
246+
247+
:binary:`mongod` will close the connection and will not respond to:
248+
249+
- :ref:`OP_INSERT <wire-op-insert>`
250+
- :ref:`OP_DELETE <wire-op-delete>`
251+
- :ref:`OP_UPDATE <wire-op-update>`
252+
- :ref:`OP_KILL_CURSORS <wire-op-kill-cursors>`
253+
254+
:binary:`mongod` will return an error for:
255+
256+
- :ref:`OP_GET_MORE <wire-op-get-more>`
257+
- :ref:`OP_QUERY <wire-op-query>` legacy find
258+
259+
The :ref:`OP_QUERY <wire-op-query>` RPC protocol may be used with the
260+
following commands:
261+
262+
- ``_isSelf``
263+
- ``authenticate``
264+
- ``buildinfo``
265+
- ``buildInfo``
266+
- ``hello``
267+
- ``ismaster``
268+
- ``isMaster``
269+
- ``saslContinue``
270+
- ``saslStart``
271+
272+
:ref:`OP_QUERY <wire-op-query>` will return an error if it is used for
273+
a find operation. All other commands will be rejected if issued as
274+
:ref:`OP_QUERY <wire-op-query>`.
275+
276+
If you attempt to connect to a MongoDB 3.4, or older, :binary:`mongod`
277+
instance with a MongoDB 5.1 or newer :binary:`~bin.mongo` shell, you
278+
will receive an error message like the following:
279+
280+
.. code-block:: javascript
281+
:copyable: false
282+
283+
// Reformated for clarity. The message appears on a single line.
284+
285+
Connection handshake failed. Is your mongod 3.4 or older?
286+
:: caused by :: network error while attempting to run command
287+
'isMaster' on host '127.0.0.1:27017'
288+
289+
Default ``db.stats()`` Settings
290+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
291+
292+
Starting in MongoDB 6.0, the :dbcommand:`dbStats` command and the
293+
:method:`db.stats()` method only report free space assigned to
294+
collections if the :ref:`freeStorage <dbStats-freeStorage>` parameter is
295+
set to 1.

source/release-notes/6.0.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _release-notes-6.0:
2+
13
=================================================
24
Release Notes for MongoDB 6.0 (Release Candidate)
35
=================================================
@@ -12,6 +14,21 @@ Release Notes for MongoDB 6.0 (Release Candidate)
1214

1315
.. include:: /includes/in-dev.rst
1416

17+
This page reflects the differences between MongoDB 5.3 and MongoDB 6.0.
18+
MongoDB 6.0 is a |lts| Release, which means that it is supported for
19+
both MongoDB Atlas and on-premises deployments.
20+
21+
If you are upgrading from MongoDB 5.0 to 6.0, you will also see changes
22+
that were introduced in MongoDB Rapid Releases 5.1, 5.2, and 5.3. To see
23+
the changes introduced in these releases, see the following pages:
24+
25+
- :ref:`release-notes-5.1`
26+
- :ref:`release-notes-5.2`
27+
- :ref:`release-notes-5.3`
28+
29+
To learn more about the differences between |lts| and Rapid releases,
30+
see :ref:`release-version-numbers`.
31+
1532
.. _6.0-rel-notes-general:
1633

1734
General Improvements

0 commit comments

Comments
 (0)