@@ -487,13 +487,13 @@ All chunk migrations use the following procedure:
487
487
the source shard for the chunk. In this operation the balancer
488
488
passes the name of the destination shard to the source shard.
489
489
490
- #. The source initaties the move with an internal
490
+ #. The source initiaties the move with an internal
491
491
:dbcommand:`moveChunk` command with the destination shard.
492
492
493
493
#. The destination shard begins requesting documents in the chunk, and
494
494
begins receiving these chunks.
495
495
496
- #. After receving the final document in the chunk, the destination
496
+ #. After receiving the final document in the chunk, the destination
497
497
shard initiates a synchronization process to ensure that all
498
498
changes to the documents in the chunk on the source shard during
499
499
the migration process exist on the destination shard.
@@ -513,7 +513,7 @@ Config Database
513
513
514
514
The ``config`` database contains information about your sharding
515
515
configuration and stores the information in a set of collections
516
- specific to sharding.
516
+ used by sharding.
517
517
518
518
.. important:: Back up the ``config`` database before performing
519
519
any maintenance on the config server.
@@ -525,13 +525,14 @@ To start the ``config`` database, issue the following command from the
525
525
526
526
use config
527
527
528
- The config database includes the following collections specific to sharding:
528
+ The ``config`` database holds the following collections that support
529
+ sharded cluster operations:
529
530
530
- .. data:: chunks
531
+ .. data:: chunks
531
532
532
- This collection lists the chunks in the sharded cluster. Each chunk
533
- is listed as a separate document. The following is the document for a
534
- chunk with the ``_id`` ``mydb.foo-animal_\"cat\"``. Among other
533
+ The :data:`chunks` collection represents each chunk in the sharded cluster
534
+ in a separate document. The following is a document for a
535
+ chunk with an ``_id`` value of ``mydb.foo-animal_\"cat\"``. Among other
535
536
information, the document shows the chunk's minimum and maximum
536
537
values (in the ``min`` and ``max`` fields) and the name of the shard
537
538
to which the chunk belongs (in the ``shard`` field):
@@ -554,9 +555,10 @@ The config database includes the following collections specific to sharding:
554
555
555
556
.. data:: collections
556
557
557
- This lists the collections in the sharded cluster. Each collection is
558
- listed as a separate document. The following is the document for the
559
- ``foo`` collection in the ``mydb`` database:
558
+ The :data:`collections` collection represents each sharded collection
559
+ in the cluster in a separate document. Given a collection named ``foo``
560
+ in the ``mydb`` database, the document in the :data:`collections`
561
+ collection would resemble:
560
562
561
563
.. code-block:: javascript
562
564
@@ -573,7 +575,7 @@ The config database includes the following collections specific to sharding:
573
575
574
576
.. data:: databases
575
577
576
- This collection lists the databases in the sharded cluster and whether
578
+ The :data:`databases` collection holds the databases in the sharded cluster and whether
577
579
or not each is partitioned. Each database is listed as a separate
578
580
document. If a database is partitioned, the ``primary`` key gives the
579
581
name of the :term:`primary shard`.
@@ -583,17 +585,28 @@ The config database includes the following collections specific to sharding:
583
585
{ "_id" : "admin", "partitioned" : false, "primary" : "config" }
584
586
{ "_id" : "mydb", "partitioned" : true, "primary" : "shard0000" }
585
587
586
- .. TODO Is data:: lockpings a shard-specific collection?
588
+ .. data:: lockpings
587
589
588
- .. TODO Is data:: locks a shard-specific collection?
590
+ The :data:`lockpings` collection keeps track of the active components
591
+ in the sharded cluster. Given a cluster with a :program:`mongos`
592
+ running on ``example.com:30000``, the document in the
593
+ :data:`lockpings` collection would resemble:
594
+
595
+ .. code-block:: javascript
596
+
597
+ { "_id" : "example.com:30000:1350047994:16807", "ping" : ISODate("2012-10-12T18:32:54.892Z") }
598
+
599
+ .. data:: locks
600
+
601
+ The :data:`locks` collection is used for distributed locking between
602
+ :program:`mongos` instances and shards.
589
603
590
604
.. data:: mongos
591
605
592
- This collection lists all the :program:`mongos` sharding routers
593
- affiliated with the sharded cluster. Each :program:`mongos` is
594
- listed as a separate document. A :program:`mongos` pings the cluster
606
+ The :data:`mongos` collection represents each :program:`mongos`
607
+ affiliated with the sharded cluster. A :program:`mongos` sends pings to all members of the cluster
595
608
every 30 seconds to verify to the cluster the :program:`mongos` is
596
- active. This collection is used for reporting.
609
+ active. The ``ping`` field shows the time of the last ping. This collection is used for reporting.
597
610
598
611
The following document shows the status of the :program:`mongos`
599
612
running on ``example.com:30000``.
@@ -604,7 +617,7 @@ The config database includes the following collections specific to sharding:
604
617
605
618
.. data:: settings
606
619
607
- This collection lists the following sharding configuration settings:
620
+ The :data:`settings` collection holds the following sharding configuration settings:
608
621
609
622
- Chunk size. To change chunk size, see :ref:`sharding-balancing-modify-chunk-size`.
610
623
@@ -619,21 +632,26 @@ The config database includes the following collections specific to sharding:
619
632
620
633
.. data:: shards
621
634
622
- This collection lists the shards you have created. Each shard is
623
- listed as a separate document. If the shard is a replica set, the
635
+ The :data:` shards` collection represents each shard in the cluster
636
+ in a separate document. If the shard is a replica set, the
624
637
``host`` field displays the name of the replica set, then a slash, then
625
638
the hostname, as shown here:
626
639
627
640
.. code-block:: javascript
628
641
629
642
{ "_id" : "shard0000", "host" : "shard1/localhost:30000" }
630
643
644
+ .. data:: system.indexes
645
+
646
+ The :data:`system.indexes` collection contains all the indexes in the
647
+ shard. For more information on indexes, see :doc:`/indexes`.
648
+
631
649
.. data:: version
632
650
633
- This collection contains the current metadata version number. This
651
+ The :data:`version` collection holds the current metadata version number. This
634
652
collection contains only one document:
635
653
636
- To access the `` version` ` collection you must use the
654
+ To access the :data:` version` collection you must use the
637
655
:method:`db.getCollection()` method. For example, to display the
638
656
collection's document:
639
657
0 commit comments