Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 755 lines (537 sloc) 28.111 kb
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
=============================
Release Notes for MongoDB 2.2
=============================

.. default-domain:: mongodb

Upgrading
---------

MongoDB 2.2 is a production release series and succeeds the 2.0
production release series.

MongoDB 2.0 data files are compatible with 2.2-series binaries without any
special migration process. However, always perform the upgrade process for replica
sets and sharded clusters using the procedures that follow.

Synopsis
~~~~~~~~

- :program:`mongod`, 2.2 is a drop-in replacement for 2.0 and 1.8.

- Check your :doc:`driver </applications/drivers>` documentation for
  information regarding required compatibility upgrades, and always
  run the recent release of your driver.

  Typically, only users running with authentication, will need to
  upgrade drivers before continuing with the upgrade to 2.2.

- For all deployments using authentication, upgrade the
  drivers (i.e. client libraries), before upgrading the
  :program:`mongod` instance or instances.

- For all upgrades of sharded clusters:

  - turn off the balancer during the upgrade process. See the
    :ref:`sharding-balancing-disable-temporarily` section for more
    information.

  - upgrade all :program:`mongos` instances before upgrading any
    :program:`mongod` instances.

Other than the above restrictions, 2.2 processes can interoperate with
2.0 and 1.8 tools and processes. You can safely upgrade the
:program:`mongod` and :program:`mongos` components of a deployment
one by one while the deployment is otherwise operational. Be sure to
read the detailed upgrade procedures below before upgrading production
systems.

.. [#secondaries-first] To minimize the interruption caused by
   :ref:`election process <replica-set-elections>`, always upgrade the
   secondaries of the set first, then :dbcommand:`step down
   <replSetStepDown>` the primary, and then upgrade the primary.

.. _2.2-upgrade-standalone:

Upgrading a Standalone ``mongod``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#. Download binaries of the latest release in the 2.2 series from the
   `MongoDB Download Page`_.

#. Shutdown your :program:`mongod` instance. Replace the existing
   binary with the 2.2 :program:`mongod` binary and restart MongoDB.

.. _`MongoDB Download Page`: http://downloads.mongodb.org/

.. _2.2-upgrade-replica-set:

Upgrading a Replica Set
~~~~~~~~~~~~~~~~~~~~~~~

You can upgrade to 2.2 by performing a "rolling"
upgrade of the set by upgrading the members individually while the
other members are available to minimize downtime. Use the following
procedure:

#. Upgrade the :term:`secondary` members of the set one at a time by
   shutting down the :program:`mongod` and replacing the 2.0 binary
   with the 2.2 binary. After upgrading a :program:`mongod` instance,
   wait for the member to recover to ``SECONDARY`` state
   before upgrading the next instance.
   To check the member's state, issue :method:`rs.status()` in the
   :program:`mongo` shell.

#. Use the :program:`mongo` shell method :method:`rs.stepDown()` to
   step down the :term:`primary` to allow the normal :ref:`failover
   <replica-set-failover>` procedure. :method:`rs.stepDown()`
   expedites the failover procedure and is preferable to shutting down
   the primary directly.

   Once the primary has stepped down and another member has assumed
   ``PRIMARY`` state, as observed in the output of
   :method:`rs.status()`, shut down the previous primary and replace
   :program:`mongod` binary with the 2.2 binary and start the new
   process.

   .. note:: Replica set failover is not instant but will
      render the set unavailable to read or accept writes
      until the failover process completes. Typically this takes
      10 seconds or more. You may wish to plan the upgrade during
      a predefined maintenance window.

.. _2.2-upgrade-shard-cluster:
.. _2.2-upgrade-sharded-cluster:

Upgrading a Sharded Cluster
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Use the following procedure to upgrade a sharded cluster:

- :ref:`Disable the balancer <sharding-balancing-disable-temporarily>`.

- Upgrade all :program:`mongos` instances *first*, in any order.

- Upgrade all of the :program:`mongod` config server instances
  using the :ref:`stand alone <2.2-upgrade-standalone>` procedure.
  To keep the cluster online, be sure that at all times at least one config
  server is up.

- Upgrade each shard's replica set, using the :ref:`upgrade
  procedure for replica sets <2.2-upgrade-replica-set>` detailed above.

- re-enable the balancer.

.. note::

   Balancing is not currently supported in *mixed* 2.0.x and 2.2.0
   deployments. Thus you will want to reach a consistent version for all
   shards within a reasonable period of time, e.g. same-day.
   See :issue:`SERVER-6902` for more information.

Changes
-------

Major Features
~~~~~~~~~~~~~~

Aggregation Framework
`````````````````````

The aggregation framework makes it possible to do aggregation
operations without needing to use :term:`map-reduce`. The
:dbcommand:`aggregate` command exposes the aggregation framework, and the
:method:`~db.collection.aggregate()` helper in the :program:`mongo` shell
provides an interface to these operations. Consider the following
resources for background on the aggregation framework and its use:

- Documentation: :doc:`/core/aggregation`

- Reference: :doc:`/reference/aggregation`

- Examples: :doc:`/applications/aggregation`

TTL Collections
```````````````

TTL collections remove expired data from a collection, using a special
index and a background thread that deletes expired documents every
minute. These collections are useful as an alternative to
:term:`capped collections <capped collection>` in some cases, such as for data
warehousing and caching cases, including: machine generated event data,
logs, and session information that needs to persist in a database
for only a limited period of time.

For more information, see the :doc:`/tutorial/expire-data` tutorial.

Concurrency Improvements
````````````````````````

MongoDB 2.2 increases the server's capacity for concurrent
operations with the following improvements:

#. :issue:`DB Level Locking <SERVER-4328>`
#. :issue:`Improved Yielding on Page Faults <SERVER-3357>`
#. :issue:`Improved Page Fault Detection on Windows <SERVER-4538>`

To reflect these changes, MongoDB now provides changed and improved
reporting for concurrency and use, see :ref:`locks` and
:ref:`server-status-record-stats` in :doc:`server status
</reference/command/serverStatus>` and see
:method:`db.currentOp()`,
:doc:`mongotop </reference/program/mongotop>`, and :doc:`mongostat
</reference/program/mongostat>`.

.. todo:: add links to current op output documentation when it happens.

Improved Data Center Awareness with Tag Aware Sharding
``````````````````````````````````````````````````````

MongoDB 2.2 adds additional support for geographic distribution or
other custom partitioning for sharded collections in :term:`clusters
<sharded cluster>`. By using this "tag aware" sharding, you can
automatically ensure that data in a sharded database system is always
on specific shards. For example, with tag aware sharding, you can
ensure that data is closest to the application servers that use that
data most frequently.

.. todo When draft/core/write-operations.txt goes live, change this below:
   write-concern
   to
   write-operations-write-concern

Shard tagging controls data location, and is complementary but
separate from replica set tagging, which controls :doc:`read
preference </core/read-preference>` and :ref:`write concern
<write-concern>`. For example, shard tagging can pin all
"USA" data to one or more logical shards, while replica set tagging
can control which :program:`mongod` instances (e.g. "``production``"
or "``reporting``") the application uses to service requests.

See the documentation for the following helpers in the :program:`mongo`
shell that support tagged sharding configuration:

- :method:`sh.addShardTag()`
- :method:`sh.addTagRange()`
- :method:`sh.removeShardTag()`

Also, see :doc:`/core/tag-aware-sharding` and
:doc:`/tutorial/administer-shard-tags`.

Fully Supported Read Preference Semantics
`````````````````````````````````````````

All MongoDB clients and drivers now support full :doc:`read
preferences </core/read-preference>`, including consistent
support for a full range of :ref:`read preference modes
<replica-set-read-preference-modes>` and :ref:`tag sets
<replica-set-read-preference-tag-sets>`. This support extends to the
:program:`mongos` and applies identically to single replica sets and
to the replica sets for each shard in a :term:`sharded cluster`.

Additional read preference support now exists in the :program:`mongo`
shell using the :method:`~cursor.readPref()` cursor method.

.. including tagging

Compatibility Changes
~~~~~~~~~~~~~~~~~~~~~

Authentication Changes
``````````````````````

MongoDB 2.2 provides more reliable and robust support for
authentication clients, including drivers and :program:`mongos`
instances.

If your cluster runs with authentication:

- For all drivers, use the latest release of your driver and check
  its release notes.

- In sharded environments,
  to ensure that your cluster remains available during the upgrade
  process you **must** use the :ref:`upgrade procedure for sharded clusters
  <2.2-upgrade-shard-cluster>`.

.. _2.2-findandmodify-returns-null:

``findAndModify`` Returns Null Value for Upserts that Perform Inserts
`````````````````````````````````````````````````````````````````````

In version 2.2, for :term:`upsert` that perform inserts with the
``new`` option set to ``false``, :dbcommand:`findAndModify` commands will
now return the following output:

.. code-block:: javascript

   { 'ok': 1.0, 'value': null }

In the :program:`mongo` shell, upsert :dbcommand:`findAndModify`
operations that perform inserts (with ``new`` set to ``false``.)only output a ``null`` value.

In version 2.0 these operations would return an empty document,
e.g. ``{ }``.

See: :issue:`SERVER-6226` for more information.

``mongodump`` 2.2 Output Incompatible with Pre-2.2 ``mongorestore``
```````````````````````````````````````````````````````````````````

If you use the :program:`mongodump` tool from the 2.2 distribution to
create a dump of a database, you must use a 2.2 (or later) version of
:program:`mongorestore` to restore that dump.

See: :issue:`SERVER-6961` for more information.

.. _2.2-ObjectId-toString-valueOf-methods:

``ObjectId().toString()`` Returns String Literal ``ObjectId("...")``
````````````````````````````````````````````````````````````````````

In version 2.2, the :method:`~ObjectId.toString()` method returns the
string representation of the :ref:`ObjectId() <core-object-id-class>`
object and has the format ``ObjectId("...")``.

Consider the following example that calls the
:method:`~ObjectId.toString()` method on the
``ObjectId("507c7f79bcf86cd7994f6c0e")`` object:

.. code-block:: javascript

   ObjectId("507c7f79bcf86cd7994f6c0e").toString()

The method now returns the *string*
``ObjectId("507c7f79bcf86cd7994f6c0e")``.

Previously, in version 2.0, the method would return the *hexadecimal
string* ``507c7f79bcf86cd7994f6c0e``.

If compatibility between versions 2.0 and 2.2 is required, use
:ref:`ObjectId().str <core-object-id-class>`, which holds the
hexadecimal string value in both versions.

``ObjectId().valueOf()`` Returns hexadecimal string
```````````````````````````````````````````````````

In version 2.2, the :method:`~ObjectId.valueOf()` method returns the
value of the :ref:`ObjectId() <core-object-id-class>` object as a
lowercase hexadecimal string.

Consider the following example that calls the :method:`~ObjectId.valueOf()` method on the
``ObjectId("507c7f79bcf86cd7994f6c0e")`` object:

.. code-block:: javascript

   ObjectId("507c7f79bcf86cd7994f6c0e").valueOf()

The method now returns the *hexadecimal string*
``507c7f79bcf86cd7994f6c0e``.

Previously, in version 2.0, the method would return the *object*
``ObjectId("507c7f79bcf86cd7994f6c0e")``.

If compatibility between versions 2.0 and 2.2 is required, use
:ref:`ObjectId().str <core-object-id-class>` attribute, which holds the
hexadecimal string value in both versions.

Behavioral Changes
~~~~~~~~~~~~~~~~~~

.. _rn-2.2-collection-name-restriction:

Restrictions on Collection Names
````````````````````````````````

In version 2.2, collection names cannot:

- contain the ``$``.

- be an empty string (i.e. ``""``).

This change does not affect collections created with now illegal names
in earlier versions of MongoDB.

These new restrictions are in addition to the existing restrictions on
collection names which are:

- A collection name should begin with a letter or an underscore.

- A collection name cannot contain the null character.

- Begin with the ``system.`` prefix. MongoDB
  reserves ``system.``
  for system collections, such as the
  ``system.indexes`` collection.

- The maximum size of a collection name is 128 characters, including
  the name of the database. However, for maximum flexibility,
  collections should have names less than 80 characters.

Collections names may have any other valid UTF-8 string.

See the :issue:`SERVER-4442` and the
:ref:`faq-restrictions-on-collection-names` FAQ item.

.. _rn-2.2-database-name-restriction-windows:

Restrictions on Database Names for Windows
``````````````````````````````````````````

Database names running on Windows can no longer contain the following
characters:

.. code-block:: none

   /\. "*<>:|?

The names of the data files include the database name. If you attempt
to upgrade a database instance with one or more of these characters,
:program:`mongod` will refuse to start.

Change the name of these databases before upgrading. See
:issue:`SERVER-4584` and :issue:`SERVER-6729` for more information.

.. _2.2-id-indexes-capped-collections:

``_id`` Fields and Indexes on Capped Collections
````````````````````````````````````````````````

All :term:`capped collections <capped collection>` now have an ``_id``
field by default, *if* they exist outside of the ``local`` database,
and now have indexes on the ``_id`` field. This change only affects capped
collections created with 2.2 instances and does not affect existing
capped collections.

See: :issue:`SERVER-5516` for more information.

New ``$elemMatch`` Projection Operator
``````````````````````````````````````

The :projection:`$elemMatch` operator allows applications to narrow
the data returned from queries so that the query operation will only
return the first matching element in an array. See the
:doc:`/reference/operator/projection/elemMatch` documentation and the
:issue:`SERVER-2238` and :issue:`SERVER-828` issues for more
information.

Windows Specific Changes
~~~~~~~~~~~~~~~~~~~~~~~~

Windows XP is Not Supported
```````````````````````````

As of 2.2, MongoDB does not support Windows XP. Please upgrade to a
more recent version of Windows to use the latest releases of
MongoDB. See :issue:`SERVER-5648` for more information.

Service Support for ``mongos.exe``
``````````````````````````````````

You may now run :program:`mongos.exe` instances as a Windows
Service. See the :doc:`/reference/program/mongos.exe` reference and
:ref:`tutorial-mongod-as-windows-service` and :issue:`SERVER-1589` for
more information.

Log Rotate Command Support
``````````````````````````

MongoDB for Windows now supports log rotation by way of the
:dbcommand:`logRotate` database command. See :issue:`SERVER-2612` for
more information.

New Build Using SlimReadWrite Locks for Windows Concurrency
```````````````````````````````````````````````````````````

Labeled "2008+" on the `Downloads Page`_, this build for 64-bit
versions of Windows Server 2008 R2 and for Windows 7 or newer, offers
increased performance over the standard 64-bit Windows build of
MongoDB. See :issue:`SERVER-3844` for more information.

.. _`Downloads Page`: http://www.mongodb.org/downloads

Tool Improvements
~~~~~~~~~~~~~~~~~

Index Definitions Handled by ``mongodump`` and ``mongorestore``
```````````````````````````````````````````````````````````````

When you specify the :option:`--collection <mongodump --collection>`
option to :program:`mongodump`, :program:`mongodump` will now backup
the definitions for all indexes that exist on the source
database. When you attempt to restore this backup with
:program:`mongorestore`, the target :program:`mongod` will rebuild all
indexes. See :issue:`SERVER-808` for more information.

:program:`mongorestore` now includes the :option:`--noIndexRestore
<mongorestore --noIndexRestore>` option to provide the preceding
behavior. Use :option:`--noIndexRestore <mongorestore --noIndexRestore>`
to prevent :program:`mongorestore` from building
previous indexes.

``mongooplog`` for Replaying Oplogs
```````````````````````````````````

The :program:`mongooplog` tool makes it possible to pull :term:`oplog`
entries from :program:`mongod` instance and apply them to another
:program:`mongod` instance. You can use :program:`mongooplog` to
achieve point-in-time backup of a MongoDB data set. See the
:issue:`SERVER-3873` case and the :doc:`/reference/program/mongooplog`
documentation.

Authentication Support for ``mongotop`` and ``mongostat``
`````````````````````````````````````````````````````````

:program:`mongotop` and :program:`mongostat` now contain support for
username/password authentication. See :issue:`SERVER-3875` and
:issue:`SERVER-3871` for more information regarding this change. Also
consider the documentation of the following options for additional
information:

- :option:`mongotop --username`
- :option:`mongotop --password`
- :option:`mongostat --username`
- :option:`mongostat --password`

Write Concern Support for ``mongoimport`` and ``mongorestore``
``````````````````````````````````````````````````````````````

:program:`mongoimport` now provides an option to halt the import if
the operation encounters an error, such as a network interruption, a
duplicate key exception, or a write error.
The :option:`--stopOnError <mongoimport --stopOnError>` option
will
produce an error rather than silently continue importing data. See
:issue:`SERVER-3937` for more information.

In :program:`mongorestore`, the :option:`--w <mongorestore --w>`
option provides support for configurable write concern.

``mongodump`` Support for Reading from Secondaries
``````````````````````````````````````````````````

You can now run :program:`mongodump` when connected to a
:term:`secondary` member of a :term:`replica set`. See
:issue:`SERVER-3854` for more information.

``mongoimport`` Support for full 16MB Documents
```````````````````````````````````````````````

Previously, :program:`mongoimport` would only import documents that
were less than 4 megabytes in size. This issue is now corrected, and
you may use :program:`mongoimport` to import documents that are at
least 16 megabytes ins size. See :issue:`SERVER-4593` for more
information.

``Timestamp()`` Extended JSON format
````````````````````````````````````

MongoDB extended JSON now includes a new ``Timestamp()`` type to
represent the Timestamp type that MongoDB uses for timestamps in the
:term:`oplog` among other contexts.

This permits tools like :program:`mongooplog` and :program:`mongodump`
to query for specific timestamps. Consider the following
:program:`mongodump` operation:

.. code-block:: sh

   mongodump --db local --collection oplog.rs --query '{"ts":{"$gt":{"$timestamp" : {"t": 1344969612000, "i": 1 }}}}' --out oplog-dump

See :issue:`SERVER-3483` for more information.

Shell Improvements
~~~~~~~~~~~~~~~~~~

Improved Shell User Interface
`````````````````````````````

2.2 includes a number of changes that improve the overall quality and
consistency of the user interface for the :program:`mongo` shell:

- Full Unicode support.

- Bash-like line editing features. See :issue:`SERVER-4312` for more
  information.

- Multi-line command support in shell history.
  See :issue:`SERVER-3470` for more information.

- Windows support for the ``edit`` command. See :issue:`SERVER-3998` for
  more information.

Helper to load Server-Side Functions
````````````````````````````````````

The :method:`db.loadServerScripts()` loads the contents of the current
database's ``system.js`` collection into the current :program:`mongo`
shell session. See :issue:`SERVER-1651` for more information.

Support for Bulk Inserts
````````````````````````

If you pass an array of :term:`documents <document>` to the
:method:`~db.collection.insert()` method, the :program:`mongo`
shell will now perform a bulk insert operation. See
:issue:`SERVER-3819` and :issue:`SERVER-2395` for more information.

.. include:: /includes/note-bulk-inserts-on-sharded-clusters.rst

Operations
~~~~~~~~~~

Support for Logging to Syslog
`````````````````````````````

See the :issue:`SERVER-2957` case and the documentation of
the :setting:`~systemLog.syslogFacility` run-time option or the :option:`mongod --syslog`
and :option:`mongos --syslog` command line-options.

``touch`` Command
`````````````````

Added the :dbcommand:`touch` command to read the data and/or indexes
from a collection into memory. See: :issue:`SERVER-2023` and
:dbcommand:`touch` for more information.

``indexCounters`` No Longer Report Sampled Data
```````````````````````````````````````````````

:data:`indexCounters` now report actual counters that reflect index
use and state. In previous versions, these data were sampled. See
:issue:`SERVER-5784` and :data:`indexCounters` for more information.

Padding Specifiable on ``compact`` Command
``````````````````````````````````````````

See the documentation of the :dbcommand:`compact` and the
:issue:`SERVER-4018` issue for more information.

.. todo:: fix documentation and link

Added Build Flag to Use System Libraries
````````````````````````````````````````

The Boost library, version 1.49, is now embedded in the MongoDB
code base.

If you want to build MongoDB binaries using system Boost libraries,
you can pass ``scons`` using the ``--use-system-boost`` flag, as follows:

.. code-block:: sh

   scons --use-system-boost

When building MongoDB, you can also pass ``scons`` a flag to compile
MongoDB using only system libraries rather than the included versions
of the libraries. For example:

.. code-block:: sh

   scons --use-system-all

See the :issue:`SERVER-3829` and :issue:`SERVER-5172` issues for more
information.

Memory Allocator Changed to TCMalloc
````````````````````````````````````

To improve performance, MongoDB 2.2 uses the TCMalloc memory
allocator from Google Perftools. For more information about this
change see the :issue:`SERVER-188` and :issue:`SERVER-4683`. For more
information about TCMalloc, see the documentation of `TCMalloc`_ itself.

.. _`TCMalloc`: http://goog-perftools.sourceforge.net/doc/tcmalloc.html

Replication
~~~~~~~~~~~

Improved Logging for Replica Set Lag
````````````````````````````````````

When :term:`secondary` members of a replica set fall behind in
replication, :program:`mongod` now provides better reporting in the
log. This makes it possible to track replication in general and
identify what process may produce errors or halt replication. See
:issue:`SERVER-3575` for more information.

Replica Set Members can Sync from Specific Members
``````````````````````````````````````````````````

.. the following has been copied to source/administration/replica-sets.txt

The new :dbcommand:`replSetSyncFrom` command and new
:method:`rs.syncFrom()` helper in the :program:`mongo` shell make it
possible for you to manually configure from which member of the set a
replica will poll :term:`oplog` entries. Use these commands to
override the default selection logic if needed. Always exercise
caution with :dbcommand:`replSetSyncFrom` when overriding the default
behavior.

Replica Set Members will not Sync from Members Without Indexes Unless ``buildIndexes: false``
`````````````````````````````````````````````````````````````````````````````````````````````

.. the following has been copied to source/core/replication-internals.txt

To prevent inconsistency between members of replica sets, if the
member of a replica set has
:data:`~local.system.replset.members[n].buildIndexes` set to ``true``,
other members of the replica set will *not* sync from this member,
unless they also have
:data:`~local.system.replset.members[n].buildIndexes` set to
``true``. See :issue:`SERVER-4160` for more information.

New Option To Configure Index Pre-Fetching during Replication
`````````````````````````````````````````````````````````````

.. the following has been copied to source/core/replication-internals.txt

By default, when replicating options, :term:`secondaries <secondary>`
will pre-fetch :ref:`indexes` associated with a query to improve replication
throughput in most cases. The :setting:`replication.secondaryIndexPrefetch` setting and
:option:`--replIndexPrefetch <mongod --replIndexPrefetch>` option allow administrators to disable
this feature or allow the :program:`mongod` to pre-fetch only the
index on the ``_id`` field. See :issue:`SERVER-6718` for more information.

Map Reduce Improvements
~~~~~~~~~~~~~~~~~~~~~~~

In 2.2 Map Reduce received the following improvements:

- :issue:`Improved support for sharded MapReduce <SERVER-4521>`, and
- :issue:`MapReduce will retry jobs following a config error <SERVER-4158>`.

Sharding Improvements
~~~~~~~~~~~~~~~~~~~~~

Index on Shard Keys Can Now Be a Compound Index
```````````````````````````````````````````````

If your shard key uses the prefix of an existing index, then you do not
need to maintain a separate index for your shard key in addition to
your existing index. This index, however, cannot be a multi-key
index. See the :ref:`sharding-shard-key-indexes` documentation and
:issue:`SERVER-1506` for more information.

Migration Thresholds Modified
`````````````````````````````

The :ref:`migration thresholds <sharding-migration-thresholds>` have
changed in 2.2 to permit more even distribution of :term:`chunks
<chunk>` in collections that have smaller quantities of data. See the
:ref:`sharding-migration-thresholds` documentation for more
information.

.. Withholding from release notes. Internal feature.

   Option to Disable ``splitVector`` for :program:`mongos` Instances
   `````````````````````````````````````````````````````````````````

   By default, all :program:`mongos` instances are responsible for
   creating chunk splits. For deployments with large numbers of
   :program:`mongos` instances, this may impact the performance of the
   cluster.

   To ameliorate the additional load generated by these operations,
   the new :program:`mongos` option :option:`--noAutoSplit <mongos --noAutoSplit>`
   disables chunk splitting for individual :program:`mongos` instances.

   See :issue:`SERVER-6305` for more information.

Licensing Changes
-----------------

Added License notice for Google Perftools (TCMalloc Utility). See the
`License Notice <https://github.com/mongodb/mongo/blob/v2.2/distsrc/THIRD-PARTY-NOTICES#L231>`_
and the :issue:`SERVER-4683` for more information.

Resources
---------

- `MongoDB Downloads <http://mongodb.org/downloads>`_.
- `All JIRA issues resolved in 2.2 <https://jira.mongodb.org/secure/IssueNavigator.jspa?reset=true&jqlQuery=project+%3D+SERVER+AND+fixVersion+in+%28%222.1.0%22%2C+%222.1.1%22%2C+%222.1.2%22%2C+%222.2.0-rc0%22%2C+%222.2.0-rc1%22%2C+%222.2.0-rc2%22%29+ORDER+BY+component+ASC%2C+key+DESC>`_.
- `All backwards incompatible changes <https://jira.mongodb.org/issues/?filter=11225&jql=project%20%3D%20SERVER%20AND%20fixVersion%20in%20(10483%2C%2010893%2C%2010894%2C%2010213)%20AND%20%22Backwards%20Compatibility%22%20in%20%20(%22Major%20Change%22%2C%20%22Minor%20Change%22)%20%20ORDER%20BY%20votes%20DESC%2C%20issuetype%20DESC%2C%20key%20DESC>`_.
- `All third party license notices <https://github.com/mongodb/mongo/blob/v2.2/distsrc/THIRD-PARTY-NOTICES>`_.
- `What's New in MongoDB 2.2 Online Conference <http://www.mongodb.com/events/webinar/mongodb-online-conference-sept>`_.
Something went wrong with that request. Please try again.