/
3.2.txt
1402 lines (934 loc) · 43.7 KB
/
3.2.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
=============================
Release Notes for MongoDB 3.2
=============================
.. default-domain:: mongodb
.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: twocols
*Dec 8, 2015*
MongoDB 3.2 is now available. Key features include WiredTiger as the
default storage engine, replication election enhancements, config
servers as replica sets, ``readConcern``, and document validations.
OpsManager 2.0 is also available. See the `Ops Manager documentation
<http://docs.opsmanager.mongodb.com/current/>`_ and the `Ops Manager
release notes
<http://docs.opsmanager.mongodb.com/current/release-notes/application/>`_
for more information.
Patch Releases
--------------
.. class:: hidden
.. toctree::
/release-notes/3.2-changelog
.. _3.2.22-release-notes:
3.2.22 - Dec 28, 2018
~~~~~~~~~~~~~~~~~~~~~
- :issue:`SERVER-38425` Oplog Visibility Query is a collection scan in 3.2.21
- :ref:`3.2.22-changelog`
- `All JIRA issues closed in 3.2.22
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.2.22%27>`_
.. _3.2.21-release-notes:
3.2.21 - Sep 7, 2018
~~~~~~~~~~~~~~~~~~~~
- :issue:`SERVER-32999`: Platform Support: remove Debian 7.
- :issue:`SERVER-36010` Change log messages for Windows stacktraces to use error() or severe() rather than log().
- :issue:`SERVER-30724` Initial sync might miss ops that were in flight when it started.
- :ref:`3.2.21-changelog`
- `All JIRA issues closed in 3.2.21
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.2.21%27>`_
.. _3.2.20-release-notes:
3.2.20 - May 10, 2018
~~~~~~~~~~~~~~~~~~~~~
- :issue:`SERVER-32241`: applyOps reports success even when a nested
applyOps fails.
- :issue:`SERVER-32923`: Platform Support: remove SLES11 builds.
- :issue:`SERVER-31535`: Platform Support: remove Ubuntu 12.04 builds.
- :ref:`3.2.20-changelog`
- `All JIRA issues closed in 3.2.20
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.2.20%27>`_
.. _3.2.19-release-notes:
3.2.19 - Feb 6, 2018
~~~~~~~~~~~~~~~~~~~~
- :issue:`SERVER-30189`: Reduce calls to allocator for large $in expressions
- :issue:`SERVER-30853`: Update Mongod init scripts to set unlimited locked memory
- :issue:`SERVER-32001`: Unindexing a key in a partial unique index may cause server crash
- :issue:`SERVER-32048`: Updates using a numeric path component may cause index entries not to be created
- :ref:`3.2.19-changelog`
- `All JIRA issues closed in 3.2.19
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.2.19%27>`_
.. _3.2.18-release-notes:
3.2.18 - Nov 29, 2017
~~~~~~~~~~~~~~~~~~~~~
- :issue:`SERVER-29287`: Upgrade pcre to 8.41
- :issue:`SERVER-31101`: WT table not dropped after collection is dropped due to long-running OperationContext
- :issue:`SERVER-31149`: Enable recovery progress messages
- :ref:`3.2.18-changelog`
- `All JIRA issues closed in 3.2.18
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.2.18%27>`_
.. _3.2.17-release-notes:
3.2.17 - Sept 28, 2017
~~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-30636`: RangeDeleter assert failed because of replication lag
- :issue:`SERVER-30943`: Segmentation fault on attempt to access an invalidated BSON Object in JS scope
- :issue:`WT-3327`: Checkpoints can hang if time runs backward
- :ref:`3.2.17-changelog`
- `All JIRA issues closed in 3.2.17
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.2.17%27>`_
.. _3.2.16-release-notes:
3.2.16 - Jul 27, 2017
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-26952`: Cache SCRAM-SHA-1 ClientKey
- :issue:`SERVER-28578`: When doing an upgrade from PV0 to PV1, we should not return from the reconfigure until the lastVote document is written.
- :issue:`SERVER-29568`: Enable configuration of OpenSSL cipher suite via setParameter
- :ref:`3.2.16-changelog`
- `All JIRA issues closed in 3.2.16
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.2.16%27>`_
.. _3.2.15-release-notes:
3.2.15 - Jul 5, 2017
~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-29237`: Add ShardingTaskExecutorPoolMaxConnecting flag for :binary:`~bin.mongos`.
- :issue:`SERVER-29850`: Access violation due to a bug in internal page splitting in WiredTiger.
- :issue:`WT-3362`: Cursor opens should never block for the duration of a checkpoint.
- :ref:`3.2.15-changelog`
- `All JIRA issues closed in 3.2.15
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.2.15%27>`_
.. _3.2.14-release-notes:
3.2.14 -Jun 13, 2017
~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-26452`: ``renameCollection`` should handle write conflicts.
- :issue:`SERVER-29365`: No-op ``applyOps`` does not wait for majority writeConcern before returning.
- :issue:`SERVER-28014`: When ssl mode is ``preferSSL``, should log
connections that do not use SSL.
- :ref:`3.2.14-changelog`
- `All JIRA issues closed in 3.2.14
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.2.14%27>`_
.. _3.2.13-release-notes:
3.2.13 -- May 1, 2017
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-3181`: Add ``nameOnly`` option to listDatabases to
only get db names, not size info.
- :issue:`SERVER-21818`: Capture system metrics in FTDC
- :issue:`SERVER-25318`: Limit total memory utilization for bulk index builds
- :ref:`3.2.13-changelog`
- `All JIRA issues closed in 3.2.13
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.2.13%27>`_
.. _3.2.12-release-notes:
3.2.12 -- Feb 1, 2017
~~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-27125` Arbiters in ``pv1`` should vote no in elections
if they can see a healthy primary of equal or greater priority to the
candidate.
- :issue:`SERVER-25012`: :dbcommand:`createIndex` blocks for duration
of checkpoint while holding locks.
- :issue:`SERVER-25865`: :pipeline:`$group` operation is slow on
Windows.
- :ref:`3.2.12-changelog`
- `All JIRA issues closed in 3.2.12
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.2.12%27>`_
.. _3.2.11-release-notes:
3.2.11 -- Nov 18, 2016
~~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-26182`: In a mixed version replica set with v3.2 and
v3.0 members, a sync of a v3.2 member from a v3.0 member can result
in a query response that exceed 16 MB BSON size limit and crash the
v3.2 member.
- :issue:`SERVER-24662`: Upgrade to Perl compatible regular expressions
(PCRE 8.39).
- :issue:`SERVER-26652` Invalid definitions in ``systemd`` configuration
for Debian.
- :issue:`SERVER-24386`: ``killCursor`` operation during aggregation
pipeline can cause segmentation fault.
- :ref:`3.2.11-changelog`
- `All JIRA issues closed in 3.2.11
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.2.11%27>`_
.. _3.2.10-release-notes:
3.2.10 -- Sep 30, 2016
~~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-25974`: When WT cache utilization is full, application
threads can stall for an extended period of time.
- :issue:`SERVER-20306`: MongoDB with WiredTiger may experience
excessive memory fragmentation, leading to swapping and/or
out-of-memory errors.
- :issue:`SERVER-16801`: When updating a field of one numerical type to
the same number of different numerical type, update operation
considers it as a noop.
- :ref:`3.2.10-changelog`
- `All JIRA issues closed in 3.2.10
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.2.10%27>`_
.. _3.2.9-release-notes:
3.2.9 -- Aug 16, 2016
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-7285`: Support systemd in future compatible Ubuntu distributions.
- :issue:`WT-2798`: Create operations on WiredTiger when journaling is disabled may
lead to inconsistent data in the event of a crash.
- :issue:`SERVER-17856`: On :binary:`~bin.mongod` instances, users can run
:dbcommand:`currentOp` and :dbcommand:`killOp` on own operations.
- :ref:`3.2.9-changelog`
- `All JIRA issues closed in 3.2.9
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.2.9%27>`_
.. _3.2.8-release-notes:
3.2.8 -- Jul 12, 2016
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-18329`: Debian 8(Jessie) packages.
- :issue:`SERVER-24580`: Improve performance when WiredTiger cache is
full.
- :issue:`WT-2696`: Race condition on unclean shutdown may miss log
records with large updates.
- :issue:`WT-2706`: Race condition on log file switch can cause missing
log records.
- :ref:`3.2.8-changelog`
- `All JIRA issues closed in 3.2.8
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.2.8%27>`_
.. _3.2.7-release-notes:
3.2.7 -- Jun 7, 2016
~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-24054`: JS segmentation fault on load of certain NaNs.
- :issue:`SERVER-24058`: Connection pool asio doesn't honor setup timeouts.
- :issue:`SERVER-24117`: Mongo binaries ELF stack has become executable.
- :ref:`3.2.7-changelog`
- `All JIRA issues closed in 3.2.7
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2C%20TOOLS)%20AND%20fixVersion%20%3D%203.2.7%20AND%20resolution%20%3D%20Fixed%20>`_
.. _3.2.6-release-notes:
3.2.6 -- Apr 28, 2016
~~~~~~~~~~~~~~~~~~~~~
- First production release of the :doc:`in-memory storage engine
</core/inmemory>`.
Issues fixed:
- :issue:`SERVER-22970`: Background index build may result in extra index
key entries that do not correspond to indexed documents.
- :issue:`SERVER-22043`: :binary:`~bin.mongo` shell method :method:`~cursor.count()`
ignores read preference.
- :ref:`3.2.6-changelog`
- `All JIRA issues closed in 3.2.6
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2C%20TOOLS)%20AND%20fixVersion%20%3D%203.2.6%20AND%20resolution%20%3D%20Fixed%20>`_
.. _3.2.5-release-notes:
3.2.5 -- Apr 14, 2016
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-22964`: IX GlobalLock held while waiting for
WiredTiger cache eviction.
- :issue:`SERVER-22831`: Low query rate with heavy cache pressure
and an idle collection.
- :issue:`SERVER-21681`: Include index size stats for in-memory storage
engine.
- :ref:`3.2.5-changelog`
- `All JIRA issues closed in 3.2.5
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2C%20TOOLS)%20AND%20fixVersion%20%3D%203.2.5%20AND%20resolution%20%3D%20Fixed%20>`_
.. _3.2.4-release-notes:
3.2.4 -- Mar 8, 2016
~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-22495`, :issue:`SERVER-22728`: Update optime when
running with journaling disabled.
- :issue:`SERVER-22269`: Have read concern ``majority`` reflect
journaled state on the primary
- :issue:`SERVER-22683`:
:setting:`replication.enableMajorityReadConcern` ignores actual
setting value and instead implies ``true``.
- :issue:`SERVER-22043`: :method:`~cursor.count()` method in the
:binary:`~bin.mongo` shell does not apply the read preferences.
- :ref:`3.2.4-changelog`
- `All JIRA issues closed in 3.2.4
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2C%20TOOLS)%20AND%20fixVersion%20%3D%203.2.4%20AND%20resolution%20%3D%20Fixed%20>`_
.. _3.2.3-release-notes:
3.2.3 -- Feb 17, 2016
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-22261`: For MMAPv1 journaling, the "last sequence
number" file (``lsn`` file) may be ahead of what is synced to the
data files.
- :issue:`SERVER-22167`: In some cases, insert operations fails to add
the ``_id`` field to large documents.
- :issue:`SERVER-22456`: Increased timeout for querying oplog to 1
minute.
- :ref:`3.2.3-changelog`
- `All JIRA issues closed in 3.2.3
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2C%20TOOLS)%20AND%20fixVersion%20%3D%203.2.3%20AND%20resolution%20%3D%20Fixed%20>`_
3.2.2 -- Feb 16, 2016
~~~~~~~~~~~~~~~~~~~~~
Replaced by MongoDB 3.2.3. Users wishing to
run MongoDB 3.2 should skip 3.2.2 and upgrade directly to 3.2.3.
.. _3.2.1-release-notes:
3.2.1 -- Jan 12, 2016
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-21868`: During a regular shutdown of a replica set,
secondaries may mark certain replicated but yet to be applied
operations as successfully applied.
- :issue:`SERVER-20262`: Improve insert workload performance with
WiredTiger on Windows.
- :issue:`SERVER-21366`: Long-running transactions during chunk moves.
- :ref:`3.2.1-changelog`
- `All JIRA issues closed in 3.2.1
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2C%20TOOLS)%20AND%20fixVersion%20%3D%203.2.1%20AND%20resolution%20%3D%20Fixed%20>`_
WiredTiger as Default
---------------------
Starting in 3.2, MongoDB uses the WiredTiger as the default storage
engine.
To specify the MMAPv1 storage engine, you must specify the storage
engine setting either:
- On the command line with the ``--storageEngine`` option:
.. code-block:: sh
mongod --storageEngine mmapv1
- Or in a :doc:`configuration file </reference/configuration-options>`,
using the :setting:`storage.engine` setting:
.. code-block:: yaml
storage:
engine: mmapv1
.. note::
For existing deployments, if you do not specify the
``--storageEngine`` or the :setting:`storage.engine` setting,
MongoDB 3.2 can automatically determine the storage engine
used to create the data files in the ``--dbpath`` or
:setting:`storage.dbPath`.
If specifying ``--storageEngine`` or :setting:`storage.engine`,
:binary:`~bin.mongod` will not start if ``dbPath`` contains data files
created by a storage engine other than the one specified.
.. seealso:: :ref:`3.2-storage-engine-compatibility`
WiredTiger Default Cache Size
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Starting in MongoDB 3.2, the WiredTiger internal cache, by default,
will use the larger of either:
- 60% of RAM minus 1 GB, or
- 1 GB.
For more information, see :ref:`WiredTiger and Memory Use
<wiredtiger-RAM>`.
WiredTiger Journal Write Frequency
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MongoDB 3.2 configures WiredTiger to write to the journal files at
every 50 milliseconds. This is in addition to the existing journal write
intervals and conditions. For more information, see :ref:`journal-process`.
.. _3.2-rel-notes-rs-enhancements:
Replication Election Enhancements
---------------------------------
Starting in MongoDB 3.2, MongoDB reduces replica set failover time
and accelerates the detection of multiple simultaneous primaries.
As part of this enhancement, MongoDB introduces a version 1 of the
replication protocol. New replica sets will, by default, use
:rsconf:`protocolVersion: 1 <protocolVersion>`. Previous versions of
MongoDB use version 0 of the protocol.
In addition, MongoDB introduces a new :doc:`replica set configuration
</reference/replica-configuration>` option
:rsconf:`~settings.electionTimeoutMillis`.
:rsconf:`~settings.electionTimeoutMillis` specifies the time limit in
milliseconds for detecting when a replica set's primary is unreachable.
:rsconf:`~settings.electionTimeoutMillis` only applies if using the
version 1 of the :rsconf:`replication protocol <protocolVersion>`.
.. seealso:: :doc:`/reference/replica-set-protocol-versions`
.. _3.2-rel-notes-sharded-cluster:
Sharded Cluster Enhancements
----------------------------
MongoDB 3.2 deprecates the use of three mirrored :binary:`~bin.mongod`
instances for config servers.
Instead, starting in 3.2, the :doc:`config servers
</core/sharded-cluster-config-servers>` for a sharded cluster can be
deployed as a replica set. The replica set config servers must run the
WiredTiger storage engine.
This change improves consistency across the config servers, since
MongoDB can take advantage of the standard replica set read and write
protocols for sharding config data. In addition, this allows a sharded
cluster to have more than 3 config servers since a replica set can have
up to 50 members.
For more information, see :doc:`/core/sharded-cluster-config-servers`.
To deploy a **new** sharded cluster with replica set config servers,
see :doc:`/tutorial/deploy-shard-cluster`.
MongoDB 3.2 deprecates the use of master-slave replication for
components of sharded clusters.
Starting in 3.2, :binary:`~bin.mongos`, during its startup, will continue
to try to contact the config servers until one becomes available. In
previous versions, :binary:`~bin.mongos`, during its startup, would shut
down if it could not find a config server.
.. _3.2-rel-notes-readConcern:
``readConcern``
---------------
MongoDB 3.2 introduces the ``readConcern`` query option for replica sets and replica
set shards. For the :doc:`WiredTiger storage engine
</core/wiredtiger>`, the ``readConcern`` option allows clients to
choose a level of isolation for their reads. You can specify a
``readConcern`` of ``"majority"`` to read data that has been written to
a majority of nodes and thus cannot be rolled back. By default, MongoDB
uses a ``readConcern`` of ``"local"`` to return the most recent data
available to the node at the time of the query, even if the data has
not been persisted to a majority of nodes and may be rolled back. With
the :doc:`MMAPv1 storage engine </core/mmapv1>`, you can only specify a
``readConcern`` of ``"local"``.
``readConcern`` requires MongoDB drivers updated for MongoDB 3.2.
For details on ``readConcern``, including operations that support the
option, see :doc:`/reference/read-concern`.
Partial Indexes
---------------
MongoDB 3.2 provides the option to create indexes that only index
the documents in a collection that meet a specified filter expression.
By indexing a subset of the documents in a collection, partial indexes
have lower storage requirements and reduced performance costs for index
creation and maintenance. You can specify a ``partialFilterExpression``
option for all MongoDB :ref:`index types <index-types>`.
The ``partialFilterExpression`` option accepts a document that specifies the
condition using:
- equality expressions (i.e. ``field: value`` or using the :query:`$eq`
operator),
- :query:`$exists: true <$exists>` expression,
- :query:`$gt`, :query:`$gte`, :query:`$lt`, :query:`$lte` expressions,
- :query:`$type` expressions,
- :query:`$and` operator at the top-level only
For details, see :doc:`/core/index-partial`.
.. _3.2-rel-notes-document-validation:
Document Validation
-------------------
Starting in 3.2, MongoDB provides the capability to validate documents
during updates and insertions. Validation rules are specified on a
per-collection basis.
To specify document validation on a new collection, use the new
``validator`` option in the :method:`db.createCollection()` method. To
add document validation to an existing collection, use the new
``validator`` option in the :dbcommand:`collMod` command. For more
information, see :doc:`/core/schema-validation`.
To view the validation specifications for a collection, use the
:method:`db.getCollectionInfos()` method.
The following operations can bypass validation per operation using the
new option ``bypassDocumentValidation``:
.. list-table::
:header-rows: 1
:class: border-table
* - Command
- ``mongo`` Shell Method
* - :dbcommand:`aggregate` when used with :pipeline:`$out`
- :method:`db.collection.aggregate()` when used with :pipeline:`$out`
* - :dbcommand:`applyOps`
-
* - :dbcommand:`cloneCollection`
-
* - :dbcommand:`clone`
-
* - :dbcommand:`copydb`
-
* - :dbcommand:`findAndModify`
- :method:`db.collection.findAndModify()`
* - :dbcommand:`insert`
-
* - :dbcommand:`mapReduce`
- :method:`db.collection.mapReduce()`
* - :dbcommand:`update`
-
For deployments that have enabled access control, you must have
:authaction:`bypassDocumentValidation` action. The built-in roles
:authrole:`dbAdmin` and :authrole:`restore` provide this action.
Aggregation Pipeline Enhancements
---------------------------------
MongoDB introduces:
- New stages, accumulators, and expressions.
- :ref:`Availability of accumulator expressions
<3.2-agg-accumulator-availability>` in :pipeline:`$project` stage.
- :ref:`Performance improvements <3.2-agg-shard-optimization>` on
sharded clusters.
New Aggregation Stages
~~~~~~~~~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
:widths: 10 40 50
* - Stage
- Description
- Syntax
* - :pipeline:`$sample`
- Randomly selects N documents from its input.
- ``{ $sample: { size: <positive integer> } }``
* - :pipeline:`$indexStats`
- Returns statistics on index usage.
- ``{ $indexStats: { } }``
* - :pipeline:`$lookup`
- Performs a left outer join with another collection.
- .. code-block:: none
{
$lookup:
{
from: <collection to join>,
localField: <fieldA>,
foreignField: <fieldB>,
as: <output array field>
}
}
New Accumulators for ``$group`` Stage
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
:widths: 10 40 50
* - Accumulator
- Description
- Syntax
* - :group:`$stdDevSamp`
- Calculates standard deviation.
- ``{ $stdDevSamp: <array> }``
* - :group:`$stdDevPop`
- Calculates population standard deviation.
- ``{ $stdDevPop: <array> }``
New Aggregation Arithmetic Operators
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
:widths: 10 40 50
* - Operator
- Description
- Syntax
* - :expression:`$sqrt`
- Calculates the square root.
- ``{ $sqrt: <number> }``
* - :expression:`$abs`
- Returns the absolute value of a number.
- ``{ $abs: <number> }``
* - :expression:`$log`
- Calculates the log of a number in the specified base.
- ``{ $log: [ <number>, <base> ] }``
* - :expression:`$log10`
- Calculates the log base 10 of a number.
- ``{ $log10: <number> }``
* - :expression:`$ln`
- Calculates the natural log of a number.
- ``{ $ln: <number> }``
* - :expression:`$pow`
- Raises a number to the specified exponent.
- ``{ $pow: [ <number>, <exponent> ] }``
* - :expression:`$exp`
- Raises *e* to the specified exponent.
- ``{ exp: <number> }``
* - :expression:`$trunc`
- Truncates a number to its integer.
- ``{ $trunc: <number> }``
* - :expression:`$ceil`
- Returns the smallest integer greater than or equal to the
specified number.
- ``{ $ceil: <number> }``
* - :expression:`$floor`
- Returns the largest integer less than or equal to the specified
number.
- ``{ floor: <number> }``
New Aggregation Array Operators
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
:widths: 10 35 55
* - Operator
- Description
- Syntax
* - :expression:`$slice`
- Returns a subset of an array.
- ``{ $slice: [ <array>, <n> ] }``
or
``{ $slice: [ <array>, <position>, <n> ] }``
* - :expression:`$arrayElemAt`
- Returns the element at the specified array index.
- ``{ $arrayElemAt: [ <array>, <idx> ] }``
* - :expression:`$concatArrays`
- Concatenates arrays.
- .. code-block:: javascript
{
$concatArrays: [ <array1>, <array2>, ... ]
}
* - :expression:`$isArray`
- Determines if the operand is an array.
- ``{ $isArray: [ <expression> ] }``
* - :expression:`$filter`
- Selects a subset of the array based on the condition.
- .. code-block:: javascript
{
$filter:
{
input: <array>,
as: <string>,
cond: <expression>
}
}
.. _3.2-agg-accumulator-availability:
Accumulator Expression Availability
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Starting in version 3.2, the following accumulator expressions,
previously only available in the :pipeline:`$group` stage, are now also
available in the :pipeline:`$project` stage:
- :group:`$avg`
- :group:`$min`
- :group:`$max`
- :group:`$sum`
- :group:`$stdDevPop`
- :group:`$stdDevSamp`
When used as part of the :pipeline:`$project` stage, these accumulator
expressions can accept either:
- A single argument: ``<accumulator> : <arg>``
- Multiple arguments: ``<accumulator> : [ <arg1>, <arg2>, ... ]``
General Enhancements
~~~~~~~~~~~~~~~~~~~~
- In MongoDB 3.2, :pipeline:`$project` stage supports using the square
brackets ``[]`` to directly create new array fields. For an example,
see :ref:`example-project-new-array-fields`.
- MongoDB 3.2 introduces the ``minDistance`` option for the
:pipeline:`$geoNear` stage.
- :pipeline:`$unwind` stage no longer errors on non-array operand. If
the operand does not resolve to an array but is not missing, null, or
an empty array, :pipeline:`$unwind` treats the operand as a single
element array.
:pipeline:`$unwind` stage can:
- include the array index of the array element in the output by
specifying a new option ``includeArrayIndex`` in the stage
specification.
- output those documents where the array field is missing, null or an
empty array by specifying a new option
``preserveNullAndEmptyArrays`` in the stage specification.
To support these new features, :pipeline:`$unwind` can now take an
alternate syntax. See :pipeline:`$unwind` for details.
.. _3.2-agg-shard-optimization:
Optimization
~~~~~~~~~~~~
Indexes can :ref:`cover <read-operations-covered-query>` aggregation operations.
MongoDB improves the overall performance of the pipeline
in large sharded clusters.
If the pipeline starts with an exact :pipeline:`$match` on a shard key,
the entire pipeline runs on the matching shard only. Previously, the
pipeline would have been split, and the work of merging it would have
to be done on the primary shard.
For aggregation operations that run on multiple shards, if the
operations do not require running on the database's primary shard,
these operations can route the results to any shard to merge the
results and avoid overloading the primary shard for that database.
Aggregation operations that require running on the database's primary
shard are the :pipeline:`$out` stage and :pipeline:`$lookup` stage.
Compatibility
~~~~~~~~~~~~~
For compatibility changes, see :ref:`3.2-agg-compatibility`.
MongoDB Tools Enhancements
--------------------------
- :binary:`~bin.mongodump` and :binary:`~bin.mongorestore` add support for
archive files and standard output/input streams with a new
``--archive`` option. This enhancement allows for the streaming of
the dump data over a network device via a pipe. For examples, see
- :ref:`mongodump to an Archive File
<mongodump-example-archive-file>` and :ref:`mongodump an Archive to
Standard Output <mongodump-example-archive-stdout>`
- :ref:`mongorestore-example-archive-file` and
:ref:`mongorestore-example-archive-stdin`.
- :binary:`~bin.mongodump` and :binary:`~bin.mongorestore` add support for
compressed data dumps with a new ``--gzip`` option. This enhancement
reduces storage space for the dump files. For examples, see:
- :ref:`Compress mongodump Output <mongodump-example-gzip>`
- :ref:`mongorestore-example-gzip`.
.. _3.2-rel-notes-encryption:
Encrypted Storage Engine
------------------------
.. include:: /includes/fact-enterprise-only-admonition.rst
.. important:: Available for the WiredTiger Storage Engine only.
Encryption at rest, when used in conjunction with transport encryption
and good security policies that protect relevant accounts, passwords,
and encryption keys, can help ensure compliance with security and
privacy standards, including HIPAA, PCI-DSS, and FERPA.
MongoDB Enterprise 3.2 introduces a native encryption option for the
WiredTiger storage engine. This feature allows MongoDB to encrypt data
files such that only parties with the decryption key can decode and
read the data. For detail, see :ref:`encrypted-storage-engine`.
Text Search Enhancements
------------------------
.. _3.2-relnotes-text-index-v3:
``text`` Index Version 3
~~~~~~~~~~~~~~~~~~~~~~~~
MongoDB 3.2 introduces a version 3 of the :doc:`text index
</core/index-text>`. Key features of the new version of the index are:
- Improved :ref:`case insensitivity <text-index-case-insensitivity>`.
- :ref:`Diacritic insensitivity <text-index-diacritic-insensitivity>`.
- Additional :ref:`delimiters for tokenization
<text-index-tokenization-delimiters>`.
Starting in MongoDB 3.2, version 3 is the default version for new
:doc:`text </core/index-text>` indexes.
.. seealso:: :ref:`3.2-text-index-compatibility`
.. _3.2-relnotes-text-operator:
``$text`` Operator Enhancements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The :query:`$text` operator adds support for:
- :ref:`case sensitive text search <text-operator-case-sensitivity>`
with the new ``$caseSensitive`` option, and
- :ref:`diacritic sensitive text search
<text-operator-diacritic-sensitivity>` with the new
``$diacriticSensitive`` option.
For more information and examples, see the :query:`$text` operator
reference sections :ref:`text-operator-case-sensitivity` and
:ref:`text-operator-diacritic-sensitivity`.
Support for Additional Languages