@@ -40,122 +40,49 @@ New Aggregation Operators
40
40
General Aggregation Improvements
41
41
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
42
42
43
- Multiple Input Expressions for ``$ifNull`` Expression
44
- `````````````````````````````````````````````````````
43
+ ``$expr`` Operator: Comparison Operators Use Indexes
44
+ ````````````````````````````````````````````````````
45
+
46
+ Starting in MongoDB 5.0, the :expression:`$eq`, :expression:`$lt`,
47
+ :expression:`$lte`, :expression:`$gt`, and :expression:`$gte` operators
48
+ placed in an :query:`$expr` operator can use indexes to improve performance.
49
+
50
+ ``$ifNull`` Expression Accepts Multiple Input Expressions
51
+ `````````````````````````````````````````````````````````
45
52
46
53
Starting in MongoDB 5.0, you can specify multiple input expressions for
47
54
the :expression:`$ifNull` expression before returning a replacement
48
55
expression.
49
56
50
- Comparison Operators and Indexes with ``$expr`` Operator
51
- ````````````````````````````````````````````````````````
52
-
53
- Starting in MongoDB 5.0, the :expression:`$eq`, :expression:`$lt`,
54
- :expression:`$lte`, :expression:`$gt`, and :expression:`$gte` operators
55
- placed in an :query:`$expr` operator can use an index.
56
-
57
- Aggregate ``let`` Option
58
- ````````````````````````
57
+ ``let`` Option for Aggregation
58
+ ``````````````````````````````
59
59
60
60
Starting in MongoDB 5.0, the :dbcommand:`aggregate` command and
61
61
:method:`db.collection.aggregate()` helper method have a ``let`` option
62
62
to specify a list of variables that can be used elsewhere in the
63
63
aggregation pipeline. This allows you to improve command readability by
64
64
separating the variables from the query text.
65
65
66
- Concise Correlated Subqueries in Aggregation Pipeline ``$lookup`` Stage
67
- ```````````````````````````````````````````````````````````````````````
66
+ ``$lookup`` Stage: Concise Correlated Subqueries
67
+ ````````````````````````````````````````````````
68
68
69
69
Starting in MongoDB 5.0, an aggregation pipeline :pipeline:`$lookup`
70
70
stage supports :ref:`concise correlated subqueries
71
71
<lookup-syntax-concise-correlated-subquery>` that improve joins between
72
72
collections.
73
73
74
- .. _5.0-rel-notes-repl-sets:
75
-
76
- Replica Sets
77
- ------------
78
-
79
- Limit Removed for ``members[n]._id`` Values
80
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
81
-
82
- Starting in MongoDB 5.0, the :rsconf:`members[n]._id` field may be any
83
- integer value greater than or equal to ``0``. Previously, this value was
84
- limited to an integer between ``0`` and ``255`` inclusive.
85
-
86
- .. _5.0-rel-notes-sharded-clusters:
87
-
88
- Sharded Clusters
89
- ----------------
90
-
91
- .. _5.0-rel-notes-projection:
92
-
93
- Projection
94
- ----------
95
-
96
- .. _5.0-rel-notes-transactions:
97
-
98
- Transactions
99
- ------------
100
-
101
74
.. _5.0-rel-notes-change-streams:
102
75
103
76
Change Streams
104
77
--------------
105
78
79
+ Change Events Output
80
+ ~~~~~~~~~~~~~~~~~~~~
81
+
106
82
Starting in MongoDB 5.0, :ref:`change-events`
107
83
contain the field ``updateDescription.truncatedArrays`` to record array
108
84
truncations.
109
85
110
- ``coordinateCommitReturnImmediatelyAfterPersistingDecision`` Parameter
111
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
112
-
113
- .. include:: /includes/return-commit-decision-parameter.rst
114
-
115
- .. _5.0-rel-notes-security:
116
-
117
- Security Improvements
118
- ---------------------
119
-
120
- .. _5.0-rel-notes-logging:
121
-
122
- Structured Logging
123
- ------------------
124
-
125
- .. _5.0-rel-notes-platforms:
126
-
127
- Platform Support
128
- ----------------
129
-
130
- Removed Platforms
131
- ~~~~~~~~~~~~~~~~~
132
-
133
- MongoDB 5.0 removes support for the following platforms:
134
-
135
- - **RHEL / CentOS / Oracle 7** on the
136
- :ref:`PPC64LE <prod-notes-supported-platforms-PPC64LE>` and
137
- :ref:`s390x <prod-notes-supported-platforms-s390x>` architectures
138
-
139
- - **SLES 12** on the :ref:`s390x <prod-notes-supported-platforms-s390x>`
140
- architecture
141
-
142
- - **Ubuntu 18.04** on the
143
- :ref:`PPC64LE <prod-notes-supported-platforms-PPC64LE>` and
144
- :ref:`s390x <prod-notes-supported-platforms-s390x>` architectures
145
-
146
- See :ref:`prod-notes-supported-platforms` for the full list of platforms
147
- and architectures supported in MongoDB 5.0.
148
-
149
- .. _5.0-rel-notes-shell:
150
-
151
- Mongo Shell
152
- -----------
153
-
154
- .. _5.0-rel-notes-drivers:
155
-
156
- Drivers
157
- -------
158
-
159
86
.. _5.0-rel-notes-indexes:
160
87
161
88
Indexes
@@ -175,38 +102,94 @@ index build, the index build progress is now
175
102
:ref:`saved to disk<index-operations-build-failure>`. When the server
176
103
restarts, index creation resumes from the saved position.
177
104
105
+ ``reIndex`` Behavior Change
106
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
107
+
108
+ Starting in MongoDB 5.0, the :dbcommand:`reIndex` command and the
109
+ :method:`db.collection.reIndex()` shell method may only be run on
110
+ :term:`standalone` instances.
111
+
112
+ .. _5.0-rel-notes-projection:
113
+
114
+ Projection
115
+ ----------
116
+
178
117
.. _5.0-rel-notes-removed-commands:
179
118
180
119
Removed Commands
181
120
----------------
182
121
183
- .. _5.0-new-parameters :
122
+ .. _5.0-rel-notes-repl-sets :
184
123
185
- New Parameters
186
- --------------
124
+ Replica Sets
125
+ ------------
187
126
188
- Starting in MongoDB 5.0, you can use the
189
- :parameter:`minSnapshotHistoryWindowInSeconds` parameter to control how
190
- long WiredTiger keeps the snapshot history.
127
+ Limit Removed for ``members[n]._id`` Values
128
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
129
+
130
+ Starting in MongoDB 5.0, the :rsconf:`members[n]._id` field may be any
131
+ integer value greater than or equal to ``0``. Previously, this value was
132
+ limited to an integer between ``0`` and ``255`` inclusive.
133
+
134
+ .. _5.0-rel-notes-sharded-clusters:
135
+
136
+ Sharded Clusters
137
+ ----------------
138
+
139
+ ``currentOp`` Reports Ongoing Resharding Operations
140
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
141
+
142
+ Starting in MongoDB 5.0, the :pipeline:`$currentOp` aggregation stage
143
+ (and the :dbcommand:`currentOp` command and :method:`db.currentOp()`
144
+ shell method) include additional information about the status of ongoing
145
+ resharding operations for the resharding coordinator and the
146
+ donor and recipient shards.
147
+
148
+ .. _5.0-rel-notes-security:
149
+
150
+ Security
151
+ --------
191
152
192
153
MongoDB 5.0 introduces the :parameter:`opensslCipherSuiteConfig`
193
154
parameter to enable configuration of the supported cipher suites OpenSSL
194
155
should permit when using TLS 1.3 encryption.
195
156
196
- .. _5.0-rel-notes-networking:
197
-
198
- Networking
199
- ----------
200
-
201
157
.. _5.0-snapshot-reads:
202
158
203
- Snapshot Reads
204
- --------------
159
+ Snapshots
160
+ ---------
161
+
162
+ Extended Support for Read Concern ``"snapshot"``
163
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
205
164
206
165
Starting in MongoDB 5.0, read concern :readconcern:`"snapshot"` is
207
166
supported for some read operations outside of multi-document
208
167
transactions on primaries and secondaries.
209
168
169
+ ``minSnapshotHistoryWindowInSeconds`` Server Parameter
170
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
171
+
172
+ Starting in MongoDB 5.0, you can use the
173
+ :parameter:`minSnapshotHistoryWindowInSeconds` parameter to control how
174
+ long WiredTiger keeps the snapshot history.
175
+
176
+ .. _5.0-rel-notes-logging:
177
+
178
+ Structured Logging
179
+ ------------------
180
+
181
+ .. _5.0-rel-notes-platforms:
182
+
183
+ .. _5.0-rel-notes-transactions:
184
+
185
+ Transactions
186
+ ------------
187
+
188
+ ``coordinateCommitReturnImmediatelyAfterPersistingDecision`` Parameter
189
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
190
+
191
+ .. include:: /includes/return-commit-decision-parameter.rst
192
+
210
193
.. _5.0-rel-notes-general:
211
194
212
195
General Improvements
@@ -232,13 +215,6 @@ Lock-Free Read Operations
232
215
233
216
.. include:: /includes/lock-free-commands.rst
234
217
235
- ``reIndex`` Behavior Change
236
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
237
-
238
- Starting in MongoDB 5.0, the :dbcommand:`reIndex` command and the
239
- :method:`db.collection.reIndex()` shell method may only be run on
240
- :term:`standalone` instances.
241
-
242
218
Schema Validation Failures Explained
243
219
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
244
220
@@ -301,12 +277,45 @@ Log Changes to Database Profiler Settings
301
277
302
278
.. include:: /includes/log-changes-to-database-profiler.rst
303
279
280
+ Define Variables Using the ``let`` Option
281
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
282
+
283
+ Starting in MongoDB 5.0, the following commands have a ``let`` option to
284
+ define a list of variables. This allows you to improve command
285
+ readability by separating the variables from the query text.
286
+
287
+ - :dbcommand:`find` command
288
+
289
+ - :dbcommand:`findAndModify` command and corresponding
290
+ :method:`db.collection.findAndModify()` shell helper
291
+
292
+ - :dbcommand:`update` command and corresponding
293
+ :method:`db.collection.update()` shell helper
294
+
295
+ - :dbcommand:`delete` command
296
+
297
+ - :method:`db.collection.remove()` shell helper
298
+
299
+ The :dbcommand:`update` command also has a ``c`` field to define a list
300
+ of variables.
301
+
302
+ Additional ``dbStats`` Free Space Statistics
303
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
304
+
305
+ Starting in MongoDB 5.0, the :dbcommand:`dbStats` command outputs these
306
+ additional statistics:
307
+
308
+ - Free space allocated to collections (:data:`~dbStats.freeStorageSize`)
309
+
310
+ - Free space allocated to indexes
311
+ (:data:`~dbStats.indexFreeStorageSize`)
312
+
313
+ - Total free space allocated to collections and indexes
314
+ (:data:`~dbStats.totalFreeStorageSize`)
315
+
304
316
``serverStatus`` Output Change
305
317
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
306
318
307
- New Fields
308
- ``````````
309
-
310
319
:dbcommand:`serverStatus` includes the following new fields in its
311
320
output:
312
321
@@ -364,50 +373,46 @@ output:
364
373
| :serverstatus:`metrics.cursor.totalOpened`, which reports
365
374
the total number of cursors that have been opened
366
375
367
- ``currentOp`` Output Change
368
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
369
-
370
- Starting in MongoDB 5.0, the :pipeline:`$currentOp` aggregation stage
371
- (and the :dbcommand:`currentOp` command and :method:`db.currentOp()`
372
- shell method) include additional information about the status of ongoing
373
- resharding operations for the resharding coordinator and the
374
- donor and recipient shards.
376
+ .. _5.0-rel-notes-shell:
375
377
376
- Additional ``dbStats`` Free Space Statistics
377
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
378
+ Mongo Shell
379
+ -----------
378
380
379
- Starting in MongoDB 5.0, the :dbcommand:`dbStats` command outputs these
380
- additional statistics:
381
+ .. _5.0-rel-notes-drivers:
381
382
382
- - Free space allocated to collections (:data:`~dbStats.freeStorageSize`)
383
+ Drivers
384
+ -------
383
385
384
- - Free space allocated to indexes
385
- (:data:`~dbStats.indexFreeStorageSize`)
386
+ .. _5.0-rel-notes-platforms:
386
387
387
- - Total free space allocated to collections and indexes
388
- (:data:`~dbStats.totalFreeStorageSize`)
388
+ Platform Support
389
+ ----------------
389
390
390
- Define Variables Using the ``let`` Option
391
- `````````````````````````````````````````
391
+ Removed Platforms
392
+ ~~~~~~~~~~~~~~~~~
392
393
393
- Starting in MongoDB 5.0, the following commands have a ``let`` option to
394
- define a list of variables. This allows you to improve command
395
- readability by separating the variables from the query text.
394
+ MongoDB 5.0 removes support for the following platforms:
396
395
397
- - :dbcommand:`find` command
396
+ - **RHEL / CentOS / Oracle 7** on the
397
+ :ref:`PPC64LE <prod-notes-supported-platforms-PPC64LE>` and
398
+ :ref:`s390x <prod-notes-supported-platforms-s390x>` architectures
398
399
399
- - :dbcommand:`findAndModify` command and corresponding
400
- :method:`db.collection.findAndModify()` shell helper
400
+ - **SLES 12** on the :ref:`s390x <prod-notes-supported-platforms-s390x>`
401
+ architecture
401
402
402
- - :dbcommand:`update` command and corresponding
403
- :method:`db.collection.update()` shell helper
403
+ - **Ubuntu 18.04** on the
404
+ :ref:`PPC64LE <prod-notes-supported-platforms-PPC64LE>` and
405
+ :ref:`s390x <prod-notes-supported-platforms-s390x>` architectures
404
406
405
- - :dbcommand:`delete` command
407
+ See :ref:`prod-notes-supported-platforms` for the full list of platforms
408
+ and architectures supported in MongoDB 5.0.
406
409
407
- - :method:`db.collection.remove()` shell helper
410
+ Changes Affecting Compatibility
411
+ -------------------------------
408
412
409
- The :dbcommand:`update` command also has a ``c`` field to define a list
410
- of variables.
413
+ Some changes can affect compatibility and may require user actions. For
414
+ a detailed list of compatibility changes, see
415
+ :doc:`/release-notes/5.0-compatibility`.
411
416
412
417
.. _5.0-upgrade:
413
418
0 commit comments