-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
3.4.txt
1351 lines (876 loc) · 41.5 KB
/
3.4.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.4
=============================
.. default-domain:: mongodb
.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: twocols
.. admonition:: MongoDB 3.4 Released Nov 29, 2016
MongoDB 3.4 is now available. Key features include linearizable read
concerns, views, and collation.
OpsManager 3.4 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.
Minor Releases
--------------
.. class:: hidden
.. toctree::
/release-notes/3.4-changelog
.. _3.4.24-release-notes:
3.4.24 - Jan 27, 2020
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-37772`: Platform Support: Add Community & Enterprise RHEL 8 x64
- :issue:`SERVER-37135`: TLSVersionCounts needs to track and report TLS 1.3
- :issue:`SERVER-36315`: After stepdown the CSRS dist lock manager keeps trying to unlock locks
- :issue:`SERVER-37846`: writeConcern can be satisfied with an arbiter if the write was committed
- :issue:`SERVER-38945`: SSL performance regression
- :issue:`SERVER-40355`: rs.config that contains an _id greater than the number of nodes will crash
- :issue:`SERVER-43151`: Error in aggregation assertion at value.cpp:1368
- :issue:`SERVER-44050`: Arrays along 'hashed' index key path are not correctly rejected
- :issue:`WT-4956`: Handle the case where 4 billion updates are made to a page without eviction
- :ref:`3.4.24-changelog`
- `All JIRA issues closed in 3.4.24
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.24%27>`_
.. _3.4.23-release-notes:
3.4.23 - Sep 16, 2019
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-36394`: mongos should reset chunk size tracking
information when autosplit = false or splitvector returns too few
split points
- :issue:`SERVER-41829`: findAndModify ignores filter expressions that
are not objects
- :issue:`SERVER-42055`: Only acquire a collection IX lock to write the
lastVote document
- :ref:`3.4.23-changelog`
- `All JIRA issues closed in 3.4.23
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.23%27>`_
.. _3.4.22-release-notes:
3.4.22 - Aug 6, 2019
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-17010`: Reduce file handle usage in File based Sorter.
- :issue:`SERVER-38984`: Attach IDs to users (CVE-2019-2386).
- :issue:`SERVER-42089`: Platform Support: Remove Enterprise RHEL 6.7
zSeries
- :ref:`3.4.22-changelog`
- `All JIRA issues closed in 3.4.22
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.22%27>`_
.. note::
Fixed issues include those that resolve the following Common
Vulnerabilities and Exposures (CVEs):
- CVE-2019-2386 (See :issue:`SERVER-38984`)
- CVE-2019-2389 (See :issue:`SERVER-40563`)
- CVE-2019-2390 (See :issue:`SERVER-42233`)
.. _3.4.21-release-notes:
3.4.21 - Jun 14, 2019
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-39820`: Add the client IP address to the successful authentication log message
- :issue:`SERVER-41213`: Unique background index builds may produce inconsistent keys
- :issue:`SERVER-37765`: Platform Support: Remove Ubuntu 14.04
- :issue:`SERVER-37774`: Platform Support: Remove Enterprise Ubuntu 16.04 PPCLE
- :issue:`WT-4615`: Sync backup file before returning backup cursor
- :ref:`3.4.21-changelog`
- `All JIRA issues closed in 3.4.21
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.21%27>`_
.. _3.4.20-release-notes:
3.4.20 - Mar 13, 2019
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-39166`: $graphLookup should force a pipeline to split in sharded cluster
- :issue:`SERVER-39723`: Change listIndexes command behavior to show in-progress index builds
- :issue:`TOOLS-2158`: mongodump failing on Windows with "error opening system CA store: Access is denied."
- :ref:`3.4.20-changelog`
- `All JIRA issues closed in 3.4.20
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.20%27>`_
.. _3.4.19-release-notes:
3.4.19 - Jan 28, 2019
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-18985`: setParameter should log at level 0
- :issue:`SERVER-22766`: Dynamic oplog sizing for WiredTiger nodes
- :issue:`SERVER-33469`: Make syslog log lines consistent with mongod log lines
- :issue:`SERVER-37132`: Negation of $in with regex can incorrectly plan from the cache, leading to missing query results
- :issue:`SERVER-37182`: Different values when referencing whole object vs. a field of that object after $arrayToObject
- :issue:`SERVER-37616`: Implement tuneable batch size for the rangedeleter
- :ref:`3.4.19-changelog`
- `All JIRA issues closed in 3.4.19
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.19%27>`_
.. _3.4.18-release-notes:
3.4.18 - Nov 7, 2018
~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-25175`: listIndexes shouldn't include in-progress background indexes
- :issue:`SERVER-35418`: Allow specifying CAs for incoming and outgoing connections separately.
- :issue:`SERVER-36944`: applyOps does not permit unknown field names when creating a v:1 index.
- :issue:`SERVER-37058`: Update with numeric field names inside an array can cause validation to fail.
- :ref:`3.4.18-changelog`
- `All JIRA issues closed in 3.4.18
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.18%27>`_
.. _3.4.17-release-notes:
3.4.17 - Sep 7, 2018
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-33857` Missing log redaction due to confusion with
Command::redactForLogging().
- :issue:`SERVER-34846` Covered index with collated field returns
incorrect result when collation not involved in match or sort.
- :issue:`SERVER-36010` Change log messages for Windows stacktraces to
use error() or severe() rather than log().
- :issue:`SERVER-34558`: Add SSL_version to client metadata logging.
- :ref:`3.4.17-changelog`
- `All JIRA issues closed in 3.4.17
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.17%27>`_
.. _3.4.16-release-notes:
3.4.16 - Jul 10, 2018
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-32999`: Platform Support: Remove Debian 7 builds.
- :issue:`SERVER-29301`: Upgrade MozJS to ESR 45.9.0
- :issue:`SERVER-5461`: Add ``syncSourceHost`` field to
``replSetGetStatus`` output.
- :ref:`3.4.16-changelog`
- `All JIRA issues closed in 3.4.16
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.16%27>`_
.. _3.4.15-release-notes:
3.4.15 - May 16, 2018
~~~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-31535`: Platform Support: remove Ubuntu 12.04 builds.
- :issue:`SERVER-32923`: Platform Support: remove SLES11 builds.
- :issue:`SERVER-20056`: Log a startup warning if wiredTigerCacheSizeGB is > 80% of RAM.
- :issue:`SERVER-28981`: Sharding balancer prefers shards in a specific order when moving chunks.
- :ref:`3.4.15-changelog`
- `All JIRA issues closed in 3.4.15
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.15%27>`_
.. _3.4.14-release-notes:
3.4.14 - March 20, 2018
~~~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-28151`: Authentication database should be synced first
during an initial sync.
- :issue:`SERVER-32886`: Unnecessary sleeps during chunk migration.
- :issue:`SERVER-32933`: Allow ``mongod`` to start when unable to reach
LDAP server.
- :ref:`3.4.14-changelog`
- `All JIRA issues closed in 3.4.14
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.14%27>`_
.. _3.4.13-release-notes:
3.4.13 - Feb 10, 2018
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-33238`: Prevent WiredTiger read ticket count from going negative.
- :ref:`3.4.13-changelog`
- `All JIRA issues closed in 3.4.13
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.13%27>`_
.. _3.4.12-release-notes:
3.4.12 - Feb 8, 2018
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-31437`: Fix parsing of ``mongo host/db`` connect string.
- :issue:`SERVER-32875`: Don't stall ftdc due to running out of tickets.
- :issue:`SERVER-33089`: Unable to start queryable mongod because it
failed to regenerate index for ``admin.system.users``.
- :ref:`3.4.12-changelog`
- `All JIRA issues closed in 3.4.12
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.12%27>`_
.. _3.4.11-release-notes:
3.4.11 - Jan 31, 2018
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-19605`: Oplog timeout should be configurable.
- :issue:`SERVER-19919`: Chunks that exceed 250000 docs but are under half chunk size get marked as jumbo.
- :issue:`SERVER-29293`: Recipient shard fails to abort migration on stepdown.
- :issue:`SERVER-32001`: unindexing a key in a partial unique index may cause server crash
- :ref:`3.4.11-changelog`
- `All JIRA issues closed in 3.4.11
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.11%27>`_
.. _3.4.10-release-notes:
3.4.10 - Oct 31, 2017
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-15723`: Avoid G_X lock for rename_collection within
database
- :issue:`SERVER-31049`: View with collation doesn't work as expected
in sharded cluster
- :issue:`SERVER-29287`: Upgrade pcre to 8.41
- :issue:`SERVER-31204`: Calling `shardCollection` after
`enableSharding` may fail if executed against different mongos
- :ref:`3.4.10-changelog`
- `All JIRA issues closed in 3.4.10
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.10%27>`_
.. _3.4.9-release-notes:
3.4.9 - Sept 11, 2017
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-20392`: Sharding an existing small collection results in large number of chunks
- :issue:`SERVER-30189`: Reduce calls to allocator for large $in expressions
- :issue:`SERVER-30487`: RangeDeleter holds WT transaction open while waiting for majority
- :issue:`SERVER-30636`: Range deleter assert failed because of replication lag
- :ref:`3.4.9-changelog`
- `All JIRA issues closed in 3.4.9
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.9%27>`_
.. _3.4.7-release-notes:
3.4.7 -- Aug 8, 2017
~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-29282`: BSON Document Size can be exceeded when grouping inserts on SECONDARY nodes
- :issue:`SERVER-29568`: Enable configuration of OpenSSL cipher suite via :parameter:`setParameter <opensslCipherConfig>`
- :issue:`SERVER-29817`: Optimize incremental update performance of ChunkManager and CollectionMetadata
- :ref:`3.4.7-changelog`
- `All JIRA issues closed in 3.4.7
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.7%27>`_
.. _3.4.6-release-notes:
3.4.6 -- Jul 5, 2017
~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-27347`: Only close idle cached cursors on the
WiredTiger ident that is busy.
- :issue:`SERVER-29618`: ``$geoWithin`` in aggregation pipeline after
``$lookup`` and ``$unwind`` returns incorrect results.
- :issue:`WT-3362`: Cursor opens should never block for the duration of a checkpoint.
- :ref:`3.4.6-changelog`
- `All JIRA issues closed in 3.4.6
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.6%27>`_
.. _3.4.5-release-notes:
3.4.5 -- Jun 14, 2017
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-28952`: Multikey indexes should not be eligible for
DISTINCT_SCAN if distinct key is an array component.
- :issue:`SERVER-28427`: GlobalLock with timeout can still block indefinitely.
- :issue:`SERVER-29018` :binary:`~bin.mongos` can segfault in ``getMore``
on views with find batchSize of 0.
- :ref:`3.4.5-changelog`
- `All JIRA issues closed in 3.4.5
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.5%27>`_
.. _3.4.4-release-notes:
3.4.4 -- Apr 21, 2017
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-18794`: Add an aggregation operator
:expression:`$objectToArray` to convert an object to an array of key,
value pairs.
- :issue:`SERVER-23310`: Add an aggregation operator
:expression:`$arrayToObject` to convert an array of pairs to an
object.
- :issue:`SERVER-22611`: ChunkManager refresh can occasionally cause a
full reload.
- :ref:`3.4.4-changelog`
- `All JIRA issues closed in 3.4.4
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.4%27>`_
.. _3.4.3-release-notes:
3.4.3 -- Mar 28, 2017
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-27863`: Reschedule firing of early alarms in
NetworkInterfaceASIO to avoid :binary:`~bin.mongos` crash.
- :issue:`SERVER-28017`: :query:`$ne` should respect collection's
default collation.
- :issue:`SERVER-27700`: Improve WiredTiger performance on secondary
when cache is full.
- :ref:`3.4.3-changelog`
- `All JIRA issues closed in 3.4.3
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.3%27>`_
.. _3.4.2-release-notes:
3.4.2 -- 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-27584` Add support for filter to listDatabases
- :issue:`WT-2670` Inefficient I/O when read full DB (poor readahead)
- :ref:`3.4.2-changelog`
- `All JIRA issues closed in 3.4.2
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.2%27>`_
.. _3.4.1-release-notes:
3.4.1 -- Dec 20, 2016
~~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-27124`: Disallow ``readConcern: majority`` reads on
replica set protocolVersion 0 (pv0).
- :issue:`SERVER-27201`: $graphLookup triggers null pointer dereference.
- :issue:`SERVER-27207`: Find operation with a sort on a view via
``mongos`` may incorrectly return empty result set.
- :issue:`SERVER-27213`: Two ``$match`` pipeline stages can combine
incorrectly to produce incorrect results.
- :ref:`3.4.1-changelog`
- `All JIRA issues closed in 3.4.1
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%273.4.1%27>`_
.. _3.4-rel-notes-sharded-cluster:
Sharded Cluster
---------------
Membership Awareness
~~~~~~~~~~~~~~~~~~~~
Starting in 3.4, sharded cluster components (shards, config servers,
:binary:`~bin.mongos` instances) recognize their membership in a sharded
cluster, including the name of the sharded cluster, the location of the
config servers.
.. COMMENT To DOCS TEAM: Make sure we single source these things since used in relnotes and compatibility
To support this awareness:
- ``shardsvr`` Requirement
For a 3.4 sharded cluster, :binary:`~bin.mongod` instances for the
shards **must** explicitly specify its role as a ``shardsvr``,
either via the configuration file setting
:setting:`sharding.clusterRole` or via the command line option
:option:`--shardsvr <mongod --shardsvr>`.
.. note::
Default port for :binary:`~bin.mongod` instances with the ``shardsvr``
role is ``27018``. To use a different port, specify
:setting:`net.port` setting or ``--port`` option.
.. COMMENT To DOCS TEAM: Ensure that in all our sharding tutorials we specify shardsvr.
- 3.4 ``mongos`` Incompatibility with Earlier Versions of ``mongod``
Version 3.4 :binary:`~bin.mongos` instances cannot connect to
earlier versions of :binary:`~bin.mongod` instances.
Balancer on Config Server Primary
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The balancer process has moved from the :binary:`~bin.mongos` to the
primary member of the config server replica set. Associated with this
change:
- The primary of the CSRS config server holds the ``"balancer"`` lock,
using a process id named ``"ConfigServer"``, which is never released.
- MongoDB 3.4 adds:
- :dbcommand:`balancerStart` command and updates the 3.4
:binary:`~bin.mongo` shell method :method:`sh.startBalancer()` to wrap
the new command. A 3.2 or earlier :binary:`~bin.mongo` shell method
:method:`sh.startBalancer()` is incompatible with a 3.4 sharded
cluster.
- :dbcommand:`balancerStop` command and updates the 3.4
:binary:`~bin.mongo` shell method :method:`sh.stopBalancer()` to wrap
the new command. A 3.2 or earlier :binary:`~bin.mongo` shell method
:method:`sh.stopBalancer()` is incompatible with a 3.4 sharded
cluster.
- :dbcommand:`balancerStatus` command.
- MongoDB 3.4 deprecates :binary:`~bin.mongo` shell method
:method:`sh.getBalancerHost()`. A 3.2 or earlier :binary:`~bin.mongo`
shell method :method:`sh.getBalancerHost()` is incompatible with a
3.4 sharded cluster.
- MongoDB 3.4 removes the following configuration options from the
:binary:`~bin.mongos`:
- :setting:`sharding.chunkSize` configuration file setting and
``--chunkSize`` command-line option
- :setting:`sharding.autoSplit` configuration file setting and
``--noAutoSplit`` command-line option
Faster Balancing
~~~~~~~~~~~~~~~~
Starting in MongoDB 3.4:
- For :ref:`WiredTiger <storage-wiredtiger>`, the default value
``secondaryThrottle`` is ``false`` for all chunk migrations. The
balancer does not wait for replication to a secondary and instead
continues with the next document.
- MongoDB can perform parallel chunk migrations. Similar to earlier
versions, a shard can participate in at most one migration at a time.
Observing this restriction, for a sharded cluster with *n* shards,
MongoDB can perform at most *n/2* (rounded down) simultaneous chunk
migrations.
.. _3.4-remove-sccc:
Removal of Support for SCCC Config Servers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3.4 sharded clusters no longer support the use of mirrored (SCCC)
:binary:`~bin.mongod` instances as config servers. The use of SCCC config
servers, deprecated in the 3.2 release, is no longer valid. Instead,
deploy your config servers as a replica set (CSRS).
To upgrade your sharded cluster to version 3.4, the config servers must
be running as a replica set.
To convert your existing config servers from SCCC to CSRS, see
:doc:`/tutorial/upgrade-config-servers-to-replica-set`.
Sharding Zones
~~~~~~~~~~~~~~
MongoDB 3.4 introduces :doc:`/core/zone-sharding`, which supersedes
tag-aware sharding available in earlier versions.
To support zones, MongoDB introduces the following commands and
:binary:`~bin.mongo` shell helpers:
.. list-table::
:header-rows: 1
* - Commands
- `mongo` Shell Methods
* - :dbcommand:`addShardToZone`
- :method:`sh.addShardToZone()`
* - :dbcommand:`removeShardFromZone`
- :method:`sh.removeShardFromZone()`
* - :dbcommand:`updateZoneKeyRange`
- | :method:`sh.updateZoneKeyRange()`
| :method:`sh.removeRangeFromZone()`
.. _3.4-replica-set:
Replica Set
-----------
Default Journaling Behavior of ``majority`` Write Concern
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A new replica set configuration setting
:rsconf:`writeConcernMajorityJournalDefault` determines whether an
acknowledgement for a write concern of :writeconcern:`majority
<"majority">` returns after the majority of the voting members apply
the write in memory or to the on-disk journal *if* the :ref:`j <wc-j>`
option is unspecified in the write concern.
Adjustable Catchup Period for Newly Elected Primary
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A new replica set configuration setting
:rsconf:`settings.catchUpTimeoutMillis` defines the time limit for a
newly elected primary to catch up with the other replica set members
that may have more recent writes.
Linearizable Read Concern
~~~~~~~~~~~~~~~~~~~~~~~~~
MongoDB 3.4 introduces a read concern level of
:readconcern:`"linearizable"` to read data that reflects all successful
writes issued with a :writeconcern:`"majority"` *and* acknowledged
prior to the start of the read operation. Linearizable read concern
guarantees only apply if read operations specify a query filter that
uniquely identifies a single document.
Linearizable read concern is available for all MongoDB supported
:doc:`storage engines </core/storage-engines>`.
Combined with :writeconcern:`"majority"` write concern,
:readconcern:`"linearizable"` read concern enables multiple threads to
perform reads and writes on a single document as if a single thread
performed these operations in real time; that is, the corresponding
schedule for these reads and writes is considered linearizable.
Reads with linearizable read concern may be significantly slower than
reads with :readconcern:`"majority"` or :readconcern:`"local"` read
concerns. Always use ``maxTimeMS`` with linearizable read concern, in
case a majority of data bearing members are unavailable. For example:
.. code-block:: javascript
db.restaurants.find( { _id: 5 } ).readConcern("linearizable").maxTimeMS(10000)
db.runCommand( {
find: "restaurants",
filter: { _id: 5 },
readConcern: { level: "linearizable" },
maxTimeMS: 10000
} )
For more information on read concern, including operations that support
read concerns, see :doc:`/reference/read-concern`.
Improved Initial Sync
~~~~~~~~~~~~~~~~~~~~~
- MongoDB 3.4 improves the performance of :ref:`initial sync
<replica-set-initial-sync>` by having initial sync build the indexes
as the documents are copied.
- MongoDB 3.4 improves the :ref:`initial sync retry logic
<init-sync-retry>` to be more resilient to intermittent failures on
the network.
- To avoid potential data corruption, MongoDB 3.4 fails and restarts
:ref:`initial sync <replica-set-initial-sync>` if a collection is
renamed on the sync source during the initial sync. With MongoDB 3.2.11
or earlier, initial syncs did not fail and restart but instead
continued the process, which could lead to potential data corruption.
For details, see :ref:`3.4-compatibility-initial-sync`.
- Modified :dbcommand:`replSetGetStatus` command to accept the optional
``initialSync: 1`` in the command to report on initial sync status
and progress if run on the secondary:
.. code-block:: javascript
db.adminCommand( { replSetGetStatus: 1, initialSync: 1 } )
.. _3.4-decimal:
Decimal Type
------------
3.4 adds support for the `decimal128 format
<https://en.wikipedia.org/wiki/Decimal128_floating-point_format>`_ with
the new ``decimal`` data type. The decimal128 format supports numbers with
up to 34 decimal digits (i.e. significant digits) and an exponent range
of −6143 to +6144.
To support the format, the :binary:`~bin.mongo` shell adds the
:ref:`NumberDecimal <shell-type-decimal>` wrapper.
.. code-block:: javascript
db.inventory.insert( {_id: 1, item: "The Scream", price: NumberDecimal("9.99"), quantity: 4 } )
When performing :ref:`comparisons <bson-types-comparison-order>` among
different numerical types, MongoDB performs comparison on the exact
stored numerical values without first converting values to a common
type.
Unlike the ``double`` data type, which only stores an approximation of
the decimal values, the ``decimal`` data type stores the exact value.
For example, a ``decimal`` ``NumberDecimal("9.99")`` has a precise
value of ``9.99`` where as a double ``9.99`` would have an approximate
value of ``9.9900000000000002131628...``.
To test for ``decimal`` type, use the :query:`$type` operator with the
literal ``"decimal"`` or ``19``.
.. code-block:: javascript
db.inventory.find( { price: { $type: "decimal" } } )
To use the new ``decimal`` data type with a MongoDB driver, an upgrade
to a driver version that supports the feature is necessary.
.. _3.4-rel-notes-aggregation-cluster:
Aggregation
-----------
New Aggregation Stage for Recursive Search
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3.4 introduces a stage to the :doc:`aggregation pipeline
</core/aggregation-pipeline>` that allows for recursive search.
.. list-table::
:header-rows: 1
:widths: 20 80
* - Stage
- Description
* - :pipeline:`$graphLookup`
- Performs a recursive search on a collection. To each output
document, adds a new array field that contains the traversal
results of the recursive search for that document.
.. seealso:: `Webinar: Working with Graph Data in MongoDB <https://www.mongodb.com/presentations/webinar-working-with-graph-data-in-mongodb?jmp=docs>`_
New Aggregation Stages for Faceted Search
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Faceted search allows for the categorization of documents into
classifications. For example, given a collection of inventory
documents, you may want to classify items by a single category, such as
by the price range, or by multiple categories, such as by price range
as well as separately by the departments.
3.4 introduces stages to the :doc:`aggregation pipeline
</core/aggregation-pipeline>` that allow for faceted search.
.. list-table::
:header-rows: 1
:widths: 20 80
* - Stage
- Description
* - :pipeline:`$bucket`
- Categorizes or groups incoming documents into buckets that
represent a range of values for a specified expression.
* - :pipeline:`$bucketAuto`
- Categorizes or groups incoming documents into specified number
of buckets that represent a range of values for a specified
expression. MongoDB automatically determines the bucket
boundaries.
* - :pipeline:`$facet`
- Processes multiple :ref:`pipelines <aggregation-pipeline>` on
the input documents and outputs a document that contains the
results of these pipelines. By specifying facet-related stages
(:pipeline:`$bucket`, :pipeline:`$bucketAuto`, and
:pipeline:`$sortByCount`) in these pipelines, :pipeline:`$facet`
allows for multi-faceted search.
* - :pipeline:`$sortByCount`
- Categorizes or groups incoming documents by a specified
expression to compute the count for each group. Output documents
are sorted in descending order by the count.
New Aggregation Stages to Facilitate Reshaping Documents
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3.4 introduces stages to the :doc:`aggregation pipeline
</core/aggregation-pipeline>` that faciliate replacing documents as
well as adding new fields.
.. list-table::
:header-rows: 1
:widths: 20 80
* - Stage
- Description
* - :pipeline:`$addFields`
- Adds new fields to documents. The stage outputs documents that
contains all existing fields from the input documents as well as
the newly added fields.
* - :pipeline:`$replaceRoot`
- Replaces a document with the specified document. You can specify
a document embedded in the input document to promote the
embedded document to the top level.
New Aggregation Stage to Count
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3.4 introduces a new stage to the :doc:`aggregation pipeline
</core/aggregation-pipeline>` that faciliate counting document.
.. list-table::
:header-rows: 1
:widths: 20 80
* - Stage
- Description
* - :pipeline:`$count`
- Returns a document that contains a count of the number of
documents input to the stage.
New Aggregation Array Operators
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
:widths: 20 80
* - Operator
- Description
* - :expression:`$in`
- Returns a boolean that indicates if a specified value is in an
array.
* - :expression:`$indexOfArray`
- Searches an array for an occurence of a specified value and
returns the array index (zero-based) of the first occurence.
* - :expression:`$range`
- Returns an array whose elements are a generated sequence of
numbers.
* - :expression:`$reverseArray`
- Returns an output array whose elements are those of the input
array but in reverse order.
* - :expression:`$reduce`
- Takes an array as input and applies an expression to each
element in the array to return the final result of the
expression.
* - :expression:`$zip`
- Returns an output array where each element is itself an array,
consisting of elements in the corresponding array index position
from the input arrays.
New Aggregation String Operators
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
:widths: 20 80
* - Operator
- Description
* - :expression:`$indexOfBytes`
- Searches a string for an occurence of a substring and returns
the UTF-8 byte index (zero-based) of the first occurence.
* - :expression:`$indexOfCP`
- Searches a string for an occurence of a substring and returns
the UTF-8 `code point
<http://www.unicode.org/glossary/#code_point>`_ index
(zero-based) of the first occurence.
* - :expression:`$split`
- Splits a string by a specified delimiter into string components
and returns an array of the string components.
* - :expression:`$strLenBytes`
- Returns the number of UTF-8 bytes for a string.
* - :expression:`$strLenCP`
- Returns the number of UTF-8 `code points
<http://www.unicode.org/glossary/#code_point>`_ for a string.
* - :expression:`$substrBytes`
- Returns the substring of a string. The substring starts with the
character at the specified UTF-8 byte index (zero-based) in the
string for the length specified.
* - :expression:`$substrCP`
- Returns the substring of a string. The substring starts with the
character at the specified UTF-8 `code point
<http://www.unicode.org/glossary/#code_point>`_ index
(zero-based) in the string for the length specified.
New Aggregation Control Flow Expression
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
:widths: 20 80
* - Operator
- Description
* - :expression:`$switch`
- Evaluates, in sequential order, the ``case`` expressions of the